org.edg.data.util
Class CommandFactory
java.lang.Object
|
+--org.edg.data.util.CommandFactory
- public final class CommandFactory
- extends java.lang.Object
This interface provides a way to create one of a set of pre-configured
commands by specifying its name or shortcut and its arguments.
- Version:
- $ Id:$
- Author:
- James Casey
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandFactory
public CommandFactory(java.lang.String configResource)
throws InvalidConfigurationException,
java.io.FileNotFoundException
createCommand
public CommandBase createCommand(java.lang.String commandName,
java.lang.String[] commandArgs)
throws InvalidConfigurationException,
CommandLineException
- Create a new command object. We assume the command name is an actual
command name, not a shortcut, and that the argument list is not
null
- Parameters:
commandName
- the command namecommandArgs
- it's argument list
- Returns:
- the command object
- Throws:
InvalidConfigurationException
- if a problme exists with the
contents of the configuration file
CommandLineException
- if the command line options are not
specified properly
getConfiguration
public CommandConfiguration getConfiguration()