Class CompleteCli

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware, CLI

    public class CompleteCli
    extends AbstractAuthenticatedCLI
    This CLI provide various runtime completions that can be re-used by other CLIs.
    Author:
    poirigui
    See Also:
    EnumeratedByCommandConverter
    • Constructor Detail

      • CompleteCli

        public CompleteCli()
    • Method Detail

      • processOptions

        protected void processOptions​(org.apache.commons.cli.CommandLine commandLine)
                               throws org.apache.commons.cli.ParseException
        Description copied from class: AbstractCLI
        Process command line options.

        Implement this to provide processing of options. It is called after AbstractCLI.buildOptions(Options) and right before AbstractCLI.doWork().

        Overrides:
        processOptions in class AbstractCLI
        Throws:
        org.apache.commons.cli.ParseException - in case of unrecoverable failure (i.e. missing option or invalid value), an exception can be raised and will result in an exit code of AbstractCLI.FAILURE.
      • getCommandName

        public String getCommandName()
        Description copied from interface: CLI
        A short memorable name for the command that can be used to locate this class.
        Specified by:
        getCommandName in interface CLI
        Overrides:
        getCommandName in class AbstractCLI
        Returns:
        name; if null or blank, this will not be available as a shortcut command.
      • getUsage

        protected String getUsage()
        Description copied from class: AbstractCLI
        Describe the intended usage for the command.

        This will be included in the 'Usage: ...' error message when the CLI is misused.

        Overrides:
        getUsage in class AbstractCLI