| java.lang.Object org.openharmonise.rm.commands.AbstractCmd
All known Subclasses: org.openharmonise.rm.commands.CmdGetPendingVersions, org.openharmonise.rm.commands.CmdChangeStatus, org.openharmonise.rm.commands.CmdClearCache, org.openharmonise.rm.commands.CmdGetHistoricalVersions, org.openharmonise.rm.commands.CmdMove, org.openharmonise.rm.commands.CmdReactivate, org.openharmonise.rm.commands.CmdArchive, org.openharmonise.rm.commands.CmdGetLiveVersion, org.openharmonise.rm.commands.CmdGenerateReport, org.openharmonise.rm.commands.CmdUnlock, org.openharmonise.rm.commands.CmdLock, org.openharmonise.rm.commands.CmdEmail, org.openharmonise.rm.commands.CmdSave,
AbstractCmd | abstract public class AbstractCmd (Code) | | An abstract class which provides the base functionality and sets the main
interface for a class which can execute an operation with in the Harmonise
framework, possibly on a specified 'command object'. Role based security
and event logging are implemented in Harmonise through the command objects.
author: Michael Bell version: $Revision: 1.4 $ |
PARAM_OUT_TEXT | final public static String PARAM_OUT_TEXT(Code) | | Output text parameter name
|
PARAM_TEMPLATE_ID | final public static String PARAM_TEMPLATE_ID(Code) | | Template id parameter name
|
TAG_COMMAND | final public static String TAG_COMMAND(Code) | | Tag name for the element which represents a command
|
TAG_COMMAND_PARAM | final public static String TAG_COMMAND_PARAM(Code) | | Tag name for the 'Parameter' element, used to specify parameters to the command
|
m_cmd_params | protected Map m_cmd_params(Code) | | Map of paramter names to values for this command
|
m_commandObj | protected Object m_commandObj(Code) | | Object this command shall execute upon
|
AbstractCmd | public AbstractCmd()(Code) | | Creates new instance of a command object
|
addResultContext | protected void addResultContext(Object result, Context context)(Code) | | Adds the result to the context if the 'result' parameter
exists to give the result a name in the context
Parameters: result - Parameters: context - |
execute | abstract public Object execute(Context context) throws CommandException(Code) | | Excutes command, on command object given if appropriate, and will return the
result of the execution. If there is no result from the execution of the
command it will return a null .
Parameters: context - the result of the execution of the command throws: CommandException - if any errors occur |
getCommandObject | public Object getCommandObject(Context context)(Code) | | Returns the object which this command will be executed on, if appropriate.
Parameters: context - the object which this command will be executed on, if appropriate. |
getDataStoreInteface | public AbstractDataStoreInterface getDataStoreInteface()(Code) | | Returns the data store interface associated to this command.
the data store interface associated to this command. |
getExecutingUser | public User getExecutingUser()(Code) | | Returns the user executing the commands from the State ,
if a State has been given to this command.
the user executing the commands from the State |
getName | abstract public String getName()(Code) | | Returns the name of the command
Name of the command |
getParameter | public String getParameter(String parameter_name)(Code) | | Returns the first value of the parameter of the specified parameter
name
Parameters: parameter_name - the parameter name the first value of the parameter |
getParameters | public List getParameters(String parameter_name)(Code) | | Returns the list of values for the parameter of the specified parameter
name .
Parameters: parameter_name - the parameter name the list of values for the parameter |
getState | public State getState()(Code) | | Returns the State associated to this command.
the State associated to this command. |
isAvailable | public boolean isAvailable(Context context) throws InvalidCommandException(Code) | | Returns true if this command is available to the user
executing the command.
Parameters: context - TODO true if this command is available to the userexecuting the command throws: InvalidCommandException - if an error occurs |
isAvailable | public boolean isAvailable(User usr, Class objClass) throws InvalidCommandException(Code) | | Returns true if this command is available to the
specified user for the specified Class .
Parameters: usr - the User Parameters: objClass - class to be tested true if this command is available to the specified user throws: InvalidCommandException - if an error occurs |
isValidCommandObject | abstract public boolean isValidCommandObject(Object obj)(Code) | | Returns true if this command is valid for the given object.
Parameters: obj - |
setCommandObject | public void setCommandObject(Object obj)(Code) | | Sets the object on which the command will be executed
Parameters: obj - object on which the command will be executed |
setDataStoreInteface | public void setDataStoreInteface(AbstractDataStoreInterface dsi)(Code) | | Sets up an interface to the DB for this command.
Parameters: dsi - the data store interface |
setParameters | public void setParameters(Map cmd_params)(Code) | | Sets the parameters for this command.
Parameters: cmd_params - the parameters for this command |
setState | public void setState(State state)(Code) | | Adds a State object to this command, providing a context for the command
to execute in.
Parameters: state - the state/context for the execution of the command |
|
|