|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface InventoryService
This is a basic inventory service for Broadleaf Commerce. This API defines a basic set of functions for checking
inventory availability and for adjusting inventory.
NOTE: If you wrap this service inside another service or transactional component, it may be best to ensure that
transactions are rolled back when encountering checked exceptions that are thrown from this service, such as
InventoryUnavailableException and ConcurrentInventoryModificationException
| Method Summary | |
|---|---|
void |
decrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
Subtracts the quantity from available inventory in the default fulfillment location for each sku in the map. |
void |
decrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
Subtracts the quantity from available inventory for each sku in the map for the given fulfillment location. |
void |
decrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
Subtracts the quantity from inventory on hand in the default fulfillment location for each sku in the map. |
void |
decrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
Subtracts the quantity from inventory on hand for each sku in the map for the given fulfillment location. |
void |
incrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
Attempts to add available inventory to an inventory record associated with a default fulfillment location. |
void |
incrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
Add available inventory to sku. |
void |
incrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
Attempts to add inventory on hand to an inventory record associated with a default fulfillment location. |
void |
incrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
Add inventory on hand to sku. |
boolean |
isQuantityAvailable(org.broadleafcommerce.core.catalog.domain.Sku sku,
Integer quantity)
Retrieves whether or not the quantity is available for a sku at all fulfillment locations. |
boolean |
isQuantityAvailable(org.broadleafcommerce.core.catalog.domain.Sku sku,
Integer quantity,
FulfillmentLocation fulfillmentLocation)
Retrieves whether or not the quantity is available for a sku at a fulfillment location. |
boolean |
isSkuEligibleForInventoryCheck(org.broadleafcommerce.core.catalog.domain.Sku sku)
Tests whether an inventory check will be invoked for the given Sku. |
Inventory |
readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku)
Retrieves inventory for this sku at the default fulfillment location. |
Inventory |
readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku,
FulfillmentLocation fulfillmentLocation)
Retrieves the Inventory for the given Sku and FulfillmentLocation |
List<Inventory> |
readInventoryForFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
Retrieves all instances of Inventory for this fulfillmentLocation |
List<org.broadleafcommerce.core.catalog.domain.Sku> |
readSkusNotAtFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
Retrieves skus that do not have inventory records at a particular fulfillment location |
Inventory |
save(Inventory inventory)
Persists the inventory |
| Method Detail |
|---|
boolean isSkuEligibleForInventoryCheck(org.broadleafcommerce.core.catalog.domain.Sku sku)
sku -
boolean isQuantityAvailable(org.broadleafcommerce.core.catalog.domain.Sku sku,
Integer quantity)
sku - the skuquantity - the amount for which to check; must be a positive integer
boolean isQuantityAvailable(org.broadleafcommerce.core.catalog.domain.Sku sku,
Integer quantity,
FulfillmentLocation fulfillmentLocation)
sku - the skuquantity - the amount for which to check; must be a positive integerfulfillmentLocation - the fulfillment location
void decrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
throws ConcurrentInventoryModificationException,
InventoryUnavailableException
skuInventory - a map which contains the quantity of inventory to subtract from available inventory for each sku
ConcurrentInventoryModificationException
InventoryUnavailableException
void decrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
throws ConcurrentInventoryModificationException,
InventoryUnavailableException
skuInventory - a map which contains the quantity of inventory to subtract from available inventory for each skufulfillmentLocation - the fulfillment location
ConcurrentInventoryModificationException
InventoryUnavailableException
void decrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
throws ConcurrentInventoryModificationException,
InventoryUnavailableException
skuInventory -
ConcurrentInventoryModificationException
InventoryUnavailableException
void decrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
throws ConcurrentInventoryModificationException,
InventoryUnavailableException
skuInventory - fulfillmentLocation -
ConcurrentInventoryModificationException
InventoryUnavailableException
void incrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
throws ConcurrentInventoryModificationException
IllegalArgumentException.
skuInventory - fulfillmentLocation -
ConcurrentInventoryModificationException
void incrementInventory(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
throws ConcurrentInventoryModificationException
skuInventory -
ConcurrentInventoryModificationException
IllegalStateException - if no default fulfillment location could be found for the Sku.
void incrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory,
FulfillmentLocation fulfillmentLocation)
throws ConcurrentInventoryModificationException
IllegalArgumentException.
skuInventory - fulfillmentLocation -
ConcurrentInventoryModificationException
void incrementInventoryOnHand(Map<org.broadleafcommerce.core.catalog.domain.Sku,Integer> skuInventory)
throws ConcurrentInventoryModificationException
skuInventory -
ConcurrentInventoryModificationException
Inventory readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku,
FulfillmentLocation fulfillmentLocation)
Inventory for the given Sku and FulfillmentLocation
sku - SkufulfillmentLocation - FulfillmentLocation
InventoryInventory readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku)
sku -
List<Inventory> readInventoryForFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
fulfillmentLocation -
Inventory
Inventory save(Inventory inventory)
throws ConcurrentInventoryModificationException
ConcurrentInventoryModificationExceptionList<org.broadleafcommerce.core.catalog.domain.Sku> readSkusNotAtFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
fulfillmentLocation -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||