com.ibm.commerce.me.commands

Class CheckBatchOrderRequestCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckBatchOrderRequestCmd, 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


    public class CheckBatchOrderRequestCmdImpl
    extends TaskCommandImpl
    implements CheckBatchOrderRequestCmd
    This is a task command that checks whether the OrderRequest message from the Procurement system is a duplicate of a previous request.
    See Also:
    Serialized Form
    • Constructor Detail

      • CheckBatchOrderRequestCmdImpl

        public CheckBatchOrderRequestCmdImpl()
        The CheckPurchaseOrderCmdImpl default constructor, calls its parents constructor.
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        This method gets the errorCode.
        Specified by:
        getErrorCode in interface CheckBatchOrderRequestCmd
        Returns:
        Status code indicating the reason of failure
      • getStatus

        public com.ibm.commerce.me.common.Status getStatus()
        This method gets the status of execution for this command.
        Specified by:
        getStatus in interface CheckBatchOrderRequestCmd
        Returns:
        Status object encapsulating the execution result. This can be either Status.STATUS_OK or Status created by ErrorConstants.DUPLICATE_ORDER
      • performExecute

        public void performExecute()
                            throws ECException
        This method is the business logic for this task command. To see the details of the logic see the comments for the class. This methods uses the OrderMessagingExtensionAccessBean to find any order having the provided payload ID. If any entries are found, it creates a Status class instance using ErrorConstants.DUPLICATE_ORDER as status code. If the EJB catches any exception, ECException is thrown.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException.
        ECException
      • setMessageId

        public void setMessageId(java.lang.String messageId)
        This method sets the Message ID (payload ID).
        Specified by:
        setMessageId in interface CheckBatchOrderRequestCmd
        Parameters:
        messageId - (Payload ID) used to check for duplicate orders