|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.toolforge.karma.core.cmd.KarmaInitializationCommand
Command implementation to initialize a command context. This is implemented as a command to allow for better and more consistent event handling and messaging.
Although not impossible, this command should not be used in a user interface layer.
| Constructor Summary | |
(package private) |
KarmaInitializationCommand(boolean updateStores)
Constructs a KarmaInitializationCommand. |
| Method Summary | |
void |
cleanUp()
Empty implementation. |
void |
deregisterCommandResponseListener(CommandResponseListener responseListener)
Deregister the CommandResponseListener. |
void |
execute()
Initializes a command context. |
java.lang.String |
getAlias()
Returns 'init' as the alias of this command. |
org.apache.commons.cli.CommandLine |
getCommandLine()
Returns null |
CommandResponse |
getCommandResponse()
Return the specific CommandResponse object that this command uses. |
java.lang.String |
getDescription()
Returns the description for this command. |
java.lang.String |
getHelp()
Returns the help text for this command. |
java.lang.String |
getName()
Returns 'init' as the name of this command. |
void |
registerCommandResponseListener(CommandResponseListener responseListener)
Register the given CommandResponseListener as the handler for the command responses. |
void |
setCommandLine(org.apache.commons.cli.CommandLine commandLine)
Empty implementation. |
void |
setContext(CommandContext context)
Stores a reference to a CommandContext. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
KarmaInitializationCommand(boolean updateStores)
KarmaInitializationCommand.
| Method Detail |
public void execute()
throws CommandException
execute in interface CommandCommandExceptionpublic java.lang.String getName()
getName in interface Commandpublic java.lang.String getAlias()
getAlias in interface Commandpublic java.lang.String getDescription()
getDescription in interface Commandpublic java.lang.String getHelp()
getHelp in interface CommandgetDescription().{@link #getDescription}public void cleanUp()
cleanUp in interface Commandpublic void setContext(CommandContext context)
CommandCommandContext.
setContext in interface Commandcontext - An initialized command context.public void setCommandLine(org.apache.commons.cli.CommandLine commandLine)
setCommandLine in interface CommandcommandLine - Unused.public org.apache.commons.cli.CommandLine getCommandLine()
null
getCommandLine in interface Commandnullpublic final void registerCommandResponseListener(CommandResponseListener responseListener)
CommandCommandResponseListener as the handler for the command responses.
registerCommandResponseListener in interface CommandresponseListener - public final void deregisterCommandResponseListener(CommandResponseListener responseListener)
CommandCommandResponseListener.
deregisterCommandResponseListener in interface Commandpublic CommandResponse getCommandResponse()
CommandCommandResponse object that this command uses.
getCommandResponse in interface Command
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||