public abstract class AbstractSubCLICommand extends BaseLauncher implements ICLICommand
Constructor and Description |
---|
AbstractSubCLICommand(ICLICommand rootCommand,
java.lang.String name,
java.lang.String description,
java.util.List<org.apache.commons.cli.Option> options,
IExitHandler exitHandler,
java.io.PrintStream stdout,
java.io.PrintStream stderr)
The constructor
|
Modifier and Type | Method and Description |
---|---|
Controller |
getController()
Used to get the controller
|
java.lang.String |
getDescription()
Used to get the sub command description
|
protected java.lang.String |
getPrintArguments() |
protected void |
printUsage(org.apache.commons.cli.Options options,
java.io.PrintStream stdout,
java.io.PrintStream stderr) |
protected abstract boolean |
processOptions(java.lang.String[] args,
org.apache.commons.cli.CommandLine cmd) |
protected boolean |
processOptionsInternal(java.lang.String[] args,
org.apache.commons.cli.CommandLine cmd) |
addOption, checkSubCommand, displayHelp, doExit, fatal, fatal, getName, getOptions, getStderr, getStdout, handleBadSubCommandOption, info, init, launch, printOptions, run, shouldDisplayHelp, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public AbstractSubCLICommand(ICLICommand rootCommand, java.lang.String name, java.lang.String description, java.util.List<org.apache.commons.cli.Option> options, IExitHandler exitHandler, java.io.PrintStream stdout, java.io.PrintStream stderr)
rootCommand
- The parent commandname
- The name of the sub commanddescription
- The description of the sub commandoptions
- The sub command optionsstdout
- The standard output streamstderr
- The standard error streamexitHandler
- The exit handlerpublic java.lang.String getDescription()
public Controller getController()
getController
in interface ICLICommand
protected void printUsage(org.apache.commons.cli.Options options, java.io.PrintStream stdout, java.io.PrintStream stderr)
printUsage
in class BaseLauncher
protected java.lang.String getPrintArguments()
protected boolean processOptionsInternal(java.lang.String[] args, org.apache.commons.cli.CommandLine cmd)
processOptionsInternal
in class BaseLauncher
protected abstract boolean processOptions(java.lang.String[] args, org.apache.commons.cli.CommandLine cmd)