@SpringBootApplication
@EnableScheduling
@PropertySource(value="classpath:application.properties") @PropertySource(value="classpath:serverpackcreator.properties") @PropertySource(value="file:./serverpackcreator.properties")
public class ServerPackCreator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ServerPackCreator.CommandlineParser
Check the passed commandline-arguments with which ServerPackCreator was started and return the
mode in which to run.
|
static class |
ServerPackCreator.Mode
Mode-priorities.
|
| Constructor and Description |
|---|
ServerPackCreator(java.lang.String[] args)
Initialize ServerPackCreator and determine the
ServerPackCreator.Mode to run in. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDatabase()
Ensures serverpackcreator.db exists.
|
boolean |
checkForConfig()
Check for old config file, if found rename to new name.
|
boolean |
checkServerFilesFile(java.io.File fileToCheckFor)
Checks for existence of defaults files.
|
AnnotationScanner |
getAnnotationScanner() |
ApplicationAddons |
getApplicationAddons() |
ApplicationProperties |
getApplicationProperties() |
java.lang.String[] |
getArgs()
The arguments with which ServerPackCreator was started.
|
BooleanUtilities |
getBooleanUtilities() |
ConfigurationEditor |
getConfigurationEditor() |
ConfigurationHandler |
getConfigurationHandler() |
ConfigUtilities |
getConfigUtilities() |
FabricScanner |
getFabricScanner() |
FileUtilities |
getFileUtilities() |
I18n |
getI18n() |
static ServerPackCreator |
getInstance()
Acquire an instance of ServerPackCreator using the
--setup-argument so a prepared
environment is present after acquiring the instance. |
static ServerPackCreator |
getInstance(java.lang.String[] args)
Acquire an instance of ServerPackCreator using the specified argument.
|
JarUtilities |
getJarUtilities() |
JsonUtilities |
getJsonUtilities() |
ListUtilities |
getListUtilities() |
ModScanner |
getModScanner() |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
QuiltScanner |
getQuiltScanner() |
ServerPackCreatorWindow |
getServerPackCreatorGui() |
ServerPackCreatorSplash |
getServerPackCreatorSplash() |
ServerPackHandler |
getServerPackHandler() |
StringUtilities |
getStringUtilities() |
SystemUtilities |
getSystemUtilities() |
com.electronwill.nightconfig.toml.TomlParser |
getTomlParser() |
TomlScanner |
getTomlScanner() |
UpdateChecker |
getUpdateChecker() |
Utilities |
getUtilities() |
VersionMeta |
getVersionMeta() |
WebUtilities |
getWebUtilities() |
static void |
main(java.lang.String[] args)
Initialize ServerPackCreator with the passed commandline-arguments and run.
|
void |
overwriteServerFilesFile(java.io.File fileToOverwrite)
Delete and recreate a server-files file, so we always have the latest and greatest hits
available on the host, and therefor, the user.
|
void |
run()
Run ServerPackCreator with the mode acquired from
ServerPackCreator.CommandlineParser. |
void |
run(ServerPackCreator.Mode modeToRunIn)
Run ServerPackCreator in a specific
ServerPackCreator.Mode. |
void |
updateCheck()
Check for update-availability and exit with status code 0.
|
static void |
web(java.lang.String[] args)
Start Spring Boot app, providing our Apache Tomcat and serving our frontend.
|
public ServerPackCreator(java.lang.String[] args)
ServerPackCreator.Mode to run in.args - Commandline arguments with which ServerPackCreator is run. Determines which mode
ServerPackCreator will enter and which locale is used.public static ServerPackCreator getInstance()
--setup-argument so a prepared
environment is present after acquiring the instance. If a new instance of ServerPackCreator is
created as the result of calling this method, then the setup is run to ensure a properly
prepared environment.--setup-argument.public static ServerPackCreator getInstance(java.lang.String[] args)
args - Arguments with which to instantiate ServerPackCreator. Possible arguments can be
found at ServerPackCreator.Mode.public static void main(java.lang.String[] args)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
For a list of available commandline arguments, check out ServerPackCreator.Mode
args - Commandline arguments with which ServerPackCreator is run. Determines which mode
ServerPackCreator will enter and which locale is used.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.public static void web(java.lang.String[] args)
args - Arguments passed from invocation in main(String[]).public java.lang.String[] getArgs()
public I18n getI18n()
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public ApplicationProperties getApplicationProperties()
public BooleanUtilities getBooleanUtilities()
public FileUtilities getFileUtilities()
public JarUtilities getJarUtilities()
public JsonUtilities getJsonUtilities()
public ListUtilities getListUtilities()
public StringUtilities getStringUtilities()
public SystemUtilities getSystemUtilities()
public WebUtilities getWebUtilities()
public Utilities getUtilities()
public VersionMeta getVersionMeta() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic ConfigUtilities getConfigUtilities()
public ConfigurationHandler getConfigurationHandler() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic ApplicationAddons getApplicationAddons() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic ServerPackHandler getServerPackHandler() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic ServerPackCreatorSplash getServerPackCreatorSplash()
public UpdateChecker getUpdateChecker()
public ModScanner getModScanner()
public AnnotationScanner getAnnotationScanner()
public FabricScanner getFabricScanner()
public QuiltScanner getQuiltScanner()
public com.electronwill.nightconfig.toml.TomlParser getTomlParser()
public TomlScanner getTomlScanner()
public ConfigurationEditor getConfigurationEditor() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic ServerPackCreatorWindow getServerPackCreatorGui() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic void run()
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
ServerPackCreator.CommandlineParser.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.public void run(ServerPackCreator.Mode modeToRunIn) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
ServerPackCreator.Mode.modeToRunIn - Mode to run in.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.public boolean checkForConfig()
public boolean checkServerFilesFile(java.io.File fileToCheckFor)
fileToCheckFor - The file which is to be checked for whether it exists and if it doesn't,
should be created.true if the file was generated, so we can inform the user about said newly
generated file.public void overwriteServerFilesFile(java.io.File fileToOverwrite)
fileToOverwrite - The file which is to be overwritten. If it exists. it is first deleted,
then extracted from our JAR-file.public void checkDatabase()
public void updateCheck()