com.ibm.commerce.approval.commands

Class ApprovalCheckApproverForEntityCmdImpl

  • 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.ApprovalCheckApproverForEntityCmdImpl
  • All Implemented Interfaces:
    ApprovalCheckApproverForEntityCmd, 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 ApprovalCheckApproverForEntityCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements ApprovalCheckApproverForEntityCmd
    This task command checks whether a user is an approver for a particular submission.

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

  • setFlowType()
  • setApproverId()
  • setBusinessEntityIdentifier()
  • Upon completion of the command, the following should be called to retrieve boolean result

  • isApprover()
  • Behaviour

    This command will check if there is an approval record for the given approver id and entity (flow type + BusinessEntityId).

    This command uses the following AccessBeans:

    • ApprovalStatusAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean isApprover()
      Returns whether or not the user is an approver for this submission.
      boolean isReadyToCallExecute()
      Check if the command is ready to be executed.
      void performExecute()
      The main logic.
      void setApproverId(java.lang.Long newApproverId)
      Sets the ID of a user to check to see if approver of entity.
      void setBusinessEntityId(java.lang.Long newBusinessEntityId)
      Sets the ID of the business entity object for which the approval is being requested.
      void setBusinessFlowTypeIdentifier(java.lang.String newBusinessFlowTypeIdentifier)
      Sets the identifier of the type of business flow for the 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

      • ApprovalCheckApproverForEntityCmdImpl

        public ApprovalCheckApproverForEntityCmdImpl()
        Default constructor
    • Method Detail

      • isApprover

        public boolean isApprover()
        Returns whether or not the user is an approver for this submission.
        Specified by:
        isApprover in interface ApprovalCheckApproverForEntityCmd
        Returns:
        boolean Whether the user is an approver.
      • 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. Checks to see if the specified user is an approver for a particular flow and business entity type.
        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
      • setApproverId

        public void setApproverId(java.lang.Long newApproverId)
        Sets the ID of a user to check to see if approver of entity.
        Specified by:
        setApproverId in interface ApprovalCheckApproverForEntityCmd
        Parameters:
        newApproverId - A user id
      • setBusinessEntityId

        public void setBusinessEntityId(java.lang.Long newBusinessEntityId)
        Sets the ID of the business entity object for which the approval is being requested.
        Specified by:
        setBusinessEntityId in interface ApprovalCheckApproverForEntityCmd
        Parameters:
        newBusinessEntityId - The entity on which the approval is being requested
      • setBusinessFlowTypeIdentifier

        public void setBusinessFlowTypeIdentifier(java.lang.String newBusinessFlowTypeIdentifier)
        Sets the identifier of the type of business flow for the approvable action.
        Specified by:
        setBusinessFlowTypeIdentifier in interface ApprovalCheckApproverForEntityCmd
        Parameters:
        newBusinessFlowTypeIdentifier - The type of flow for this approval