Class ServerPackGeneration
-
- All Implemented Interfaces:
public final class ServerPackGenerationReturned by de.griefed.serverpackcreator.api.serverpack.ServerPackHandler.run. Contains information about the generated server pack, or the server pack which was attempted to be generated.
Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private final FileserverPackprivate final List<String>errorsprivate final Optional<File>serverPackZipprivate final PackConfigpackConfigprivate final List<File>filesprivate final List<String>scanFindingsprivate final Booleansuccess
-
Method Summary
Modifier and Type Method Description final FilegetServerPack()The generated server pack as a file. final List<String>getErrors()List of errors encountered during server pack generation. final Optional<File>getServerPackZip()The server pack ZIP-archive, if one was generated. final PackConfiggetPackConfig()The configuration used in the generation of this server pack. final List<File>getFiles()A list of all files in the server pack. final List<String>getScanFindings()What the security scans reported about the finished server pack — currently Nekodetector's fractureiser findings. final BooleangetSuccess()Whether the generation itself worked — i.e. -
-
Method Detail
-
getServerPack
final File getServerPack()
The generated server pack as a file. This usually points towards a directory on the file-system.
-
getServerPackZip
final Optional<File> getServerPackZip()
The server pack ZIP-archive, if one was generated. Optional for ease of use, as not every server pack generation also creates a ZIP-archive.
-
getPackConfig
final PackConfig getPackConfig()
The configuration used in the generation of this server pack.
-
getFiles
final List<File> getFiles()
A list of all files in the server pack. These are absolute files, mind you. If you need relative-files, iterate through this list and remove the path to the server pack from each entry to receive a list of relative paths.
-
getScanFindings
final List<String> getScanFindings()
What the security scans reported about the finished server pack — currently Nekodetector's fractureiser findings.
Deliberately separate from errors, because the two answer different questions: this one is "what is in the pack",
errorsis "did building it work". Conflating them made a pack containing an infected mod indistinguishable from one whose files never got copied. Defaulted so existing callers constructing a generation keep compiling.
-
getSuccess
final Boolean getSuccess()
Whether the generation itself worked — i.e. whether errors is empty.
Says nothing about what the pack contains: a pack that built correctly and holds an infected mod is a successful generation with a non-empty scanFindings, and a caller that cares about the latter has to ask for it.
-
-
-
-