Interface Command

    • Method Detail

      • getName

        String getName()
        Name of the command.
        Returns:
        name
      • getDescription

        String getDescription()
        Brief description of the command.
        Returns:
        description
      • getUsage

        String getUsage()
        Command-line usage for the command.
        Returns:
        usage
      • getOptions

        org.apache.commons.cli.Options getOptions()
        Command-line options for the command.
        Returns:
        options
      • main

        void main​(String[] args)
        All commands can be call from the Java command line with an array of strings as arguments.
        Parameters:
        args - strings to use as arguments
      • execute

        CommandState execute​(CommandState inputState,
                             String[] args)
                      throws Exception
        All commands offer an execute method that can be chained from previous commands.
        Parameters:
        inputState - the input from the previous command, or null
        args - the command-line arguments
        Returns:
        the updated state, or a new state, or null
        Throws:
        Exception - on any problem