Class Shell.Command

java.lang.Object
org.apache.accumulo.shell.Shell.Command
Direct Known Subclasses:
AboutCommand, AddAuthsCommand, AddSplitsCommand, AuthenticateCommand, ClasspathCommand, ClearCommand, CloneTableCommand, ConfigCommand, ConstraintCommand, CreateNamespaceCommand, CreateTableCommand, CreateUserCommand, DebugCommand, DeleteAuthsCommand, DeleteCommand, DeleteIterCommand, DeleteNamespaceCommand, DeleteRowsCommand, DeleteScanIterCommand, DeleteShellIterCommand, DropUserCommand, DUCommand, ExecfileCommand, ExitCommand, ExportTableCommand, ExtensionCommand, FateCommand, GetAuthsCommand, GetGroupsCommand, GetSplitsCommand, HelpCommand, HiddenCommand, HistoryCommand, ImportDirectoryCommand, ImportTableCommand, InsertCommand, ListBulkCommand, ListCompactionsCommand, ListIterCommand, ListScansCommand, ListShellIterCommand, ListTabletsCommand, MergeCommand, NamespacePermissionsCommand, NamespacesCommand, NoTableCommand, PasswdCommand, PingCommand, RenameNamespaceCommand, RenameTableCommand, ScanCommand, ScriptCommand, SetAuthsCommand, SetGroupsCommand, SetIterCommand, ShellPluginConfigurationCommand, SleepCommand, SystemPermissionsCommand, TableCommand, TableOperation, TablePermissionsCommand, TablesCommand, TraceCommand, UserCommand, UserPermissionsCommand, UsersCommand, WhoAmICommand
Enclosing class:
Shell

public abstract static class Shell.Command extends Object
The Command class represents a command to be run in the shell. It contains the methods to execute along with some methods to help tab completion, and return the command name, help, and usage.
  • Constructor Details

    • Command

      public Command()
  • Method Details

    • registerCompletionGeneral

      public void registerCompletionGeneral(Token root, Set<String> args, boolean caseSens)
    • registerCompletionForTables

      public void registerCompletionForTables(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
    • registerCompletionForUsers

      public void registerCompletionForUsers(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
    • registerCompletionForCommands

      public void registerCompletionForCommands(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
    • registerCompletionForNamespaces

      public void registerCompletionForNamespaces(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
    • execute

      public abstract int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState) throws Exception
      Throws:
      Exception
    • description

      public abstract String description()
    • numArgs

      public abstract int numArgs()
      If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override the usage() method. Otherwise, usage() does need to be overridden.
    • getName

      public String getName()
    • registerCompletion

      public void registerCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> completion_set)
    • printHelp

      public final void printHelp(Shell shellState)
    • printHelp

      public final void printHelp(Shell shellState, int width)
    • getOptionsWithHelp

      public final org.apache.commons.cli.Options getOptionsWithHelp()
    • usage

      public String usage()
    • getOptions

      public org.apache.commons.cli.Options getOptions()