Class UpdateProperties
java.lang.Object
me.pauleff.converter.plugins.UpdateProperties
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Updates
online-mode in server.properties to match the conversion direction.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Returnstruewhen an online/offline conversion was requested.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Writesonline-modetotruefor online conversion, otherwisefalse.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
-
UpdateProperties
public UpdateProperties()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Returnstruewhen an online/offline conversion was requested.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueif this is a conversion operation;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
Writesonline-modetotruefor online conversion, otherwisefalse.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- the existingserver.propertiespaths to update- Throws:
IOException- if writing properties fails
-