com.ibm.commerce.edp.commands

Class CancelOrderCmdImpl

    • Constructor Detail

      • CancelOrderCmdImpl

        public CancelOrderCmdImpl()
    • Method Detail

      • setForcedCancel

        public void setForcedCancel(java.lang.Boolean paramFlag)
        This method sets the forced flag that shows if the cancel request will be forced or not. It is up to the caller to set the forceFlag whether they want to do the a forced request or not.
        Specified by:
        setForcedCancel in interface CancelOrderCmd
        Parameters:
        paramFlag - A Boolean that indicates if the request is forced or not.
      • getForcedCancel

        public java.lang.Boolean getForcedCancel()
        This method returns the forced flag that shows if this request will be forced or not.
        Returns:
        A Boolean that specifies if the request is forced or not.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        A boolean that represents if the command is ready to execute.
      • reset

        public void reset()
        This method resets the command fields. After this method is invoked, and proper attributes are set, the command can be executed again.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AEDPPaymentTaskCmdImpl
      • processBG

        public void processBG()
                       throws EDPException,
                              ECException
        This method actually executes the approve reversal action, and cancels the active payment instructions of current EDP order. Then it cancels current EDP order.
        Throws:
        EDPException
        ECException
      • processFG

        public void processFG()
                       throws ECException,
                              EDPException
        This method is the main method to process the current cancel order request. It firstly checks if current EDP order has been canceled, if it is, directly return. It then checks all atomic payments of current EDP order. And put all those approved atomic payments to the reverse approval list to be reverse approved later. If the reverse approval list is empty and there are no active payment instructions for current EDP order, then cancel this EDP order.
        Throws:
        ECException
        EDPException