Package com.inet.pdfc.plugin
Interface CommandLineParameter
-
- All Known Implementing Classes:
PDFC.PROP
public interface CommandLineParameterDefines an additional parameter for the command line tool. This is a plug-in interface. Thus all implementations have to registered at theServerPluginManagerin the REGISTER phase.
Theexecutemethod of the parameters will be called in the same order as they are added to theServerPluginManager! So make sure to sort theServerPluginManager.register(Class, Object)calls accordingly.- Since:
- i-net PDFC 4.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute(PDFC.ComparisonParameters parameters, java.lang.String optionalParameter)Executes the parameter to modify the comparison configuration accordingly.java.lang.StringgetHelpMessage()Returns a string to attach to the list of commands of the tool.java.lang.StringgetKey()Returns the long/full key of the parameter.java.lang.StringgetMissingArgMsg()Returns the message in casehasValue()is true but no argument was passed.chargetShortcut()Returns the single character short cut switch, use a space if no shortcut can be used.booleanhasValue()Returns whether the parameter requires an additional argument like a path.
-
-
-
Method Detail
-
getKey
java.lang.String getKey()
Returns the long/full key of the parameter.- Returns:
- the long/full key of the parameter, may be
nullif not used - Since:
- i-net PDFC 4.3
-
getShortcut
char getShortcut()
Returns the single character short cut switch, use a space if no shortcut can be used. Short cuts can be combined into a single parameter. It's recommended to only provide a shortcut if no parameter is required since the additional value would be ambiguous in case of combined parameters.- Returns:
- the single character short cut switch or 0x00 if no shortcut is provided
- Since:
- i-net PDFC 4.3
-
hasValue
boolean hasValue()
Returns whether the parameter requires an additional argument like a path.- Returns:
trueif the next parameter is the argument to this parameter- Since:
- i-net PDFC 4.3
-
getMissingArgMsg
java.lang.String getMissingArgMsg()
Returns the message in casehasValue()is true but no argument was passed. IfhasValue()returnsfalse, this method may returnnull.- Returns:
- the message in case
hasValue()is true but no argument was passed - Since:
- i-net PDFC 4.3
-
execute
void execute(PDFC.ComparisonParameters parameters, java.lang.String optionalParameter)
Executes the parameter to modify the comparison configuration accordingly.- Parameters:
parameters- the configuration instance for the comparison to run after all command line parameters have been evaluated.optionalParameter- ifhasValue()yieldstrue, the caller will pass the additional value in this parameter- Since:
- i-net PDFC 4.3
-
getHelpMessage
java.lang.String getHelpMessage()
Returns a string to attach to the list of commands of the tool. Must not have a leading or tailing break character! Use the default locale of the JVM for the translation.- Returns:
- a string to attach to the list of commands of the tool or
nullfor no help content - Since:
- i-net PDFC 4.3
-
-