public class FinalizeCouponUsageCmdImpl extends CalculationCmdImpl implements FinalizeCouponUsageCmd
This is a task command that is invoked from the ORDERPROCESS command to mark all the eCoupons as unusable that are used in the current order preparation.
The cpwalletId
is found out for the current orderId
from the ORCPMAP table.
Then for each cpwalletId
the number of times this coupon has been used is incremented.
If the number of times this coupon has been used has reached the limit specified, then the eCoupon is
marked as "Not Usable" in the
CouponWalletAccessBean
for the current cpwalletId
.
defaultCommandClassName, NAME
Constructor and Description |
---|
FinalizeCouponUsageCmdImpl()
FinalizeCouponUsageCmdImpl constructor, calls super().
|
Modifier and Type | Method and Description |
---|---|
OrderAccessBean |
getOrder()
Gets the access bean representing the order.
|
OrderItemAccessBean[] |
getOrderItems()
Gets the access bean representing the order items.
|
void |
performExecute()
Deprecated.
The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.
|
void |
reset()
Resets the command properties.
|
void |
setOrder(OrderAccessBean newOrder)
Sets the access bean representing the order.
|
void |
setOrderItems(OrderItemAccessBean[] newOrderItems)
Sets the access bean representing the order items.
|
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, 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
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, validateParameters
public FinalizeCouponUsageCmdImpl()
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class CalculationCmdImpl
Command.reset()
public OrderAccessBean getOrder()
public OrderItemAccessBean[] getOrderItems()
public void performExecute() throws ECException
The cpwalletId
is found out for the current orderId
from ORCPMAP table.
Then for each cpwalletId
the number of time this coupon has been used is increamented.
If the number of times this coupon has been used has reached the limit specified, then th eCoupon is
marked as "Not Usable" in the
CouponWalletAccessBean
for the current cpwalletId
.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
:
- com.ibm.commerce.exception.ECException.ECException
public void setOrder(OrderAccessBean newOrder)
setOrder
in interface FinalizeCalculationUsageCmd
newOrder
- access bean representing the order.public void setOrderItems(OrderItemAccessBean[] newOrderItems)
setOrderItems
in interface FinalizeCalculationUsageCmd
newOrderItems
- Array of access beans representing the order items.