|
|||||||||||
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 Command
CommandException
public java.lang.String getName()
getName
in interface Command
public java.lang.String getAlias()
getAlias
in interface Command
public java.lang.String getDescription()
getDescription
in interface Command
public java.lang.String getHelp()
getHelp
in interface Command
getDescription()
.{@link #getDescription}
public void cleanUp()
cleanUp
in interface Command
public void setContext(CommandContext context)
Command
CommandContext
.
setContext
in interface Command
context
- An initialized command context.public void setCommandLine(org.apache.commons.cli.CommandLine commandLine)
setCommandLine
in interface Command
commandLine
- Unused.public org.apache.commons.cli.CommandLine getCommandLine()
null
getCommandLine
in interface Command
null
public final void registerCommandResponseListener(CommandResponseListener responseListener)
Command
CommandResponseListener
as the handler for the command responses.
registerCommandResponseListener
in interface Command
responseListener
- public final void deregisterCommandResponseListener(CommandResponseListener responseListener)
Command
CommandResponseListener
.
deregisterCommandResponseListener
in interface Command
public CommandResponse getCommandResponse()
Command
CommandResponse
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 |