com.notuvy.cmd
Class Command
java.lang.Object
com.notuvy.cmd.CommandAction
com.notuvy.cmd.Command
public abstract class Command
- extends CommandAction
A single command performing an actual action. It is subclassed with an implementation of
the process() method.
User: murali
Date: Jan 2, 2008
Time: 2:10:35 PM
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Command
protected Command(String pKey,
String pArgumentsString)
Command
protected Command(String pKey)
getArgumentsString
public String getArgumentsString()
getBody
protected String getBody()
listCommands
public List<String> listCommands()
- Specified by:
listCommands
in class CommandAction
process
public abstract boolean process(CommandArgs pArgs)
- The principle logic of this command.
It must return true if successfully executed, or false if there was a problem and processing must be aborted.
The CommandArgs must be properly managed. It must assert that all the required arguments are present.
- Overrides:
process
in class CommandAction
- Parameters:
pArgs
- The argument available list. Note that it will contain the arguments for this command
plus all follow-on commands and their arguments.
- Returns:
- The status flag; true for success (processing proceeds) and false for failure (processing aborts).
handle
protected boolean handle(CommandArgs pArgs)
- Specified by:
handle
in class CommandAction
toUsageString
public String toUsageString()
- Specified by:
toUsageString
in class CommandAction
Copyright © 2013. All Rights Reserved.