@Service(value="blInventoryService") public class InventoryServiceImpl extends Object implements InventoryService
| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService |
| Constructor and Description |
|---|
InventoryServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkBasicAvailablility(Sku sku) |
void |
decrementInventory(Map<Sku,Integer> skuQuantities)
Attempts to decrement inventory for a map of Skus and quantities.
|
void |
decrementInventory(Sku sku,
int quantity)
Attempts to decrement inventory if it is available.
|
void |
incrementInventory(Map<Sku,Integer> skuQuantities)
Attempts to increment inventory for a map of Skus and quantities.
|
void |
incrementInventory(Sku sku,
int quantity)
Attempts to increment inventory.
|
boolean |
isAvailable(Sku sku,
int quantity)
Indicates whether the given quantity is available for the particular skuId.
|
Map<Sku,Integer> |
retrieveQuantitiesAvailable(Set<Sku> skus)
Retrieves the quantities available for a set of Skus.
|
Integer |
retrieveQuantityAvailable(Sku sku)
Retrieves the quantity available for a particular sku.
|
void |
setCatalogService(CatalogService catalogService) |
protected CatalogService catalogService
protected boolean checkBasicAvailablility(Sku sku)
public Integer retrieveQuantityAvailable(Sku sku)
InventoryServiceretrieveQuantityAvailable in interface InventoryServicepublic Map<Sku,Integer> retrieveQuantitiesAvailable(Set<Sku> skus)
InventoryServiceretrieveQuantitiesAvailable in interface InventoryServicepublic boolean isAvailable(Sku sku, int quantity)
InventoryServiceisAvailable in interface InventoryService@Transactional(value="blTransactionManager",
rollbackFor=InventoryUnavailableException.class)
public void decrementInventory(Sku sku,
int quantity)
throws InventoryUnavailableException
InventoryServiceInventoryType.ALWAYS_AVAILABLE
then this is a no-op.decrementInventory in interface InventoryServiceInventoryUnavailableException@Transactional(value="blTransactionManager",
rollbackFor=InventoryUnavailableException.class)
public void decrementInventory(Map<Sku,Integer> skuQuantities)
throws InventoryUnavailableException
InventoryServicedecrementInventory in interface InventoryServiceInventoryUnavailableException@Transactional(value="blTransactionManager") public void incrementInventory(Sku sku, int quantity)
InventoryServiceincrementInventory in interface InventoryService@Transactional(value="blTransactionManager") public void incrementInventory(Map<Sku,Integer> skuQuantities)
InventoryServiceincrementInventory in interface InventoryServicepublic void setCatalogService(CatalogService catalogService)
Copyright © 2014. All Rights Reserved.