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.
defaultCommandClassName, NameNAME| 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.
|
getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageIdgetPolicyId, getRequestProperties, setPolicyIdaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersexecuteFromCache, 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, setDefaultProperties, validateParametersgetPolicyId, getRequestProperties, setPolicyIdpublic CalculateDiscountAmtCmdImpl()
public void reset()
reset in interface com.ibm.websphere.command.Commandreset in class CalculationCmdImplCommand.reset()public boolean checkParentCatEntryIds(java.lang.Long oiCatEntryId,
java.lang.Long walletCatEntryId)
throws ECSystemException
oiCatEntryId - The child catalog entry ID.walletCatEntryId - The parent catalog entry ID.ECSystemExceptionpublic 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 CalculateDiscountAmtCmdpublic java.util.Hashtable getReturnTable()
getReturnTable in interface CalculateDiscountAmtCmdpublic TypedProperty getRspProp()
getRspProp in interface CalculateDiscountAmtCmdpublic boolean isReadyToCallExecute()
isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandpublic 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.
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void setAppItems(java.util.Vector[] newAppItems)
setAppItems in interface CalculateDiscountAmtCmdnewAppItems - the applicable items to be set.public void setBcIds(java.lang.Long[] paramBcIds)
setBcIds in interface CalculateDiscountAmtCmdparamBcIds - the couponIds to be used on this order.public void setOrderId(java.lang.Long newOrderId)
setOrderId in interface CalculateDiscountAmtCmdnewOrderId - the orderIdpublic void setProcessingContext(CommandContext newProcessingContext)
setProcessingContext in interface CalculateDiscountAmtCmdnewProcessingContext - the new command context to be used.public void setReqProp(TypedProperty newReqProp)
setReqProp in interface CalculateDiscountAmtCmdnewReqProp - the new request propertiespublic void setRequestProperties(TypedProperty paramReqProp)
setRequestProperties in interface BusinessPolicyCommandsetRequestProperties in interface CalculateDiscountAmtCmdsetRequestProperties in class BusinessPolicyCommandImplparamReqProp - the new request propertiespublic void setReturnTable(java.util.Hashtable newReturnTable)
newReturnTable - the hashtable containing discount informationpublic void setRspProp(TypedProperty newRspProp)
newRspProp - the new response properties