com.ibm.commerce.messaging.commands

Class OrderStatusNotifySendCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, OrderStatusNotifySendCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
    Direct Known Subclasses:
    DOMOrderStatusNotifySendCmdImpl


    public class OrderStatusNotifySendCmdImpl
    extends TaskCommandImpl
    implements OrderStatusNotifySendCmd
    Implementation of the OrderStatusNotifySendCmd interface. This task command sends a notification whenever an order status is processed. When the inventory system is for DOM (Distributed Order Management) system, the notification will be sent only when the message type is OrderStatusNotify_<fulfillment status>.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OrderStatusNotifySendCmdImpl

        public OrderStatusNotifySendCmdImpl()
        The OrderStatusNotifySendCmdImpl constructor calls its parents constructor.
    • Method Detail

      • validateParameters

        public void validateParameters()
                                throws ECException
        This method determines if the order status request properties, which are set by the setOs_prop() method. It also validates if the store ID field has been set using the setStoreID() method. The required attributes are:
        • order status ID, with name equal to OrderFulfillmentStatusConstants.ORDER_STATUS_ID
        • order status items, with name equal to OrderFulfillmentStatusConstants.ITEMS_VECTOR. The type of this attribute is java.util.vector.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with _ERR_CMD_BAD_PARAM_CMD whenever the store ID is null, the order ID is null or the vector of order items is null.
      • getMsgType

        public java.lang.Integer getMsgType()
        Deprecated. This method is replaced by getMsgTypeName().
        This method gets the message type ID.
        Returns:
        The message type ID
      • getMsgTypeName

        public java.lang.String getMsgTypeName()
        This method gets the message type name.
        Returns:
        The message type name
      • getOs_prop

        public TypedProperty getOs_prop()
        This method gets the order status property.
        Returns:
        os_prop The order status property
      • getStoreID

        public java.lang.Integer getStoreID()
        This method gets the store identifier.
        Returns:
        store ID The identifier of the store for which the command is running
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method determines if the command can be executed. This is default implementation.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        False if the parents isReadyToCallExecute() fails, otherwise true.
      • setMsgType

        public void setMsgType(java.lang.Integer newMsgType)
        Deprecated. This method is replaced setMsgTypeName(String).
        This method sets the message type ID.
        Parameters:
        newMsgType - The message type identifier
      • setMsgTypeName

        public void setMsgTypeName(java.lang.String newMsgTypeName)
        This method sets the message type name.
        Parameters:
        newMsgTypeName - The message type name
      • setStoreID

        public void setStoreID(java.lang.Integer new_store_id)
        This method sets the ID of the store for which the command is running.
        Specified by:
        setStoreID in interface OrderStatusNotifySendCmd
        Parameters:
        new_store_id - The store identifier
      • performDOMExecute

        public void performDOMExecute()
                               throws ECException
        Perform DOM integration logic. This implementation sends a notification e-mail for each group of order items those fulfillment statuses have updated using the message type OrderStatusNotify_<fulfillment status>.

        Behavior:

        • Identifies the order items those fulfillment statuses have updated.
        • Groups the order items by fulfillment status.
        • For each group:
          • Sends a notification e-mail to the owner of the order (or its notification ID if specified) using the message type OrderStatusNotify_<fulfillment status> (if it is defined).
        Throws:
        ECException