Structured Text Toolkit

com.saelist.command
Class AbstractCommand

java.lang.Object
  extended bycom.saelist.command.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
FindFilesCommand, ReplaceCommand, SmtpCommand, TransformCommand

public abstract class AbstractCommand
extends java.lang.Object
implements Command

Provides a basic implementation for Commands. It accepts a set of arguments which is takes to be name=value pairs in the root of the configuration. If name starting with @ will be taken to be the path to a file with additional configuration. [[ The combinde configuration structure is validated against the schema return be getSchema(). The basic implementation of getSchema() assumes a schema file with the name [classname].schema.ls.txt. Descendants can override that. ]]


Field Summary
protected  Pair config
           
protected static Logger logger
           
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
 void setArg(java.lang.String arg)
           
 void setArgs(java.lang.String[] args)
           
 void undo()
           
 boolean undoable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.saelist.command.Command
execute
 

Field Detail

logger

protected static Logger logger

config

protected Pair config
Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

setArgs

public void setArgs(java.lang.String[] args)
Specified by:
setArgs in interface Command

setArg

public void setArg(java.lang.String arg)
Specified by:
setArg in interface Command

undo

public void undo()
Specified by:
undo in interface Command

undoable

public boolean undoable()

Structured Text Toolkit