org.apache.accumulo.core.util.shell
Class Shell.Command

java.lang.Object
  extended by org.apache.accumulo.core.util.shell.Shell.Command
Direct Known Subclasses:
AboutCommand, AddSplitsCommand, AuthenticateCommand, ClasspathCommand, ClearCommand, CloneTableCommand, ConfigCommand, CreateTableCommand, CreateUserCommand, DebugCommand, DeleteCommand, DeleteIterCommand, DeleteRowsCommand, DeleteScanIterCommand, DeleteTableCommand, DropUserCommand, DUCommand, ExecfileCommand, ExitCommand, FormatterCommand, GetAuthsCommand, GetGroupsCommand, GetSplitsCommand, GrantCommand, HelpCommand, HiddenCommand, HistoryCommand, ImportDirectoryCommand, InsertCommand, ListIterCommand, ListScansCommand, MasterStateCommand, MergeCommand, NoTableCommand, PasswdCommand, RenameTableCommand, RevokeCommand, ScanCommand, SelectCommand, SelectrowCommand, SetAuthsCommand, SetGroupsCommand, SetIterCommand, Shell.TableOperation, SleepCommand, SystemPermissionsCommand, TableCommand, TablePermissionsCommand, TablesCommand, 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.


Nested Class Summary
static class Shell.Command.CompletionSet
           
 
Constructor Summary
Shell.Command()
           
 
Method Summary
abstract  String description()
           
abstract  int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState)
           
 String getName()
           
 org.apache.commons.cli.Options getOptions()
           
 org.apache.commons.cli.Options getOptionsWithHelp()
           
abstract  int numArgs()
           
 void printHelp()
           
 void printHelp(int width)
           
 void registerCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> completion_set)
           
 void registerCompletionForCommands(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
           
 void registerCompletionForTables(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
           
 void registerCompletionForUsers(Token root, Map<Shell.Command.CompletionSet,Set<String>> completionSet)
           
 void registerCompletionGeneral(Token root, Set<String> args, boolean caseSens)
           
 String usage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shell.Command

public Shell.Command()
Method Detail

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)

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()

getName

public String getName()

registerCompletion

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

printHelp

public final void printHelp()

printHelp

public final void printHelp(int width)

getOptionsWithHelp

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

usage

public String usage()

getOptions

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


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.