findConsoleCommand(String commandLine, Hashtable hashCommands) Find the ConsoleCommand based on the name of the command
from the commandLine in the hashCommands.
loadCommandsFromProperties(String moduleID) Extracts the commands from the command properties file as a single
String containing a list of comma-separated command classes.
Creates a new AbstractConsoleModule.java object
Parameters: console - to refer from
Method Detail
addCommands
protected void addCommands(String[] commandClasses, Set commands)(Code)
Add commands to this module. Commands instances are created by reflection
based on the command class names passed in parameter
Parameters: commandClasses - a String[] containing the class names of the commandto instantiate Parameters: commands - Set where the commands are added
Find the ConsoleCommand based on the name of the command
from the commandLine in the hashCommands. If
more than one ConsoleCommand's command name start the same
way, return the ConsoleCommand with the longest one.
Parameters: commandLine - the command line to handle Parameters: hashCommands - the list of commands available for this module the ConsoleCommand corresponding to the name of thecommand from the commandLine or nullif there is no matching
Returns an unique ID which identifies the module. This value is used to
identify the commands to load for this given module.
an unique String which identifies the module
Handle module command
Parameters: commandLine - the command line to handle Parameters: hashCommands - the list of commands available for this module throws: Exception - if fails *
Extracts the commands from the command properties file as a single
String containing a list of comma-separated command classes.
Parameters: moduleID - module ID used as the key in the properties file a single String containing a list of comma-separatedcommand classes corresponding to the module identified by
Parses a String representing a list of command classes (separated by
commas) and returns an String[] representing the command classes
Parameters: commandClassesAsString - a String representing a list of commandclasses (separated by commas) a (eventually empty) String[] where each String represents acommand class