com.ibm.commerce.returns.commands

Class PrimeRefundCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, AEDPTaskCmd, ARefundTaskCmd, PrimeRefundCmd, 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 PrimeRefundCmdImpl
    extends ARefundTaskCmdImpl
    implements PrimeRefundCmd
    This class is the default implementation of the PrimeRefundCmdImpl interface.

    Behaviour

    • If there is a refund for the RMA(Return Merchandise Authorization), then this task command will check if the refund is allowed. If it is, then this task command will create the refund container object and refund instruction in the database. If the refund instruction has existed in the database, this command would delete the old one and create a new one by the new data.
    • This command is called by ReturnProcessCmd when the return is submitted or edited.

    This command utilizes these access beans

    See Also:
    Serialized Form
    • Constructor Detail

      • PrimeRefundCmdImpl

        public PrimeRefundCmdImpl()
        This method is the default constructor of this class.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method executes the command, which creates refund instructions and RMA for Payment Rules in corresponding WebSphere Commerce Payments tables(EDPREFINST and EDPRMA), respectively.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - The WebSphere Commerce specific exception
      • processFG

        public void processFG()
                       throws EDPException,
                              ECException

        This method executes the foreground tasks, which creates the refund data idempotently.

        Throws:
        EDPException - In case of a Payment Rules error
        ECException - In case of an ECException
      • reset

        public void reset()
        This method resets the instance variable of this command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class ARefundTaskCmdImpl
      • getPermissionForRefund

        public java.lang.Boolean getPermissionForRefund(java.lang.Long orderId,
                                                        java.math.BigDecimal localAmount)
                                                 throws EDPException,
                                                        ECException
        This method returns if the refund with specified amount is permitted for current order.
        Parameters:
        orderId - The current order ID
        localAmount - The amount to process in current refund
        Returns:
        Boolean If the refund with specified amount is permitted for current order then returns true, Otherwise returns false.
        Throws:
        EDPException - In case of any Payment Rules exception
        ECException - In case of any ECException