com.ibm.commerce.approval.commands
Class ApprovalSetUpCmdImpl

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

public class ApprovalSetUpCmdImpl
extends TaskCommandImpl
implements ApprovalSetUpCmd

Set up for an action needing approval

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

After executing this task command, the following should be called:

Behaviour

This command will set up for and call the ApprovalSetUpRecordsCmd.

See Also:

This command calls the following TaskCommands:

, Serialized Form

Field Summary
protected  java.lang.String approverGroupName
          Approval group name.
protected  BusinessFlowEventData businessFlowEventData
          Flow event data.
protected  java.lang.Long businessFlowStateId
          Flow state id.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
protected  java.lang.String eventIdentifier
          Event identifier.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.approval.commands. ApprovalSetUpCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ApprovalSetUpCmdImpl()
          Default constructor.
 
Method Summary
 java.lang.String getEventIdentifier()
          Get the event that needs to be processed when an automatic approval is required.
 boolean isApprovalNeeded()
          Specifies whether or not an approval is needed.
 boolean isReadyToCallExecute()
          Check if the command is ready to be executed.
 void performExecute()
          The main logic.
 void setApproverGroupName(java.lang.String newApproverGroupName)
          Sets the approver group name from which the approvers are to be derived.
 void setBusinessFlowEventData(BusinessFlowEventData newBusinessFlowEventData)
          Sets the data related to the business flow event.
 void setBusinessFlowStateId(java.lang.Long newBusinessFlowStateId)
          Sets the state of the business flow for this approvable action.
 
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

eventIdentifier

protected java.lang.String eventIdentifier
Event identifier.

approverGroupName

protected java.lang.String approverGroupName
Approval group name.

businessFlowEventData

protected BusinessFlowEventData businessFlowEventData
Flow event data.

businessFlowStateId

protected java.lang.Long businessFlowStateId
Flow state id.
Constructor Detail

ApprovalSetUpCmdImpl

public ApprovalSetUpCmdImpl()
Default constructor.
Method Detail

getEventIdentifier

public java.lang.String getEventIdentifier()
Get the event that needs to be processed when an automatic approval is required.
Specified by:
getEventIdentifier in interface ApprovalSetUpCmd
Returns:
The event identifier of an automatic approval that needs to be processed because of the lack of an approval member group

isApprovalNeeded

public boolean isApprovalNeeded()
Specifies whether or not an approval is needed. If false, then an automatic approval can be performed.
Specified by:
isApprovalNeeded in interface ApprovalSetUpCmd
Returns:
true if an approval is needed; false if the action should be automatically approved

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.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException.
ECException

setApproverGroupName

public void setApproverGroupName(java.lang.String newApproverGroupName)
Sets the approver group name from which the approvers are to be derived.
Specified by:
setApproverGroupName in interface ApprovalSetUpCmd
Parameters:
newApproverGroupName - The approval member group name from which the approvers are chosen

setBusinessFlowEventData

public void setBusinessFlowEventData(BusinessFlowEventData newBusinessFlowEventData)
Sets the data related to the business flow event.
Specified by:
setBusinessFlowEventData in interface ApprovalSetUpCmd
Parameters:
newBusinessFlowEventData - The data included as part of the event

setBusinessFlowStateId

public void setBusinessFlowStateId(java.lang.Long newBusinessFlowStateId)
Sets the state of the business flow for this approvable action.
Specified by:
setBusinessFlowStateId in interface ApprovalSetUpCmd
Parameters:
newBusinessFlowStateId - the state of the business flow for this approvable action