Package com.inet.pdfc.plugin
Interface CommandLineParameter
- All Known Implementing Classes:
PDFC.PROP
public interface CommandLineParameter
Defines an additional parameter for the command line tool. This is a plug-in interface. Thus all implementations
have to registered at the
The
ServerPluginManager
in the REGISTER phase.The
execute
method of the parameters will be called in
the same order as they are added to the ServerPluginManager
! So make sure to sort the
ServerPluginManager.register(Class, Object)
calls accordingly.- Since:
- i-net PDFC 4.3
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(PDFC.ComparisonParameters parameters, String optionalParameter) Executes the parameter to modify the comparison configuration accordingly.Returns a string to attach to the list of commands of the tool.getKey()
Returns the long/full key of the parameter.Returns the message in casehasValue()
is true but no argument was passed.char
Returns the single character short cut switch, use a space if no shortcut can be used.boolean
hasValue()
Returns whether the parameter requires an additional argument like a path.
-
Method Details
-
getKey
String getKey()Returns the long/full key of the parameter.- Returns:
- the long/full key of the parameter, may be
null
if 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:
true
if the next parameter is the argument to this parameter- Since:
- i-net PDFC 4.3
-
getMissingArgMsg
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
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
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
null
for no help content - Since:
- i-net PDFC 4.3
-