|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.toolforge.karma.core.cmd.CommandFactory
This factory is the single resource of Command objects. KarmaRuntimeExceptions are thrown when
something fails.
| Method Summary | |
Command |
getCommand(java.lang.String commandLineString)
Retrieves the correct Command-instance, by looking up the implementation class through
commandLine. |
Command |
getCommand(java.lang.String commandName,
java.lang.String[] arguments)
|
CommandDescriptor |
getCommandDescriptor(java.lang.String commandId)
Retrieves the correct command descriptor either by name or by alias (whichever is passed as a parameter). |
java.util.Collection |
getCommands()
|
static CommandFactory |
getInstance()
Gets the singleton CommandFactory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static CommandFactory getInstance()
throws CommandLoadException
CommandFactory.
CommandFactory instance.
CommandLoadException
public Command getCommand(java.lang.String commandLineString)
throws CommandException
Command-instance, by looking up the implementation class through
commandLine.
commandLineString - Command arguments (e.g. select-manifest -m karma-1.0).
Command object.
CommandException - When a correct command could not be constructed. See
CommandException.INVALID_COMMAND.
public Command getCommand(java.lang.String commandName,
java.lang.String[] arguments)
throws CommandException
CommandExceptionpublic java.util.Collection getCommands()
public CommandDescriptor getCommandDescriptor(java.lang.String commandId)
null if the descriptor could not be found.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||