com.ail.core.command
Class AbstractCommand

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.command.AbstractCommand
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Accessor, Command

public abstract class AbstractCommand
extends Type

This is the super class of all command objects.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  CommandArg getArgs()
          Get the argument set associated with this command.
abstract  Configuration getConfiguration()
          Fetch the configuration of the entry point associated with this command.
abstract  Version getVersion()
          Fetch the version of the command (entry point) associated with this command.
abstract  void invoke()
          Invoke the command associated with this command object.
abstract  void setArgs(CommandArg that)
          Update this Command object's arguments with those taken from the command arg passed in.
abstract  void setConfiguration(Configuration properties)
          Update the configuration of the entry point associated with this command.
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

setArgs

public abstract void setArgs(CommandArg that)
Update this Command object's arguments with those taken from the command arg passed in. This is in effect a bulk setter. This interface will be implemented by beans that have many more getters/setters to support their properties. The implementations of this method take 'that', and pull all the relevant properties into this.

Parameters:
that - Source for arguments

getArgs

public abstract CommandArg getArgs()
Get the argument set associated with this command.

Returns:
This objects arguments.

invoke

public abstract void invoke()
                     throws BaseException
Invoke the command associated with this command object. Before invoke is called, the command object must be populated with all the information (parameters) needed to invoke the service via the command object's setters. Once invoke has been called, the object's getters are used to retrieve the results.

Throws:
BaseException

getVersion

public abstract Version getVersion()
Fetch the version of the command (entry point) associated with this command. This is similar to the 'invoke' entry point in that control is passed to the entry point object. In this case to the getVersion() method.

Note: This method does not return the version of the command.

Returns:
The version of the entry point.

getConfiguration

public abstract Configuration getConfiguration()
Fetch the configuration of the entry point associated with this command. This is similar to invoke in that control is passed to the entry point object, in this case to the getConfiguration method. Note: This method does not return the configuration of the command object.

Returns:
The entry point's configuration.

setConfiguration

public abstract void setConfiguration(Configuration properties)
Update the configuration of the entry point associated with this command. This is similar to the invoke method in that control is pass to the entry point object, in this case to its setConfiguration method. Note: This method does not set the configuration of the command object.

Parameters:
properties - Properties to replace the current configuration.