com.ibm.commerce.approval.commands
Class ApprovalProcessCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.approval.commands.ApprovalProcessCmdImpl
All Implemented Interfaces:
ApprovalProcessCmd, ECCommand, ECTargetableCommand, TaskCommand

public class ApprovalProcessCmdImpl
extends TaskCommandImpl
implements ApprovalProcessCmd

Processes an approval action with respect to the approval records. Approval actions include the approver approving or rejecting or the submitter canceling. The approver may supply an optional comment which will be stored in the approval request's record in the APRVSTATUS table.

Before executing this task command the following sets should be performed:

Behaviour

This command will set up for and call ApprovalProcessRecordsCmd.

See Also:

This command calls the following TaskCommands:

, Serialized Form

Field Summary
protected  java.lang.Integer action
          Requested action
protected  BusinessFlowEventData businessFlowEventData
          Flow event data
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.approval.commands. ApprovalProcessCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ApprovalProcessCmdImpl()
          Default constructor
 
Method Summary
 boolean isReadyToCallExecute()
          Check if the command is ready to be executed.
 void performExecute()
          The main logic.
 void setAction(java.lang.Integer newAction)
          Sets the list of approval status IDs to be acted on.
 void setBusinessFlowEventData(BusinessFlowEventData newBusinessFlowEventData)
          Sets the data structure used to process the approval.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

businessFlowEventData

protected BusinessFlowEventData businessFlowEventData
Flow event data

action

protected java.lang.Integer action
Requested action
Constructor Detail

ApprovalProcessCmdImpl

public ApprovalProcessCmdImpl()
Default constructor
Method Detail

isReadyToCallExecute

public boolean isReadyToCallExecute()
Check if the command is ready to be executed.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
boolean

performExecute

public void performExecute()
                    throws ECException
The main logic. Delegates to the ApprovalProcessRecordsCmd to process the approval.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException.
ECException

setAction

public void setAction(java.lang.Integer newAction)
Sets the list of approval status IDs to be acted on.
Specified by:
setAction in interface ApprovalProcessCmd
Parameters:
newAction - The type of approval action beign taken: approve, reject, or cancel (represented by integers)

setBusinessFlowEventData

public void setBusinessFlowEventData(BusinessFlowEventData newBusinessFlowEventData)
Sets the data structure used to process the approval.
Specified by:
setBusinessFlowEventData in interface ApprovalProcessCmd
Parameters:
newBusinessFlowEventData - The data for the event representing the approval action.