|
||||||||
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.command.BusinessPolicyCommandImpl | +--com.ibm.commerce.order.calculation.CalculationCmdImpl | +--com.ibm.commerce.couponredemption.commands.CalculateDiscountAmtCmdImpl
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.
The input to this command are :
First the orderItems for a order are found out and for each cpwalletId, corresponding promoId is found out from the CPWALLET table. The corresponding calcodeId are found out from CPPMNDISC table 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 TCPITMAP table. These above steps are performed for each cpwalletId.
Field Summary | |
protected java.util.Vector[] |
appItems
|
protected java.lang.Long[] |
bcIds
|
protected java.lang.Long |
orderId
|
protected CommandContext |
processingContext
|
protected TypedProperty |
reqProp
|
protected java.util.Hashtable |
returnTable
|
protected TypedProperty |
rspProp
|
Fields inherited from class com.ibm.commerce.order.calculation.CalculationCmdImpl |
COPYRIGHT |
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
policyId, requestProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.couponredemption.commands.CalculateDiscountAmtCmd |
COPYRIGHT, defaultCommandClassName, Name |
Fields inherited from interface com.ibm.commerce.order.calculation.CalculationCmd |
NAME |
Constructor Summary | |
CalculateDiscountAmtCmdImpl()
CouponDSSCmdImpl constructor, call super. |
Method Summary | |
boolean |
checkParentCatEntryIds(java.lang.Long oiCatEntryId,
java.lang.Long walletCatEntryId)
Check the parent catalog entry. |
java.util.Vector[] |
getAppItems()
Get the applied items. |
static java.lang.String |
getIClassName()
Get the class name. |
java.lang.Long |
getOrderId()
Get the orderIds. |
CommandContext |
getProcessingContext()
Get the processing context. |
TypedProperty |
getReqProp()
Get request properties. |
TypedProperty |
getResponseProperties()
Get the responce properties. |
java.util.Hashtable |
getReturnTable()
Get the return table. |
TypedProperty |
getRspProp()
Get the responce properties. |
boolean |
isReadyToCallExecute()
It always return true. |
void |
performExecute()
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. |
void |
setAppItems(java.util.Vector[] newAppItems)
It set the applied items. |
void |
setBcIds(java.lang.Long[] paramBcIds)
Set the eCouponIds. |
void |
setOrderId(java.lang.Long newOrderId)
Set the order ids. |
void |
setProcessingContext(CommandContext newProcessingContext)
Set the processing context. |
void |
setReqProp(TypedProperty newReqProp)
Set the request properties. |
void |
setRequestProperties(TypedProperty paramReqProp)
Set the request properties. |
void |
setReturnTable(java.util.Hashtable newReturnTable)
set the return table. |
void |
setRspProp(TypedProperty newRspProp)
Set the responce properties. |
Methods inherited from class com.ibm.commerce.order.calculation.CalculationCmdImpl |
createCommand, getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, reset, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
getPolicyId, getRequestProperties, setPolicyId |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
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, validateParameters |
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand |
getPolicyId, getRequestProperties, setPolicyId |
Field Detail |
protected java.util.Vector[] appItems
protected java.lang.Long[] bcIds
protected java.lang.Long orderId
protected CommandContext processingContext
protected TypedProperty reqProp
protected java.util.Hashtable returnTable
protected TypedProperty rspProp
Constructor Detail |
public CalculateDiscountAmtCmdImpl()
Method Detail |
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()
getResponseProperties
in interface CalculateDiscountAmtCmd
public java.util.Hashtable getReturnTable()
getReturnTable
in interface CalculateDiscountAmtCmd
public TypedProperty getRspProp()
CalculateDiscountAmtCmd
getRspProp
in interface CalculateDiscountAmtCmd
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class AbstractECCommand
public void performExecute() throws ECException
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 CPWALLET table. The corresponding calcodeId are
found out from CPPMNDISC table 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 TCPITMAP table. These above steps are performed for each cpwalletId.
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void setAppItems(java.util.Vector[] newAppItems)
setAppItems
in interface CalculateDiscountAmtCmd
newAppItems
- java.util.Vectorpublic void setBcIds(java.lang.Long[] paramBcIds)
setBcIds
in interface CalculateDiscountAmtCmd
paramBcIds
- java.lang.Longpublic void setOrderId(java.lang.Long newOrderId)
setOrderId
in interface CalculateDiscountAmtCmd
newOrderId
- java.lang.Longpublic void setProcessingContext(CommandContext newProcessingContext)
setProcessingContext
in interface CalculateDiscountAmtCmd
newProcessingContext
- com.ibm.commerce.command.CommandContextpublic void setReqProp(TypedProperty newReqProp)
CalculateDiscountAmtCmd
setReqProp
in interface CalculateDiscountAmtCmd
newReqProp
- com.ibm.commerce.datatype.TypedPropertypublic void setRequestProperties(TypedProperty paramReqProp)
setRequestProperties
in interface CalculateDiscountAmtCmd
setRequestProperties
in class BusinessPolicyCommandImpl
paramReqProp
- com.ibm.commerce.datatype.TypedPropertypublic void setReturnTable(java.util.Hashtable newReturnTable)
newReturnTable
- java.util.Hashtablepublic void setRspProp(TypedProperty newRspProp)
newRspProp
- com.ibm.commerce.datatype.TypedProperty
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |