com.notuvy.cmd
Class CommandAction

java.lang.Object
  extended by com.notuvy.cmd.CommandAction
Direct Known Subclasses:
Command, CommandSet

public abstract class CommandAction
extends Object

The generic definition of a command action. A command (or command subset) needs to be able to list its name (key), list its usage, and to process arguments. User: murali Date: Jan 2, 2008 Time: 2:09:44 PM


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Method Summary
protected  String constructParentCommands()
           
protected  String getKey()
           
protected  CommandAction getParent()
           
protected abstract  boolean handle(CommandArgs pArgs)
           
 boolean isTerminated()
           
protected abstract  List<String> listCommands()
           
 boolean process(CommandArgs pArgs)
           
 boolean process(String[] pStringArgs)
           
protected  void setParent(CommandAction pParent)
           
 void setTerminated(boolean pTerminated)
           
protected abstract  String toUsageString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Method Detail

getKey

protected String getKey()

getParent

protected CommandAction getParent()

isTerminated

public boolean isTerminated()

setParent

protected void setParent(CommandAction pParent)

setTerminated

public void setTerminated(boolean pTerminated)

listCommands

protected abstract List<String> listCommands()

handle

protected abstract boolean handle(CommandArgs pArgs)

toUsageString

protected abstract String toUsageString()

constructParentCommands

protected String constructParentCommands()

process

public boolean process(String[] pStringArgs)

process

public boolean process(CommandArgs pArgs)


Copyright © 2013. All Rights Reserved.