|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.couponredemption.commands.CouponDSSTaskCmdImpl
This task command is called from the COUPONDSSCMD when user selects a set of eCoupons to be used in her order. In case of any conflict among the user selected set of eCoupons, the previous set of eCoupons from CouponWallet is thrown back to user, else the final selection page is displayed with the order prepare button.
The input to this command are :
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 TCPITMAP table. If the number of selected
order eCoupon is not more than one, the complete list of applicable eCoupons is shown to the user again and
asked to reselect.
If the above condition not satisfied, the selected eCoupons are moved to ORCPMAP table from TORCPMAP
table and the unselected eCoupons are to be deleted from TORCPMAP table. The entries corresponding to
selected eCoupons are moved to CPITMAP table from TCPITMAP table and the entries corresponding to unselected
eCoupons are deleted from TCPITMAP table. Then the final eCoupon selection summary page is displayed
with the discounts incorporated.
Field Summary | |
protected java.util.Hashtable |
conflicts
|
protected java.lang.Long[] |
couponId
|
protected java.math.BigDecimal[] |
discAmt
|
protected java.util.Vector[] |
itemList
|
protected int |
numCoupons
|
protected java.lang.Long |
orderId
|
protected CommandContext |
processingContext
|
protected TypedProperty |
reqProp
|
protected TypedProperty |
rspProp
|
protected boolean |
validSelection
|
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.couponredemption.commands.CouponDSSTaskCmd |
COPYRIGHT, defaultCommandClassName, Name |
Constructor Summary | |
CouponDSSTaskCmdImpl()
CouponDSSCmdImpl constructor, call super. |
Method Summary | |
void |
computeItemAndDiscount()
Finds the items and discount on those corresponding to each cpwalletId. |
java.util.Hashtable |
getConflicts()
Returns the conflict hashtable. |
java.lang.Long[] |
getCouponId()
Ge the coupon ids. |
int |
getNumCoupons()
Returns the conflict hashtable. |
java.lang.Long |
getOrderId()
Get the order ids. |
TypedProperty |
getReqProp()
Get the request properties. |
TypedProperty |
getRspProp()
Get the response properties. |
boolean |
isReadyToCallExecute()
It always return true. |
boolean |
isValidSelection()
Returns whether the selection is valid or not. |
void |
performExecute()
This shopper command is called when user selects a set of eCoupons to be used in an order. |
void |
setConflicts(java.util.Hashtable newConflicts)
Sets the conflict variable. |
void |
setCouponId(java.lang.Long[] newCouponId)
Set the ecoupon Id. |
void |
setNumCoupons(int newNumCoupons)
Sets the number of coupons. |
void |
setOrderId(java.lang.Long newOrderId)
Set the order ids. |
void |
setValidSelection(boolean newValidSelection)
Set valid selection. |
void |
transferFromTemp()
Transfer the entries from tempordercouponmap and tempcouponitemmap tables to the ordercouponmap and couponitemmap tables. |
void |
validateParameters()
Check the parameters. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Field Detail |
protected java.util.Hashtable conflicts
protected java.lang.Long[] couponId
protected java.math.BigDecimal[] discAmt
protected java.util.Vector[] itemList
protected int numCoupons
protected java.lang.Long orderId
protected CommandContext processingContext
protected TypedProperty reqProp
protected TypedProperty rspProp
protected boolean validSelection
Constructor Detail |
public CouponDSSTaskCmdImpl()
Method Detail |
public void computeItemAndDiscount() throws ECSystemException
public java.util.Hashtable getConflicts()
getConflicts
in interface CouponDSSTaskCmd
public java.lang.Long[] getCouponId()
public int getNumCoupons()
getNumCoupons
in interface CouponDSSTaskCmd
public java.lang.Long getOrderId()
public TypedProperty getReqProp()
public TypedProperty getRspProp()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class AbstractECCommand
public boolean isValidSelection()
isValidSelection
in interface CouponDSSTaskCmd
public void performExecute() throws ECException
This shopper command is called when user selects a set of eCoupons to be used in an order. The task command CouponDSSTaskCmd is used for those eCoupons which are used together as customizable.
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
:
- com.ibm.commerce.exception.ECException.public void setConflicts(java.util.Hashtable newConflicts)
newConflicts
- java.util.Hashtablepublic void setCouponId(java.lang.Long[] newCouponId)
setCouponId
in interface CouponDSSTaskCmd
newCouponId
- java.lang.Long[]public void setNumCoupons(int newNumCoupons)
newNumCoupons
- intpublic void setOrderId(java.lang.Long newOrderId)
setOrderId
in interface CouponDSSTaskCmd
newOrderId
- java.lang.Longpublic void setValidSelection(boolean newValidSelection)
newValidSelection
- booleanpublic void transferFromTemp() throws ECSystemException
Transfer the entries from tempordercouponmap and tempcouponitemmap tables to the ordercouponmap and couponitemmap tables. Also, mark the selected coupons as 'in progress'.
:
- com.ibm.commerce.exception.ECException.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
ECException
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |