Interface InventoryServiceExtensionHandler

All Superinterfaces:
org.broadleafcommerce.common.extension.ExtensionHandler
All Known Implementing Classes:
AbstractInventoryServiceExtensionHandler

public interface InventoryServiceExtensionHandler extends org.broadleafcommerce.common.extension.ExtensionHandler
Marker interface to dictate the overridden methods within ContextualInventoryService. Usually, implementers will want to only override the ContextualInventoryService methods rather than all of the methods included in InventoryService and so you will extend from AbstractInventoryServiceExtensionHandler.
Author:
Phillip Verheyden (phillipuniverse)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    decrementInventory(Map<Sku,Integer> skuQuantities, Map<String,Object> context)
    Usually invoked within the DecrementInventoryActivity to decrement inventory for the Skus that are in skuQuantities
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    incrementInventory(Map<Sku,Integer> skuQuantities, Map<String,Object> context)
     
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    isBlockingAvailabilityOfProduct(Product baseProduct, Product product, org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder)
    This determines if the missing quantity is critical (blocking) to be added to the cart Usually invoked via the UncacheableDataProcessor to determine the availability of product.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    isProductBundleAvailable(Product product, int quantity, org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder)
    Usually invoked via the AdvancedProduct to determine the availability of product bundle.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    reconcileChangeOrderInventory(Map<Sku,Integer> decrementSkuQuantities, Map<Sku,Integer> incrementSkuQuantities, Map<String,Object> context)
    Usually invoked via the OMS ReconcileInventoryChangeOrderActivity to determine how to handle a change order.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    retrieveQuantitiesAvailable(Collection<Sku> skus, Map<String,Object> context, org.broadleafcommerce.common.extension.ExtensionResultHolder<Map<Sku,Integer>> result)
    Usually invoked within the CheckAddAvailabilityActivity to retrieve the quantity that is available for the given skus.

    Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler

    getPriority, isEnabled
  • Method Details

    • retrieveQuantitiesAvailable

      org.broadleafcommerce.common.extension.ExtensionResultStatusType retrieveQuantitiesAvailable(Collection<Sku> skus, Map<String,Object> context, org.broadleafcommerce.common.extension.ExtensionResultHolder<Map<Sku,Integer>> result)
      Usually invoked within the CheckAddAvailabilityActivity to retrieve the quantity that is available for the given skus.
      Parameters:
      context - can be null. If not null, this should at least contain the ContextualInventoryService.ORDER_KEY
    • decrementInventory

      org.broadleafcommerce.common.extension.ExtensionResultStatusType decrementInventory(Map<Sku,Integer> skuQuantities, Map<String,Object> context) throws InventoryUnavailableException
      Usually invoked within the DecrementInventoryActivity to decrement inventory for the Skus that are in skuQuantities
      Parameters:
      context - can be null. If not null, this should at least contain the ContextualInventoryService.ORDER_KEY and/or the ContextualInventoryService.ROLLBACK_STATE_KEY
      Throws:
      InventoryUnavailableException
    • incrementInventory

      org.broadleafcommerce.common.extension.ExtensionResultStatusType incrementInventory(Map<Sku,Integer> skuQuantities, Map<String,Object> context)
      Parameters:
      context - can be null. If not null, this should at least contain the ContextualInventoryService.ROLLBACK_STATE_KEY
    • reconcileChangeOrderInventory

      org.broadleafcommerce.common.extension.ExtensionResultStatusType reconcileChangeOrderInventory(Map<Sku,Integer> decrementSkuQuantities, Map<Sku,Integer> incrementSkuQuantities, Map<String,Object> context) throws InventoryUnavailableException
      Usually invoked via the OMS ReconcileInventoryChangeOrderActivity to determine how to handle a change order.
      Parameters:
      decrementSkuQuantities -
      incrementSkuQuantities -
      context -
      Returns:
      Throws:
      InventoryUnavailableException
    • isProductBundleAvailable

      org.broadleafcommerce.common.extension.ExtensionResultStatusType isProductBundleAvailable(Product product, int quantity, org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder)
      Usually invoked via the AdvancedProduct to determine the availability of product bundle.
      Parameters:
      product - contains Product
      quantity -
      holder -
    • isBlockingAvailabilityOfProduct

      org.broadleafcommerce.common.extension.ExtensionResultStatusType isBlockingAvailabilityOfProduct(Product baseProduct, Product product, org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder)
      This determines if the missing quantity is critical (blocking) to be added to the cart Usually invoked via the UncacheableDataProcessor to determine the availability of product.
      Parameters:
      baseProduct - base product with add-ons
      product - one of the add-on products of the base product
      holder - holder for result
      Returns:
      ExtensionResultStatusType status after operation