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, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public CheckValidityCmdImpl()
public java.lang.Long[] getBcIds()
public java.sql.Timestamp getCurrentTimeStamp()
public TypedProperty getRequestProperties()
public TypedProperty getResponseProperties()
getResponseProperties
in interface CheckValidityCmd
public boolean[] getValidCoupons()
getValidCoupons
in interface CheckValidityCmd
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.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
com.ibm.commerce.exception.ECException.
ECException
public void setBcIds(java.lang.Long[] newBcIds)
setBcIds
in interface CheckValidityCmd
paramBcId
- 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 CheckValidityCmd
param
- 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 ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException