com.ibm.commerce.order.commands
Class PrepareOrderCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.order.commands.PrepareOrderCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, PrepareOrderCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
- Direct Known Subclasses:
- ExternalPrepareOrderCmdImpl, PrepareProcurementOrderCmdImpl
public class PrepareOrderCmdImpl extends TaskCommandImpl implements PrepareOrderCmd
This command prepares an order by determining prices, discounts, shipping charges, and taxes for an order.Behavior
- Delete generated order items (refer to the
PREPAREFLAGS
column in the ORDERITEMS table). - Check that all order items in the order are buyable (refer to the BUYABLE column in the CATENTRY table).
- Call
DoInventoryActionCmd
to check the availability of the products with actionCHECK_INVENTORY
. - Obtain latest unit price for each order item, except those with manually overridden prices
or are quotations.
(refer to
PREPAREFLAGS
column of the ORDERITEMS table). - Re-calculate the amounts for the order.
- Lock the order to indicate that it is ready for the OrderProcess command.
The lock can be reset either by expiry, by changing the Order
(for example, by using the OrderItemUpdate command),
or explicitly by using the OrderUnlock command.
The expiry period for a lock is stored in the
QUOTEGOODFOR
column of the STORE table. OrderCopyCmdImpl
OrderPrepareCmdImpl
PreProcessCmdImpl
Task commands called:
AccessBeans used:
Possible callers:
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field.-
Fields inherited from interface com.ibm.commerce.order.commands.PrepareOrderCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description PrepareOrderCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Vector
getOrders()
This method gets the ids of the orders to be prepared.void
performExecute()
This method contains the actual business logic of the command.void
setOrder(OrderAccessBean abOrder)
This method sets the order to prepare.void
setOrders(java.util.Vector newOrders)
This method sets the ids of the orders to be prepared.-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrders
public java.util.Vector getOrders()
This method gets the ids of the orders to be prepared.- Returns:
- a vector of order access beans.
-
performExecute
public void performExecute() throws ECException
This method contains the actual business logic of the command. It callsDoIventoryActionCmd
to get default ATP parameters, and initialize an instance ofOrderProcessingHelper
. Then it callsdoProcess(OrderProcessingHelper)
to do all the logic in this command.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
-
setOrder
public void setOrder(OrderAccessBean abOrder)
This method sets the order to prepare.- Specified by:
setOrder
in interfacePrepareOrderCmd
- Parameters:
abOrder
- order access bean
-
setOrders
public void setOrders(java.util.Vector newOrders)
This method sets the ids of the orders to be prepared.- Specified by:
setOrders
in interfacePrepareOrderCmd
- Parameters:
newOrders
- java.util.Vector order identifiers
-
-