Class ApplyCliServerProperties
java.lang.Object
me.pauleff.converter.plugins.ApplyCliServerProperties
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Applies
-properties key/value pairs from the CLI to server.properties.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Returnstruewhen at least one-propertieschange was provided.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Writes each CLI property change into the resolvedserver.propertiesfiles.setTargets(PluginContext ctx) Returns theserver.propertiespath under the server folder.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
ApplyCliServerProperties
public ApplyCliServerProperties()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Returnstruewhen at least one-propertieschange was provided.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueif there are property changes to apply;falseotherwise
-
setTargets
Returns theserver.propertiespath under the server folder.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- a single-element list containing
server.properties
-
run
Writes each CLI property change into the resolvedserver.propertiesfiles.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- the existingserver.propertiespaths to update- Throws:
IOException- if writing properties fails
-