@Internal public class GenericCLI extends Object implements CustomCommandLine
CustomCommandLine
that only expects the execution.target
parameter to be explicitly specified and simply forwards the rest of the options specified with
-D to the corresponding PipelineExecutor
for further parsing.Constructor and Description |
---|
GenericCLI(Configuration configuration,
String configDir) |
Modifier and Type | Method and Description |
---|---|
void |
addGeneralOptions(org.apache.commons.cli.Options baseOptions)
Adds custom options to the existing general options.
|
void |
addRunOptions(org.apache.commons.cli.Options baseOptions)
Adds custom options to the existing run options.
|
String |
getId()
Gets the unique identifier of this CustomCommandLine.
|
boolean |
isActive(org.apache.commons.cli.CommandLine commandLine)
Signals whether the custom command-line wants to execute or not.
|
Configuration |
toConfiguration(org.apache.commons.cli.CommandLine commandLine)
Materializes the command line arguments in the given
CommandLine to a Configuration and returns it. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parseCommandLineOptions
public GenericCLI(Configuration configuration, String configDir)
public boolean isActive(org.apache.commons.cli.CommandLine commandLine)
CustomCommandLine
isActive
in interface CustomCommandLine
commandLine
- The command-line optionspublic String getId()
CustomCommandLine
getId
in interface CustomCommandLine
public void addRunOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addRunOptions
in interface CustomCommandLine
baseOptions
- The existing options.public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addGeneralOptions
in interface CustomCommandLine
baseOptions
- The existing options.public Configuration toConfiguration(org.apache.commons.cli.CommandLine commandLine)
CustomCommandLine
CommandLine
to a Configuration
and returns it.toConfiguration
in interface CustomCommandLine
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.