Class CheckBatchOrderRequestCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, CheckBatchOrderRequestCmd,,,,,,

    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
        Status code indicating the reason of failure
      • getStatus

        public getStatus()
        This method gets the status of execution for this command.
        Specified by:
        getStatus in interface CheckBatchOrderRequestCmd
        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
        performExecute in class AbstractECTargetableCommand
      • setMessageId

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