com.ibm.commerce.approval.commands

Class ApprovalSetUpCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.approval.commands.ApprovalSetUpCmdImpl
  • All Implemented Interfaces:
    ApprovalSetUpCmd, com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ApprovalSetUpCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements ApprovalSetUpCmd
    Set up for an action needing approval

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

  • setApproverGroupName()
  • setBusinessFlowEventData()
  • After executing this task command, the following should be called:

  • isApprovalNeeded()
  • getEventIdentifier()
  • Behaviour

    This command will set up for and call the ApprovalSetUpRecordsCmd.

See Also:

This command calls the following TaskCommands:

    • Constructor Summary

      Constructors 
      Constructor and Description
      ApprovalSetUpCmdImpl()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • 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 com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        boolean
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        The main logic.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        ECException.
        com.ibm.commerce.exception.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