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. ResolveOrdersCmdResolveFulfillmentCenterCmdResolveOrderItemPriceCmdCalculateOrderCmdOrderItemAddCmdRewardChoiceUpdateCmdImplSalesOrderPreprocessCmdImplGuestUserOrderMigrationEventListenerOrderItemAddCmdImplOrderItemUpdateCmdImplOrderItemDeleteCmdImplMigrateRegisteredUserEntriesCmdImplCSROrderPrepareCmdImpl| 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
catEntryIds of the items that are out of inventory. |
AccessVector |
getResources()
Returns an
AccessVector containing the OrderAccessBeans 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, setViewInputPropertiesaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, 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, waitcheckPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiesaccessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwnercheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesfulfills, getOwnerpublic static final java.lang.String COPYRIGHT
public OrderCalculateCmdImpl()
public void setOrders(OrderAccessBean[] aabOrders)
OrderCalculateCmdsetOrders in interface OrderCalculateCmdaabOrders - the Orders.
OrderCalculateCmd.setOrders(OrderAccessBean[])public void setUsageIds(java.lang.Integer[] anUsageIds)
setUsageIds in interface OrderCalculateCmdanUsageIds - the CalculationUsage identifiers.
OrderCalculateCmd.setUsageIds(Integer[])public void setCustomProperties(java.util.HashMap newhshCustomProperties)
setCustomProperties in interface OrderCalculateCmdnewhshCustomProperties - the customer propertiespublic java.lang.Long[] getOutOfInventoryCatalogEntryIds()
catEntryIds of the items that are out of inventory.getOutOfInventoryCatalogEntryIds in interface OrderCalculateCmdOrderCalculateCmd.getOutOfInventoryCatalogEntryIds()public java.util.HashMap getCustomProperties()
getCustomProperties in interface OrderCalculateCmdpublic AccessVector getResources() throws ECException
AccessVector containing the OrderAccessBeans to be processed.
getResources in interface ECCommandgetResources in class AbstractECTargetableCommandAccessVector.ECExceptionECCommand.getResources()public void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECExceptionECCommand.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 ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionECCommand.performExecute()public void setRequestProperties(TypedProperty aRequestProperties) throws ECException
setRequestProperties in interface ControllerCommandsetRequestProperties in class ControllerCommandImplaRequestProperties - the request properties.
ECException - ControllerCommand.setRequestProperties(TypedProperty)public void reset()
reset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommand