public class CalculateDiscountAmtCmdImpl extends CalculationCmdImpl implements CalculateDiscountAmtCmd
The purpose of the task command is to computes the discount amount for each eCoupon that satisfy the purchase order conditions of the of the eCoupon.
First the orderItems for a order are found out and for each cpwalletId, corresponding promoId is found out from the CouponWalletAccessBean. The corresponding calcodeId are found out from PromoDiscAccessBean by using the obtained promoId. A mapping is computed between OrderItemAccessBean (corresponding to the items qualified for this cpwalletId) and the Categorized MonetaryAmount(Set to zero). The task command CalculationCodeCalculate command with usage type as eCoupons and the mapping created above are called and the discount amounts are stored in TempCouponItemMapAccessBean. These above steps are performed for each cpwalletId.
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector[] | appItems
Deprecated.
The nth element of this array contains the IDs of applicable items for the nth coupon.
|
protected java.lang.Long[] | bcIds
Deprecated.
The IDs of the coupons to be applied to this order
|
protected java.lang.Long | orderId
Deprecated.
ID of the order
|
protected CommandContext | processingContext
Deprecated.
The command context holder
|
protected TypedProperty | reqProp
Deprecated.
The request properties
|
protected java.util.Hashtable | returnTable
Deprecated.
This tables stores the discount amounts computed by this command.
|
protected TypedProperty | rspProp
Deprecated.
The response properties
|
Constructor and Description |
---|
CalculateDiscountAmtCmdImpl()
Deprecated.
CouponDSSCmdImpl constructor, call super.
|
Modifier and Type | Method and Description |
---|---|
boolean | checkParentCatEntryIds(java.lang.Long oiCatEntryId, java.lang.Long walletCatEntryId)
Deprecated.
Checks the parent catalog entry.
|
java.util.Vector[] | getAppItems()
Deprecated.
Gets the applicable items.
|
static java.lang.String | getIClassName()
Deprecated.
Gets the class name.
|
java.lang.Long | getOrderId()
Deprecated.
Gets the orderId.
|
CommandContext | getProcessingContext()
Deprecated.
Gets the processing context.
|
TypedProperty | getReqProp()
Deprecated.
Gets request properties.
|
TypedProperty | getResponseProperties()
Deprecated.
Gets the response properties.
|
java.util.Hashtable | getReturnTable()
Deprecated.
Gets the return table.
|
TypedProperty | getRspProp()
Deprecated.
Gets the response properties.
|
boolean | isReadyToCallExecute()
Deprecated.
It always returns true.
|
void | performExecute()
Deprecated.
First the orderItems for a order are found out and for each cpwalletId, corresponding promoId is found out from the CouponWalletAccessBean.
|
void | reset()
Deprecated.
Resets the command properties.
|
void | setAppItems(java.util.Vector[] newAppItems)
Deprecated.
Sets the applied items.
|
void | setBcIds(java.lang.Long[] paramBcIds)
Deprecated.
Sets the eCouponIds.
|
void | setOrderId(java.lang.Long newOrderId)
Deprecated.
Sets the order IDs.
|
void | setProcessingContext(CommandContext newProcessingContext)
Deprecated.
Sets the processing context.
|
void | setReqProp(TypedProperty newReqProp)
Deprecated.
Sets the request properties.
|
void | setRequestProperties(TypedProperty paramReqProp)
Deprecated.
Sets the request properties.
|
void | setReturnTable(java.util.Hashtable newReturnTable)
Deprecated.
Sets the return table.
|
void | setRspProp(TypedProperty newRspProp)
Deprecated.
Sets the responce properties.
|
protected java.lang.Long[] bcIds
protected java.lang.Long orderId
protected CommandContext processingContext
protected TypedProperty reqProp
protected TypedProperty rspProp
protected java.util.Vector[] appItems
protected java.util.Hashtable returnTable
public CalculateDiscountAmtCmdImpl()
public void reset()
public boolean checkParentCatEntryIds(java.lang.Long oiCatEntryId, java.lang.Long walletCatEntryId) throws ECSystemException
public java.util.Vector[] getAppItems()
public static final java.lang.String getIClassName()
public java.lang.Long getOrderId()
public CommandContext getProcessingContext()
public TypedProperty getReqProp()
public TypedProperty getResponseProperties()
public java.util.Hashtable getReturnTable()
public TypedProperty getRspProp()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
First the orderItems for a order are found out and for each cpwalletId, corresponding promoId is found out from the CouponWalletAccessBean. The corresponding calcodeId are found out from PromoDiscAccessBean by using the obtained promoId. A mapping is computed between OrderItemAccessBean (corresponding to the items qualified for this cpwalletId) and the Categorized MonetaryAmount(Set to zero). The task command CalculationCodeCalculate command with usage type as eCoupons and the mapping created above are called and the discount amounts are stored in TempCouponItemMapAccessBean. These above steps are performed for each cpwalletId.
public void setAppItems(java.util.Vector[] newAppItems)
public void setBcIds(java.lang.Long[] paramBcIds)
public void setOrderId(java.lang.Long newOrderId)
public void setProcessingContext(CommandContext newProcessingContext)
public void setReqProp(TypedProperty newReqProp)
public void setRequestProperties(TypedProperty paramReqProp)
public void setReturnTable(java.util.Hashtable newReturnTable)
public void setRspProp(TypedProperty newRspProp)