com.ibm.commerce.couponscheduler.commands
Class SchedCouponCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.couponscheduler.commands.SchedCouponCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, SchedCouponCmd

public class SchedCouponCmdImpl
extends ControllerCommandImpl
implements SchedCouponCmd

The purpose of this controller command is to mark the eCoupon offers and eCoupon wallet entries as EXPIRED depending on the expiry date of the coupon promotion.
For each Coupon Promotion(PROMOID) in CPPMN, the end date is found out. If it is expired, the eCoupon promotion is marked in CPPMN table as EXPIRED corresponding to the PROMOID. The CPWALLET entries are marked as EXPIRED corresponding to this PROMOID.


Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.couponscheduler.commands.SchedCouponCmd
COPYRIGHT, defaultCommandClassName
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
SchedCouponCmdImpl()
          CleanDBCmdImpl constructor call super.
 
Method Summary
 AccessVector getResources()
          It get the resources for the eCoupon promotion.
 boolean isReadyToCallExecute()
          It always return true.
 void performExecute()
          This method marks the eCoupon promotions and eCoupon wallet entries as EXPIRED depending on the expiry date of the coupon promotion.
 void validateParameters()
          Do nothing.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Constructor Detail

SchedCouponCmdImpl

public SchedCouponCmdImpl()
CleanDBCmdImpl constructor call super.
Method Detail

getResources

public AccessVector getResources()
                          throws ECSystemException
It get the resources for the eCoupon promotion.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
com.ibm.commerce.accesscontrol.AccessVector
Throws:
ECSystemException -  

isReadyToCallExecute

public boolean isReadyToCallExecute()
It always return true.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
boolean

performExecute

public void performExecute()
                    throws ECException

This method marks the eCoupon promotions and eCoupon wallet entries as EXPIRED depending on the expiry date of the coupon promotion.
For each Coupon Promotion(PROMOID) in CPPMN for which the end date is before current timestamp, the eCoupon promotion is marked in CPPMN table as EXPIRED corresponding to the PROMOID. The CPWALLET entries are marked as EXPIRED corresponding to this PROMOID.

Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If a problem is encountered while creating or finding an EJB

validateParameters

public void validateParameters()
                        throws ECException
Do nothing.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException -