com.ibm.commerce.couponredemption.commands

Class FinalizeCouponUsageCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, FinalizeCouponUsageCmd, CalculationCmd, FinalizeCalculationUsageCmd, 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 FinalizeCouponUsageCmdImpl
    extends CalculationCmdImpl
    implements FinalizeCouponUsageCmd

    This is a task command that is invoked from the ORDERPROCESS command to mark all the eCoupons as unusable that are used in the current order preparation.

    The cpwalletId is found out for the current orderId from the ORCPMAP table. Then for each cpwalletId the number of times this coupon has been used is incremented. If the number of times this coupon has been used has reached the limit specified, then the eCoupon is marked as "Not Usable" in the CouponWalletAccessBean for the current cpwalletId.

    See Also:
    Serialized Form
    • Constructor Detail

      • FinalizeCouponUsageCmdImpl

        public FinalizeCouponUsageCmdImpl()
        FinalizeCouponUsageCmdImpl constructor, calls super().
    • Method Detail

      • reset

        public void reset()
        Resets the command properties. Prepares the command for re-execution.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class CalculationCmdImpl
        See Also:
        Command.reset()
      • getOrder

        public OrderAccessBean getOrder()
        Gets the access bean representing the order.
        Returns:
        access bean representing the order.
      • getOrderItems

        public OrderItemAccessBean[] getOrderItems()
        Gets the access bean representing the order items.
        Returns:
        Array of access beans representing the order items.
      • performExecute

        public void performExecute()
                            throws ECException
        Deprecated. The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.

        The cpwalletId is found out for the current orderId from ORCPMAP table. Then for each cpwalletId the number of time this coupon has been used is increamented. If the number of times this coupon has been used has reached the limit specified, then th eCoupon is marked as "Not Usable" in the CouponWalletAccessBean for the current cpwalletId.

        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        : - com.ibm.commerce.exception.ECException.
        ECException