Class ProcessInventoryRequirementDecrementCacheActionCmdImpl

  • All Implemented Interfaces:
    AbstractProcessNounActionCmd, ProcessInventoryRequirementActionCmd,,,,,,

    public class ProcessInventoryRequirementDecrementCacheActionCmdImpl
    extends AbstractProcessInventoryRequirementActionCmdImpl
    The process command is the task command for process InvnetoryRequirement service with action code DecrementCache to decrement the inventory cache. When using the DOM invnetory systems, the inventory data from out DOM inventory system can be cached in commerce local memory or DB. This cache can help to improve the performance if the out DOM inventory system performs poor. After the inventory has been reserved by out DOM inventory system, process InvnetoryRequirement service with action code DecrementCache should be invoked to decrement the inventory of the local memory or DB cache in order to keep sync with out DOM inventory system.
    See Also:
    Serialized Form
    • Field Detail


        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProcessInventoryRequirementDecrementCacheActionCmdImpl

        public ProcessInventoryRequirementDecrementCacheActionCmdImpl()
    • Method Detail

      • setInventoryStatusToDecrementCache

        public void setInventoryStatusToDecrementCache(java.lang.String inventoryStatusToDecrementCache)
        Sets the inventory status(es) to decrement cache.
        inventoryStatusToDecrementCache - A comma-separated list of inventory statuses.
      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        This method performs the main business flow to decrement the inventory cache.

        When an order item in InventoryRequirementType contans catalog entry in an online store or catalog entry in a physical store, and if the order item's inventory status is Allocated. The memory or DB inventory cache of them will be decremented by the quantity ordered.

        Specified by:
        performExecute in interface
        performExecute in class AbstractProcessInventoryRequirementActionCmdImpl
        See Also:
        decrementCache(String, String, String, OrderItemType)
      • decrementCache

        public void decrementCache(java.lang.String catEntryId,
                                   java.lang.String onlineStoreId,
                                   java.lang.String physicalStoreId,
                                   OrderItemType orderItem)
                            throws AbstractApplicationException
        This method performs the operatins to decrement cache.

        First, for the combination of catalog entry/online store or catalog entry/physical store, the configuration for them will be first read. If the inventory cache is in the memory, memory cache will be decremented; if the inventory cache is in the DB, DB cahce will be decremented.

        catEntryId - The catalog entry ID of the product in the order item.
        onlineStoreId - The online store ID where the product purchased. When this parameter is set, physicalStoreId should be null.
        physicalStoreId - The physical store ID where the product purchased. When this parameter is set, onlineStoreId should be null.
        orderItem - The order item which contains the catalog entry id.