com.ibm.commerce.inventory.facade.server.commands

Class 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 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 interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractProcessInventoryRequirementActionCmdImpl
        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