public class CouponDSSTaskCmdImpl extends TaskCommandImpl implements CouponDSSTaskCmd
This task command is called from the CouponDSSCmd when user selects a set of
eCoupons to be used on a set of items in her order.
First the eCoupons with selection status whether SELECTED or not is checked and it shouldn't have a
common item in their itemlist where the itemlist is obtained from the parameter itemFor<cpwalletIds> if
specified or from TempCouponItemMapAccessBean otherwise. This is done for all non order level
coupons. Also only one order level eCoupon can be selected per order.
If the above conditions are satisfied, the selected eCoupons are moved from
TempOrderCouponMapAccessBean to OrderCouponMapAccessBean and the unselected eCoupons
are to deleted from TempOrderCouponMapAccessBean. Also the selected items are moved
from TempCouponItemMapAccessBean to CouponItemMapAccessBean.
defaultCommandClassName, Name| Constructor and Description |
|---|
CouponDSSTaskCmdImpl()
Deprecated.
CouponDSSCmdImpl constructor, call super.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeItemAndDiscount()
Deprecated.
Finds the items and discount on those corresponding to each cpwalletId.
|
java.util.Hashtable |
getConflicts()
Deprecated.
Returns the conflict hashtable.
|
java.lang.Long[] |
getCouponId()
Deprecated.
Gets the coupon IDs.
|
java.util.Hashtable |
getItemsSelected()
Deprecated.
Gets the items that were selected for the coupons to be applied on.
|
int |
getNumCoupons()
Deprecated.
Gets the number of coupons.
|
java.lang.Long |
getOrderId()
Deprecated.
Gets the order ID.
|
TypedProperty |
getReqProp()
Deprecated.
Gets the request properties.
|
TypedProperty |
getRspProp()
Deprecated.
Gets the response properties.
|
java.util.Vector |
getUnQualifiedCoupons()
Deprecated.
Gets the IDs of the unqualified coupons.
|
boolean |
isReadyToCallExecute()
Deprecated.
It always returns true.
|
boolean |
isValidSelection()
Deprecated.
Returns whether the selection is valid or not.
|
void |
performExecute()
Deprecated.
First the eCoupons with selection status whether SELECTED or not is checked and it shouldn't have a
common item in their itemlist where the itemlist is obtained from the parameter itemFor<cpwalletIds> if
specified or from
TempCouponItemMapAccessBean otherwise. |
void |
setConflicts(java.util.Hashtable newConflicts)
Deprecated.
Sets the conflict variable.
|
void |
setCouponId(java.lang.Long[] newCouponId)
Deprecated.
Sets the ecoupon IDs.
|
void |
setItemsSelected(java.util.Hashtable newItemsSelected)
Deprecated.
Sets the items that were selected for the coupons to be applied on.
|
void |
setNumCoupons(int newNumCoupons)
Deprecated.
Sets the number of coupons.
|
void |
setOrderId(java.lang.Long newOrderId)
Deprecated.
Sets the order ID.
|
void |
setValidSelection(boolean newValidSelection)
Deprecated.
Sets valid selection.
|
void |
transferFromTemp()
Deprecated.
Transfer the entries from
TempOrderCouponMapAccessBean
and TempCouponItemMapAccessBean to the
OrderCouponMapAcessBean and CouponItemMapAcessBean. |
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, 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 CouponDSSTaskCmdImpl()
public void computeItemAndDiscount()
throws ECSystemException
ECSystemExceptionpublic java.util.Hashtable getConflicts()
getConflicts in interface CouponDSSTaskCmdpublic java.lang.Long[] getCouponId()
public java.util.Hashtable getItemsSelected()
public int getNumCoupons()
getNumCoupons in interface CouponDSSTaskCmdpublic java.lang.Long getOrderId()
public TypedProperty getReqProp()
public TypedProperty getRspProp()
public java.util.Vector getUnQualifiedCoupons()
getUnQualifiedCoupons in interface CouponDSSTaskCmdpublic boolean isReadyToCallExecute()
isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandpublic boolean isValidSelection()
isValidSelection in interface CouponDSSTaskCmdpublic void performExecute()
throws ECException
First the eCoupons with selection status whether SELECTED or not is checked and it shouldn't have a
common item in their itemlist where the itemlist is obtained from the parameter itemFor<cpwalletIds> if
specified or from TempCouponItemMapAccessBean otherwise. This is done for all non order level
coupons. Also only one order level eCoupon can be selected per order.
If the above conditions are satisfied, the selected eCoupons are moved from
TempOrderCouponMapAccessBean to OrderCouponMapAccessBean and the unselected eCoupons
are to deleted from TempOrderCouponMapAccessBean. Also the selected items are moved
from TempCouponItemMapAccessBean to CouponItemMapAccessBean.
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void setConflicts(java.util.Hashtable newConflicts)
newConflicts - the hashtable containing conflict information.public void setCouponId(java.lang.Long[] newCouponId)
setCouponId in interface CouponDSSTaskCmdnewCouponId - the coupon IDs.public void setItemsSelected(java.util.Hashtable newItemsSelected)
setItemsSelected in interface CouponDSSTaskCmdnewItemsSelected - hashtable of items being used for coupons.public void setNumCoupons(int newNumCoupons)
newNumCoupons - the number of coupons.public void setOrderId(java.lang.Long newOrderId)
setOrderId in interface CouponDSSTaskCmdnewOrderId - the order ID.public void setValidSelection(boolean newValidSelection)
newValidSelection - true if the selection is valid.public void transferFromTemp()
throws ECSystemException
Transfer the entries from TempOrderCouponMapAccessBean
and TempCouponItemMapAccessBean to the
OrderCouponMapAcessBean and CouponItemMapAcessBean.
: - com.ibm.commerce.exception.ECException.ECSystemExceptionpublic void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECException