public class ApplyCouponUsageCmdImpl extends CalculationCmdImpl implements ApplyCouponUsageCmd
This task command is called from OrderPrepare command to incorporate the eCoupon discount onto the Adjustments in ORDERS and ORDERITEMS table. The command is invoked when user asks to redeem the eCoupons before preparing order.
The eCoupons which are to be applied to an order are found out from OrderCouponMapAccessBean.
They are removed from OrderCouponMapAccessBean and CouponItemMapAccessBean.
The eCoupons are checked for expiry by calling CheckValidityTaskCmd command.
The eCoupons that are not expired
are checked for applicability by calling CheckApplicabilityTaskCmd command. The
CalculateDiscountAmountCmd task command is called on the applicable coupons to find the discount
amount to be incorporated in the currect order.
defaultCommandClassName, NAME| Constructor and Description |
|---|
ApplyCouponUsageCmdImpl()
Deprecated.
Constructor for ApplyCouponUsageCmdImpl call super.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkAppliedItems()
Deprecated.
It checks applied items.
|
java.util.Set |
getAppliedItems()
Deprecated.
Gets the applied items.
|
java.lang.Long |
getOrderId()
Deprecated.
Gets the orderId.
|
CommandContext |
getProcessingContext()
Deprecated.
Gets the processing context.
|
void |
insertIntoDB(java.lang.Long orderId,
java.util.Hashtable couponHashtable)
Deprecated.
It inserts data into database.
|
void |
performExecute()
Deprecated.
The eCoupons which are to be applied to an order are found out from
OrderCouponMapAccessBean. |
void |
removeOldEntries()
Deprecated.
It removes the old entries.
|
void |
reset()
Deprecated.
Sets the various variables to their default values (null).
|
void |
setItems(Item[] aItems)
Deprecated.
Sets the items.
|
void |
setOrderId(java.lang.Long newOrderId)
Deprecated.
Sets the order IDs.
|
void |
setProcessingContext(CommandContext newProcessingContext)
Deprecated.
Sets the processing context.
|
void |
setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
Deprecated.
Sets the tax category..
|
void |
validateParameters()
Deprecated.
Checks the parameters.
|
getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageIdgetPolicyId, getRequestProperties, setPolicyId, setRequestPropertiesaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, 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, waitgetCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageIdgetPolicyId, getRequestProperties, setPolicyId, setRequestPropertiesexecuteFromCache, 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, setDefaultPropertiespublic ApplyCouponUsageCmdImpl()
public void checkAppliedItems()
throws ECException
checkAppliedItems in interface ApplyCalculationUsageCmd: - com.ibm.commerce.exception.ECException.ECExceptionpublic java.util.Set getAppliedItems()
getAppliedItems in interface ApplyCalculationUsageCmdpublic java.lang.Long getOrderId()
public CommandContext getProcessingContext()
public void insertIntoDB(java.lang.Long orderId,
java.util.Hashtable couponHashtable)
throws ECSystemException
couponHashTable - java.util.HashtableECSystemExceptionpublic void performExecute()
throws ECException
The eCoupons which are to be applied to an order are found out from OrderCouponMapAccessBean.
They are removed from OrderCouponMapAccessBean and CouponItemMapAccessBean.
The eCoupons are checked for expiry by calling CheckValidityTaskCmd command.
The eCoupons that are not expired
are checked for applicability by calling CheckApplicabilityTaskCmd command. The
CalculateDiscountAmountCmd task command is called on the applicable coupons to find the discount
amount to be incorporated in the currect order.
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommand: - com.ibm.commerce.exception.ECException.ECExceptionpublic void removeOldEntries()
throws ECSystemException
: - com.ibm.commerce.exception.ECException.ECSystemExceptionpublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class CalculationCmdImplCommand.reset()public void setItems(Item[] aItems)
setItems in interface ApplyCalculationUsageCmdItem[] - public void setOrderId(java.lang.Long newOrderId)
newOrderId - java.lang.Longpublic void setProcessingContext(CommandContext newProcessingContext)
newProcessingContext - com.ibm.commerce.command.CommandContextpublic void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
setTaxCategoryIds in interface ApplyCalculationUsageCmdanTaxCategoryIds - an Integer.public void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommand: - com.ibm.commerce.exception.ECException.ECException