com.ibm.commerce.approval.commands

Class ApprovalProcessCmdImpl

  • 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.ApprovalProcessCmdImpl
  • All Implemented Interfaces:
    ApprovalProcessCmd, 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 ApprovalProcessCmdImpl
    extends com.ibm.commerce.command.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:

  • setBusinessFlowEventData(): Pass the information about the approval records being worked on
  • setAction(): what type of approval action is being processed: approve, reject, cancel
  • Behaviour

    This command will set up for and call ApprovalProcessRecordsCmd.

See Also:

This command calls the following TaskCommands:, ApprovalProcessRecordsCmd

    • Method Summary

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

      • ApprovalProcessCmdImpl

        public ApprovalProcessCmdImpl()
        Default constructor
    • Method Detail

      • 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. Delegates to the ApprovalProcessRecordsCmd to process the approval.
        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
      • 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:
        action - The type of approval action being 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:
        businessFlowEventData - The data for the event representing the approval action.