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, setUsageId
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
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
getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
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
public ApplyCouponUsageCmdImpl()
public void checkAppliedItems() throws ECException
checkAppliedItems
in interface ApplyCalculationUsageCmd
:
- com.ibm.commerce.exception.ECException.ECException
public java.util.Set getAppliedItems()
getAppliedItems
in interface ApplyCalculationUsageCmd
public java.lang.Long getOrderId()
public CommandContext getProcessingContext()
public void insertIntoDB(java.lang.Long orderId, java.util.Hashtable couponHashtable) throws ECSystemException
couponHashTable
- java.util.HashtableECSystemException
public 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 ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
:
- com.ibm.commerce.exception.ECException.ECException
public void removeOldEntries() throws ECSystemException
:
- com.ibm.commerce.exception.ECException.ECSystemException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class CalculationCmdImpl
Command.reset()
public void setItems(Item[] aItems)
setItems
in interface ApplyCalculationUsageCmd
Item[]
- 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 ApplyCalculationUsageCmd
anTaxCategoryIds
- an Integer.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
:
- com.ibm.commerce.exception.ECException.ECException