com.ibm.commerce.approval.commands

Class ApproversNotifyCmdImpl

  • 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.ApproversNotifyCmdImpl
  • All Implemented Interfaces:
    ApproversNotifyCmd, 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 ApproversNotifyCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements ApproversNotifyCmd
    The task command implementation to notify approvers of the request for approval. Before executing this task command, the following sets should be performed:
  • setEntityId()
  • setFlowTypeId()
  • Behaviour

  • validateParameters() is called prior to this method to verify input.
  • Obtains Approver MemberIDs from Approval Status Records
  • For each Approver:
  • Determines preferred language (default is store language).
  • Generates Message Subject in preferred language (from ApprovalNotification Properties file)
  • Creates, Populates and Executes SendMsgCmd
  • This command calls the following TaskCommands:

    • SendMsgCmd

    This command uses the following AccessBeans:

    • LanguageAccessBean
    • StoreAccessBean
    • UserAccessBean
    • ApprovalStatusAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getEntityId()
      Gets the entity ID.
      java.lang.Long getFlowId()
      Gets the flow ID.
      java.lang.Long getFlowTypeId()
      Gets the flow type ID.
      void performExecute()
      Determines recipients and calls SendMsgCmd to create notification messages.
      void setEntityId(java.lang.Long lngEntityId)
      Sets the entity ID.
      void setFlowId(java.lang.Long lngFlowId)
      Sets the flow ID.
      void setFlowTypeId(java.lang.Long lngFlowTypeId)
      Sets the flow type ID.
      void validateParameters()
      Verifies that the entity ID and flow ID have been provided.
      • 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, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • 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
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • ERRTASK_NAME

        public static final java.lang.String ERRTASK_NAME
        Error task name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ApproversNotifyCmdImpl

        public ApproversNotifyCmdImpl()
    • Method Detail

      • getEntityId

        public java.lang.Long getEntityId()
        Gets the entity ID.
        Returns:
        EntityID
      • getFlowId

        public java.lang.Long getFlowId()
        Gets the flow ID.
        Returns:
        FlowID
      • getFlowTypeId

        public java.lang.Long getFlowTypeId()
        Gets the flow type ID.
        Returns:
        FlowTypeID
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Determines recipients and calls SendMsgCmd to create notification messages.

        validateParameters() is called prior to this method to verify input.

        Obtains Approver MemberIDs from Approval Status Records

        For each Approver:

        Determines preferred language (default is store language).

        Generates Message Subject in preferred language (from ApprovalNotification Properties file)

        Creates, Populates and Executes SendMsgCmd

        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException
      • setEntityId

        public void setEntityId(java.lang.Long lngEntityId)
        Sets the entity ID.
        Specified by:
        setEntityId in interface ApproversNotifyCmd
        Parameters:
        lngEntityId -
      • setFlowId

        public void setFlowId(java.lang.Long lngFlowId)
        Sets the flow ID.
        Specified by:
        setFlowId in interface ApproversNotifyCmd
        Parameters:
        lngFlowId -
      • setFlowTypeId

        public void setFlowTypeId(java.lang.Long lngFlowTypeId)
        Sets the flow type ID.
        Specified by:
        setFlowTypeId in interface ApproversNotifyCmd
        Parameters:
        lngFlowTypeId -
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Verifies that the entity ID and flow ID have been provided.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - If an error is found while verifying parameters.