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, Name
NAME
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, setUsageId
getPolicyId, getRequestProperties, setPolicyId
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
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, validateParameters
getPolicyId, getRequestProperties, setPolicyId
public CalculateDiscountAmtCmdImpl()
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class CalculationCmdImpl
Command.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.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()
getRspProp
in interface CalculateDiscountAmtCmd
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
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.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void setAppItems(java.util.Vector[] newAppItems)
setAppItems
in interface CalculateDiscountAmtCmd
newAppItems
- the applicable items to be set.public void setBcIds(java.lang.Long[] paramBcIds)
setBcIds
in interface CalculateDiscountAmtCmd
paramBcIds
- the couponIds to be used on this order.public void setOrderId(java.lang.Long newOrderId)
setOrderId
in interface CalculateDiscountAmtCmd
newOrderId
- the orderIdpublic void setProcessingContext(CommandContext newProcessingContext)
setProcessingContext
in interface CalculateDiscountAmtCmd
newProcessingContext
- the new command context to be used.public void setReqProp(TypedProperty newReqProp)
setReqProp
in interface CalculateDiscountAmtCmd
newReqProp
- the new request propertiespublic void setRequestProperties(TypedProperty paramReqProp)
setRequestProperties
in interface BusinessPolicyCommand
setRequestProperties
in interface CalculateDiscountAmtCmd
setRequestProperties
in class BusinessPolicyCommandImpl
paramReqProp
- 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