com.ibm.commerce.couponredemption.commands

Class CheckValidityCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckValidityCmd, 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

    Deprecated. 
    The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.

    public class CheckValidityCmdImpl
    extends TaskCommandImpl
    implements CheckValidityCmd

    The purpose of this command is to check each of the eCoupons for expiry and put the information in expired variable which is used by the calling commands.

    For each cpwalletId the cppmnId is found out. Then the endDate is found out corresponding to this coupon promotion and if this endDate is after the current time, the coupon is not expired. These above steps are performed for each cpwalletId. This command uses CouponWalletAccessBean and CouponPromotionAccessBean.

    See Also:
    Serialized Form
    • Constructor Detail

      • CheckValidityCmdImpl

        public CheckValidityCmdImpl()
        Deprecated. 
        CheckValidityCmdImpl constructor, call super.
    • Method Detail

      • getBcIds

        public java.lang.Long[] getBcIds()
        Deprecated. 
        Gets the eCoupon IDs.
        Returns:
        the coupon IDs to be checked for validity.
      • getCurrentTimeStamp

        public java.sql.Timestamp getCurrentTimeStamp()
        Deprecated. 
        Gets the current timestamp.
        Returns:
        the cuurent time.
      • getRequestProperties

        public TypedProperty getRequestProperties()
        Deprecated. 
        Gets the request properties.
        Returns:
        the request properties.
      • getValidCoupons

        public boolean[] getValidCoupons()
        Deprecated. 
        Gets the array indicating whether the Coupons are valid or not.
        Specified by:
        getValidCoupons in interface CheckValidityCmd
        Returns:
        array whose nth element indicates if the nth coupon is valid
      • performExecute

        public void performExecute()
                            throws ECException
        Deprecated. 

        For each cpwalletId the cppmnId is found out. Then the endDate is found out corresponding to this coupon promotion and if this endDate is after the current time, the coupon is not expired. These above steps are performed for each 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
      • setBcIds

        public void setBcIds(java.lang.Long[] newBcIds)
        Deprecated. 
        Sets eCoupon IDs.
        Specified by:
        setBcIds in interface CheckValidityCmd
        Parameters:
        paramBcId - The coupons to be checked for validity
      • setCurrentTimeStamp

        public void setCurrentTimeStamp(java.sql.Timestamp newCurrentTimeStamp)
        Deprecated. 
        Sets current time.
        Parameters:
        newCurrentTimeStamp - the current timestamp.
      • setValidCoupons

        public void setValidCoupons(boolean[] newValidCoupons)
        Deprecated. 
        Sets valid eCoupons.
        Parameters:
        newValidCoupons - array whose nth element indicates if the nth coupon is valid