Class RefundWithDependentSupportPolicyCmdImpl

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

    public class RefundWithDependentSupportPolicyCmdImpl
    This class is an implementation class of the command RefundByMethodPolicyCmd, which corresponds to the scenarios where payment methods used in placing order can be choosed as the refund method. The command supports both dependent credit and independent credit, and it also supports multiple refund methods.


    • Firstly, this command gets all the payment instructions which were used in placing order,and checks each payment instruction whether it is allowed to refund.
    • For each payment instruction which is allowed to refund, the command checks whether it is dependent required, and gets the refundable amount accordingly.
    • At last, this command composes a refund instruction for each payment instruction whose refundable amount is larger than zero.

    This command is called by PrimeRefundCmd to create refund instruction and refund information in Payment Rules.

    See Also:
    Serialized Form
    • Field Detail


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

      • RefundWithDependentSupportPolicyCmdImpl

        public RefundWithDependentSupportPolicyCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method executes the main business logic of this command.

        This method firstly gets all payment instructions as an ArrayList from the order this RMA corresponds to. And then traverses the ArrayList to get the payment instructions used against the order. For each payment instruction, this method checks whether it is dependent credit required, and composes a new refund instruction with appropriate amount accordingly. Then the method sets the necessary attributes to the new refund instructions, then sets it to the ArrayList. Later PrimeRefundCmd creates the Refund Instruction and refund information of Payment Rules in database according to the Refund Instruction in this ArrayList.

        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
        ECException - In case of any ECException
      • reset

        public void reset()
        This method resets the instance variable of this command.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand