public class OrderCalculateCmdImpl extends OrderBaseCmdImpl implements OrderCalculateCmd
OrderCalculateCmd
controller command. Name | Description |
---|---|
orderId |
The reference number of the order to be displayed. If this parameter is omitted, this command behaves as if all of the customer's orders with the specified status for the specified store were specified. Abbreviations may be used, but only with pending orders (status is P for standard orders or NEW for advanced orders). This parameter can be repeated. |
calculationUsageId |
Predefined codes for calculation of discounts (-1), shipping (-2), sales tax (-3), shipping tax, (-4) coupons (-5), surcharge (-6), shipping adjustment (-7). This parameter can be repeated. |
outOrderName |
Specifies the names of name-value pairs to be passed to a JSP. The value of each added name-value pair is
the reference number of the order to be displayed.
If the name is not provided, the default name orderId is used.
This parameter can be repeated. |
updatePrices |
the flag to indicate whether the price of order item will be refreshed in this command. if the flag is "1", price will be updated. others will not. |
doPrice |
Specifies whether the command should perform the price calculation subtasks. Set to either do the price tasks (Y), or not (N). Turning off these tasks might result in better performance, but customers might not get the most current price, or product entitlement, when changes occur. |
doFreeGift |
Specifies whether the command should perform the free gift handling logic. Set to either do the free gift handling (Y), or not (N). The default value is (Y). Only set it to (N) when free gift processing isn't required for Order recalculation. |
Name | Description |
---|---|
istrOutOrderNames | the order IDs to be displayed |
outOfInventoryCatalogEntryId |
the catalog entrys which are intended to add to the order as free gift but has no inventory now. |
nonBuyableCatalogEntryId |
the catalog entrys which are intended to add to the order as free gift but are non-buyable now. |
updatePrices
is 1, calls ResolveOrderItemPriceCmd
to resolve price and
updates order product totals. CalculateOrderCmd
to recalculates the order. ResolveOrdersCmd
ResolveFulfillmentCenterCmd
ResolveOrderItemPriceCmd
CalculateOrderCmd
OrderItemAddCmd
RewardChoiceUpdateCmdImpl
SalesOrderPreprocessCmdImpl
GuestUserOrderMigrationEventListener
OrderItemAddCmdImpl
OrderItemUpdateCmdImpl
OrderItemDeleteCmdImpl
MigrateRegisteredUserEntriesCmdImpl
CSROrderPrepareCmdImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
OrderCalculateCmdImpl()
Constructor for OrderCalculateCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
java.util.HashMap |
getCustomProperties()
This method returns the customer properties.
|
java.lang.Long[] |
getOutOfInventoryCatalogEntryIds()
This method returns the list of
catEntryId s of the items that are out of inventory. |
AccessVector |
getResources()
Returns an
AccessVector containing the OrderAccessBean s to be processed. |
void |
performExecute()
This method executes the main business logic of the command implementation.
|
void |
reset()
This method resets instance variables to their initial values.
|
void |
setCustomProperties(java.util.HashMap newhshCustomProperties)
This method sets the customer properties.
|
void |
setOrders(OrderAccessBean[] aabOrders)
This method sets the orders to be calculated.
|
void |
setRequestProperties(TypedProperty aRequestProperties)
This method sets the request properties.
|
void |
setUsageIds(java.lang.Integer[] anUsageIds)
This method sets the calculation usages.
|
void |
validateParameters()
Resolve the orders to be processed from the request.
|
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, 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
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public static final java.lang.String COPYRIGHT
public OrderCalculateCmdImpl()
public void setOrders(OrderAccessBean[] aabOrders)
OrderCalculateCmd
setOrders
in interface OrderCalculateCmd
aabOrders
- the Orders.
OrderCalculateCmd.setOrders(OrderAccessBean[])
public void setUsageIds(java.lang.Integer[] anUsageIds)
setUsageIds
in interface OrderCalculateCmd
anUsageIds
- the CalculationUsage identifiers.
OrderCalculateCmd.setUsageIds(Integer[])
public void setCustomProperties(java.util.HashMap newhshCustomProperties)
setCustomProperties
in interface OrderCalculateCmd
newhshCustomProperties
- the customer propertiespublic java.lang.Long[] getOutOfInventoryCatalogEntryIds()
catEntryId
s of the items that are out of inventory.getOutOfInventoryCatalogEntryIds
in interface OrderCalculateCmd
OrderCalculateCmd.getOutOfInventoryCatalogEntryIds()
public java.util.HashMap getCustomProperties()
getCustomProperties
in interface OrderCalculateCmd
public AccessVector getResources() throws ECException
AccessVector
containing the OrderAccessBean
s to be processed.
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
AccessVector
.ECException
ECCommand.getResources()
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
ECCommand.validateParameters()
public void performExecute() throws ECException
updateOrderProductTotal(OrderAccessBean, OrderItemAccessBean[])
to refresh the order product total.
Then it calls CalculateOrderCmd
to do calculation for the order.performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
ECCommand.performExecute()
public void setRequestProperties(TypedProperty aRequestProperties) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class ControllerCommandImpl
aRequestProperties
- the request properties.
ECException
- ControllerCommand.setRequestProperties(TypedProperty)
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand