Class CLIOptions

    • Field Detail

      • executable

        protected String executable
    • Constructor Detail

      • CLIOptions

        protected CLIOptions()
      • CLIOptions

        protected CLIOptions​(String[] args)
    • Method Detail

      • addOptions

        public abstract void addOptions()
      • addHelpAndVersion

        public void addHelpAndVersion()
      • hasOption

        public boolean hasOption​(String key)
      • parse

        public void parse()
                   throws AppException
        Parse will use all declared options to create the cmd AND additionally it uses internalOptions to create internalCmd. Both is used to create the ultimately required CommandParameters which contains a full set of options.
        Throws:
        AppException
      • printUsage

        public void printUsage​(String message,
                               String[] args)
      • getAppName

        protected String getAppName()
      • addOption

        public void addOption​(org.apache.commons.cli.Option option)
      • getBinaryName

        protected String getBinaryName()
        Returns:
        name of the binary to call (.sh, .bat or .exe when using choco)
      • showReturnCodes

        public void showReturnCodes()
        This is called automatically by the constructor to see the list of return-Codes.