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, 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 CouponDSSTaskCmdImpl()
public void computeItemAndDiscount() throws ECSystemException
ECSystemException
public java.util.Hashtable getConflicts()
getConflicts
in interface CouponDSSTaskCmd
public java.lang.Long[] getCouponId()
public java.util.Hashtable getItemsSelected()
public int getNumCoupons()
getNumCoupons
in interface CouponDSSTaskCmd
public java.lang.Long getOrderId()
public TypedProperty getReqProp()
public TypedProperty getRspProp()
public java.util.Vector getUnQualifiedCoupons()
getUnQualifiedCoupons
in interface CouponDSSTaskCmd
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public boolean isValidSelection()
isValidSelection
in interface CouponDSSTaskCmd
public 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 ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void setConflicts(java.util.Hashtable newConflicts)
newConflicts
- the hashtable containing conflict information.public void setCouponId(java.lang.Long[] newCouponId)
setCouponId
in interface CouponDSSTaskCmd
newCouponId
- the coupon IDs.public void setItemsSelected(java.util.Hashtable newItemsSelected)
setItemsSelected
in interface CouponDSSTaskCmd
newItemsSelected
- 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 CouponDSSTaskCmd
newOrderId
- 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.ECSystemException
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException