Class CLIProcessor.CallingContext

java.lang.Object
gov.nist.secauto.metaschema.cli.processor.CLIProcessor.CallingContext
Enclosing class:
CLIProcessor

public class CLIProcessor.CallingContext extends Object
  • Constructor Details

    • CallingContext

      public CallingContext(@NonNull List<String> args)
  • Method Details

    • getCLIProcessor

      @NonNull public CLIProcessor getCLIProcessor()
    • 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

      @NonNull protected ExitStatus invokeCommand(@NonNull org.apache.commons.cli.CommandLine cmdLine)
    • handleError

      @NonNull public ExitStatus handleError(@NonNull ExitStatus exitStatus, @NonNull org.apache.commons.cli.CommandLine cmdLine, boolean showHelp)
    • 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()
      Output the help text to the console.