org.aitools.programd.interfaces.shell
Class ShellCommandRegistry

java.lang.Object
  extended by org.aitools.programd.util.ObjectExemplarRegistry<ShellCommand>
      extended by org.aitools.programd.interfaces.shell.ShellCommandRegistry

public class ShellCommandRegistry
extends ObjectExemplarRegistry<ShellCommand>

Maps ShellCommands to their command strings.

Since:
4.5
Author:
Noel Bush

Field Summary
private static java.lang.String[] COMMAND_LIST
          The list of built-in shell commands (fully-qualified class names).
 
Fields inherited from class org.aitools.programd.util.ObjectExemplarRegistry
registry
 
Constructor Summary
ShellCommandRegistry()
          Creates a new AIMLProcessorRegistry, with no additional commands.
 
Method Summary
 ShellCommand getHandlerFor(java.lang.String commandLine)
           
 java.util.Collection<ShellCommand> getValues()
           
 
Methods inherited from class org.aitools.programd.util.ObjectExemplarRegistry
get, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_LIST

private static final java.lang.String[] COMMAND_LIST
The list of built-in shell commands (fully-qualified class names).

Constructor Detail

ShellCommandRegistry

public ShellCommandRegistry()
Creates a new AIMLProcessorRegistry, with no additional commands.

Method Detail

getHandlerFor

public ShellCommand getHandlerFor(java.lang.String commandLine)
                           throws NoSuchCommandException
Parameters:
commandLine - the command line to be processed
Returns:
the ShellCommand associated with the given command string
Throws:
NoSuchCommandException - if no matching ShellCommand is available

getValues

public java.util.Collection<ShellCommand> getValues()
Returns:
the values stored in this map