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.
defaultCommandClassName, Name| Constructor and Description |
|---|
CheckValidityCmdImpl()
Deprecated.
CheckValidityCmdImpl constructor, call super.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long[] |
getBcIds()
Deprecated.
Gets the eCoupon IDs.
|
java.sql.Timestamp |
getCurrentTimeStamp()
Deprecated.
Gets the current timestamp.
|
TypedProperty |
getRequestProperties()
Deprecated.
Gets the request properties.
|
TypedProperty |
getResponseProperties()
Deprecated.
Gets the response properties.
|
boolean[] |
getValidCoupons()
Deprecated.
Gets the array indicating whether the Coupons are valid or not.
|
void |
performExecute()
Deprecated.
For each cpwalletId the cppmnId is found out.
|
void |
setBcIds(java.lang.Long[] newBcIds)
Deprecated.
Sets eCoupon IDs.
|
void |
setCurrentTimeStamp(java.sql.Timestamp newCurrentTimeStamp)
Deprecated.
Sets current time.
|
void |
setRequestProperties(TypedProperty param)
Deprecated.
Sets the request properties.
|
void |
setValidCoupons(boolean[] newValidCoupons)
Deprecated.
Sets valid eCoupons.
|
void |
validateParameters()
Deprecated.
Checks the parameters.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic CheckValidityCmdImpl()
public java.lang.Long[] getBcIds()
public java.sql.Timestamp getCurrentTimeStamp()
public TypedProperty getRequestProperties()
public TypedProperty getResponseProperties()
getResponseProperties in interface CheckValidityCmdpublic boolean[] getValidCoupons()
getValidCoupons in interface CheckValidityCmdpublic 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.
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandcom.ibm.commerce.exception.ECException.ECExceptionpublic void setBcIds(java.lang.Long[] newBcIds)
setBcIds in interface CheckValidityCmdparamBcId - The coupons to be checked for validitypublic void setCurrentTimeStamp(java.sql.Timestamp newCurrentTimeStamp)
newCurrentTimeStamp - the current timestamp.public void setRequestProperties(TypedProperty param)
setRequestProperties in interface CheckValidityCmdparam - the request properties.public void setValidCoupons(boolean[] newValidCoupons)
newValidCoupons - array whose nth element indicates if the nth coupon is validpublic void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECException