Class CLIProcessor.CallingContext
- java.lang.Object
-
- gov.nist.secauto.metaschema.cli.processor.CLIProcessor.CallingContext
-
- Enclosing class:
- CLIProcessor
public class CLIProcessor.CallingContext extends Object
-
-
Constructor Summary
Constructors Constructor Description CallingContext(List<String> args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
buildHelpCliSyntax()
Get the CLI syntax.protected String
buildHelpHeader()
Callback for providing a help header.protected List<String>
getExtraArgs()
protected List<org.apache.commons.cli.Option>
getOptionsList()
ICommand
getTargetCommand()
ExitStatus
handleInvalidCommand(String message)
protected ExitStatus
invokeCommand(org.apache.commons.cli.CommandLine cmdLine)
ExitStatus
processCommand()
void
showHelp()
protected org.apache.commons.cli.Options
toOptions()
-
-
-
Constructor Detail
-
CallingContext
public CallingContext(@NonNull List<String> args)
-
-
Method Detail
-
getTargetCommand
@Nullable public ICommand getTargetCommand()
-
getOptionsList
@NonNull protected List<org.apache.commons.cli.Option> getOptionsList()
-
getExtraArgs
@NonNull protected List<String> getExtraArgs()
-
toOptions
protected org.apache.commons.cli.Options toOptions()
-
processCommand
@NonNull public ExitStatus processCommand()
-
invokeCommand
protected ExitStatus invokeCommand(@NonNull org.apache.commons.cli.CommandLine cmdLine)
-
handleInvalidCommand
@NonNull public ExitStatus handleInvalidCommand(@NonNull String message)
-
buildHelpHeader
@Nullable protected String buildHelpHeader()
Callback for providing a help header.- Returns:
- the header or
null
-
buildHelpCliSyntax
protected String buildHelpCliSyntax()
Get the CLI syntax.- Returns:
- the CLI syntax to display in help output
-
showHelp
public void showHelp()
-
-