com.ibm.commerce.approval.commands

Class ApprovalSetUpRecordsCmdImpl

  • 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.ApprovalSetUpRecordsCmdImpl
  • All Implemented Interfaces:
    ApprovalSetUpRecordsCmd, 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 ApprovalSetUpRecordsCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements ApprovalSetUpRecordsCmd
    Set up for an action needing approval

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

  • setApproverGroupName()
  • either setApproverOrgId() or setUserIdFromApproverOrg()
  • setBusinessEntityId()
  • setBusinessFlowId()
  • setBusinessFlowTypeId()
  • After executing this task command, the following should be called:

  • isApprovalNeeded()
  • getEventIdentifier()
  • Behaviour

    This command will create one APRVSTATUS record for each potential approver of the action.

See Also:

This command calls the following TaskCommands:,

This command uses the following Access Beans:, OrganizationAccessBean, MemberGroupAccessBean, UserAccessBean,

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getEventIdentifier()
      Gets the event identifier.
      boolean isApprovalNeeded()
      Specifies whether or not 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 setApproverOrgId(java.lang.Long newApproverOrgId)
      Sets the ID of the organization that needs to do the approval.
      void setBusinessEntityId(java.lang.Long newBusinessEntityId)
      The ID of the object being acted on.
      void setBusinessFlowId(java.lang.Long newBusinessFlowId)
      Sets the flow being used for this approval process.
      void setBusinessFlowStateId(java.lang.Long newBusinessFlowStateId)
      Sets the state of the business flow for this approvable action.
      void setBusinessFlowTypeId(java.lang.Long newBusinessFlowTypeId)
      Sets the ID of the type of business flow for the approvable action.
      void setUserIdFromApproverOrg(java.lang.Long newUserIdFromApproverOrg)
      Sets the ID of a user from the organization that needs to do 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

      • ApprovalSetUpRecordsCmdImpl

        public ApprovalSetUpRecordsCmdImpl()
        Default constructor
    • Method Detail

      • isApprovalNeeded

        public boolean isApprovalNeeded()
        Specifies whether or not approval is needed.
        Specified by:
        isApprovalNeeded in interface ApprovalSetUpRecordsCmd
        Returns:
        true if eventIdentifier is null, false otherwise.
      • 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 ApprovalSetUpRecordsCmd
        Parameters:
        newApproverGroupName - The approval member group name from which the approvers are chosen
      • setApproverOrgId

        public void setApproverOrgId(java.lang.Long newApproverOrgId)
        Sets the ID of the organization that needs to do the approval.
        Specified by:
        setApproverOrgId in interface ApprovalSetUpRecordsCmd
        Parameters:
        newApproverOrgId - The organization which may need to approve
      • setBusinessEntityId

        public void setBusinessEntityId(java.lang.Long newBusinessEntityId)
        The ID of the object being acted on.
        Specified by:
        setBusinessEntityId in interface ApprovalSetUpRecordsCmd
        Parameters:
        newBusinessEntityId - The entity on which the approval is being requested
      • setBusinessFlowId

        public void setBusinessFlowId(java.lang.Long newBusinessFlowId)
        Sets the flow being used for this approval process.
        Specified by:
        setBusinessFlowId in interface ApprovalSetUpRecordsCmd
        Parameters:
        newBusinessFlowId - The flow being used for this approval
      • setBusinessFlowStateId

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

        public void setBusinessFlowTypeId(java.lang.Long newBusinessFlowTypeId)
        Sets the ID of the type of business flow for the approvable action.
        Specified by:
        setBusinessFlowTypeId in interface ApprovalSetUpRecordsCmd
        Parameters:
        newBusinessFlowTypeId - The type of flow for this approval
      • setUserIdFromApproverOrg

        public void setUserIdFromApproverOrg(java.lang.Long newUserIdFromApproverOrg)
        Sets the ID of a user from the organization that needs to do the approval.
        Specified by:
        setUserIdFromApproverOrg in interface ApprovalSetUpRecordsCmd
        Parameters:
        newUserIdFromApproverOrg - A user id from organization which may need to approve