Class DoRefundCmdImpl

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


    public class DoRefundCmdImpl
    extends TaskCommandImpl
    implements DoRefundCmd
    Default DoRefund task command implementation.

    This command handles the refund for the given order and Return Merchandise Authorization (RMA).


    Parameter Name Type Descriptions
    abRMA RMAAccessBean The RMAAccessBean for the Return Merchandise Authorization (RMA) record
    abOrder OrderAccessBean The OrderAccessBean of the order associated with the RMA
    bdRefundAmount BigDecimal The amount of the refund in the currency specified in the RMA
    nReturnPolicyId Long The ID of the Return Business Policy


    • Calls the UpdateTARefund Task command to update the Refund records of the Trading Agreement.
    • Calls the CreditAccount command to debit the account through an external Accounting System.
    • Finally, calls the RefundPaymentPolicy specified by the nReturnPolicyId. (The RefundPaymentPolicyCmd Command will in turn call the DoRefundPolicy Command with the appropriate Payment Policy ID.)

    Error View Name:

    • DoRefundErrorView


    • (Include error codes from the other subordinate commands)

    This command uses the following AccessBeans:

    This command calls the following TaskCommands:

    This command calls the following BusinessPolicyCommands:

    See Also:
    Serialized Form
    • Constructor Detail

      • DoRefundCmdImpl

        public DoRefundCmdImpl()
    • Method Detail

      • 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
        isReadyToCallExecute in class AbstractECTargetableCommand
        true if we can execute the command; false otherwise.
      • reset

        public void reset()
        Resets the instance variables of the command. The reset() method will reset all instance variables. If the command includes any output values that are accessible via getters, then make sure those values are no longer needed before calling this method to reset the instance variables of the command.

        This is useful if the command instance is to be called multiple times with different command parameters.

        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setOrder

        public void setOrder(OrderAccessBean ab)
        Sets the order property of the command.
        Specified by:
        setOrder in interface DoRefundCmd
        ab - the OrderAccessBean representing the Order associated with the Return Merchandise Authorization.
      • setRefundAmount

        public void setRefundAmount(java.math.BigDecimal refundAmount)
        Sets the refundAmount property of the command.
        Specified by:
        setRefundAmount in interface DoRefundCmd
        refundAmount - the amount to be refunded in the currency specified in in the Return Merchandise Authorization
      • setReturnPolicyId

        public void setReturnPolicyId(java.lang.Long nReturnPolicyId)
        Sets the returnPolicyId property of the command.
        Specified by:
        setReturnPolicyId in interface DoRefundCmd
        nReturnPolicyId - the Return Policy ID for this refund
      • setRMA

        public void setRMA(RMAAccessBean ab)
        Sets the Return Merchandise Authorization record that authorizes the return of the merchandise.
        Specified by:
        setRMA in interface DoRefundCmd
        ab - the RMAAccessBean for the Return Merchandise Authorization record