java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.couponredemption.commands.CheckValidityCmdImpl
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.
Field Summary | |
protected java.lang.Long[] | bcIds The IDs of the coupons to be applied to this order |
protected java.sql.Timestamp | currentTimeStamp The current system time. |
protected TypedProperty | inParam The request properties. |
protected TypedProperty | outParam The response properties. |
protected TypedProperty | reqParam The request properties. |
protected boolean[] | validCoupons The nth element denotes if the nth coupon is applicable. |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.couponredemption.commands.CheckValidityCmd |
defaultCommandClassName, Name |
Fields inherited from interface com.ibm.commerce.command.ECCommand |
defaultCommandClassName |
Constructor Summary | |
CheckValidityCmdImpl() CheckValidityCmdImpl constructor, call super. |
Method Summary | |
java.lang.Long[] | getBcIds() Gets the eCoupon IDs. |
java.sql.Timestamp | getCurrentTimeStamp() Gets the current timestamp. |
TypedProperty | getRequestProperties() Gets the request properties. |
TypedProperty | getResponseProperties() Gets the response properties. |
boolean[] | getValidCoupons() Gets the array indicating whether the Coupons are valid or not. |
void | performExecute() For each cpwalletId the cppmnId is found out. |
void | setBcIds(java.lang.Long[] newBcIds) Sets eCoupon IDs. |
void | setCurrentTimeStamp(java.sql.Timestamp newCurrentTimeStamp) Sets current time. |
void | setRequestProperties(TypedProperty param) Sets the request properties. |
void | setValidCoupons(boolean[] newValidCoupons) Sets valid eCoupons. |
void | validateParameters() Checks the parameters. |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TypedProperty outParam
protected TypedProperty reqParam
protected java.lang.Long[] bcIds
protected java.sql.Timestamp currentTimeStamp
protected TypedProperty inParam
protected boolean[] validCoupons
Constructor Detail |
public CheckValidityCmdImpl()
Method Detail |
public java.lang.Long[] getBcIds()
public java.sql.Timestamp getCurrentTimeStamp()
public TypedProperty getRequestProperties()
public TypedProperty getResponseProperties()
public boolean[] getValidCoupons()
public void performExecute() throws ECException
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.
public void setBcIds(java.lang.Long[] newBcIds)
public void setCurrentTimeStamp(java.sql.Timestamp newCurrentTimeStamp)
public void setRequestProperties(TypedProperty param)
public void setValidCoupons(boolean[] newValidCoupons)
public void validateParameters() throws ECException
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.