Class ProcessInventoryRequirementCheckInventoryActionCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.foundation.server.command.bod.AbstractProcessNounActionCmdImpl
-
- com.ibm.commerce.inventory.facade.server.commands.AbstractProcessInventoryRequirementActionCmdImpl
-
- com.ibm.commerce.inventory.facade.server.commands.ProcessInventoryRequirementCheckInventoryActionCmdImpl
-
- All Implemented Interfaces:
- AbstractProcessNounActionCmd, ProcessInventoryRequirementActionCmd, 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:
- ProcessExternalInventoryRequirementCheckInventoryActionWithUOMCmdImpl
public class ProcessInventoryRequirementCheckInventoryActionCmdImpl extends AbstractProcessInventoryRequirementActionCmdImpl
The process command is the task command for process InventoryRequirement service with action code CheckInventory to check the inventory availability. When using the DOM inventory systems, the inventory data from out DOM inventory system can be cached in commerce local memory or data base. This cache can help to improve the performance if the out DOM inventory system performs poor. When adding a product into the shopping cart, process InvnetoryRequirement service with action code CheckInventory will be invoked to check the availability for the product.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM Copyright notice field.
-
Constructor Summary
Constructors Constructor and Description ProcessInventoryRequirementCheckInventoryActionCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
checkInventory(java.lang.String catEntryId, java.lang.String onlineStoreId, java.lang.String physicalStoreId, OrderItemType orderItem)
Checks the order item inventory status.void
performExecute()
This method performs the main business flog of this class.-
Methods inherited from class com.ibm.commerce.inventory.facade.server.commands.AbstractProcessInventoryRequirementActionCmdImpl
buildInternalSelectionCriteria, getInventoryAvailabilityFromDOM, getInventoryConfiguration, isValidStoreId, validate
-
Methods inherited from class com.ibm.commerce.foundation.server.command.bod.AbstractProcessNounActionCmdImpl
getActionExpression, getNoun, isGeneric, isReadyToCallExecute, reset, setActionExpression, setNoun, setPersistentObjects
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, 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.commerce.foundation.server.command.bod.AbstractProcessNounActionCmd
isGeneric, setActionExpression, setNoun, setPersistentObjects
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProcessInventoryRequirementCheckInventoryActionCmdImpl
public ProcessInventoryRequirementCheckInventoryActionCmdImpl()
-
-
Method Detail
-
performExecute
public void performExecute() throws java.lang.Exception
This method performs the main business flog of this class.For an order item in an
InventoryRequirementType
, if it contains an item in a physical store, the inventory availability of the catalog entry/physical store combination will be checked. If it contains an item in an online store, the inventory availability of the catalog entry/online store combination will be checked.- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractProcessInventoryRequirementActionCmdImpl
- Throws:
java.lang.Exception
- A problem was encountered during the inventory availability checking process.
-
checkInventory
public void checkInventory(java.lang.String catEntryId, java.lang.String onlineStoreId, java.lang.String physicalStoreId, OrderItemType orderItem) throws java.lang.Exception
Checks the order item inventory status. This method performs the main business logic to check inventory availability from DOM inventory system.For each combination of catalog entry/online store of catalog entry/physical store, the configuration of them will be first read. Based on the flags, inventory availability will be checked from either the DOM inventory memory cache or the database cache.
If memory cache and database cache are all expired or not found, inventory availability will be checked by retrieving
InventoryAvailabilityType
from the DOM (Distributed Order Management) system (if the bit flags for DOM has been set).If retrieving from DOM still failed, the inventory availability will be checked from the fallback data, which should be configured in the
invcnf
database table.If inventory availability was checked from DOM, cache is expired and update cache has been set, the cache items will be updated.
- Parameters:
catEntryId
- catalog entry id of the order item.onlineStoreId
- online store id, if this parameter is set, physicalStoreId should be null.physicalStoreId
- id of the physical store, if this parameter is set, onlineStoreId should be null.orderItem
- An order item to be checked, which contained the catalog entry in an online store or in a physical store.- Throws:
java.lang.Exception
-
-