public class BasicInventoryServiceImpl extends Object implements BasicInventoryService
| Modifier and Type | Field and Description |
|---|---|
protected org.broadleafcommerce.core.catalog.service.CatalogService |
catalogService |
protected BasicInventoryDao |
inventoryDao |
| Constructor and Description |
|---|
BasicInventoryServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkBasicAvailablility(org.broadleafcommerce.core.catalog.domain.Sku sku) |
void |
decrementInventory(Long skuId,
int quantity)
Attempts to decrement inventory if it is available.
|
void |
decrementInventory(Map<Long,Integer> skuQuantities)
Attempts to decrement inventory for a map of Sku ids and quantities.
|
void |
incrementInventory(Long skuId,
int quantity)
Attempts to increment inventory.
|
void |
incrementInventory(Map<Long,Integer> skuQuantities)
Attempts to increment inventory for a map of Sku ids and quantities.
|
boolean |
isAvailable(Long skuId,
int quantity)
Indicates whether the given quantity is available for the particular skuId.
|
Map<Long,Integer> |
retrieveQuantitiesAvailable(Set<Long> skuIds)
Retrieves the quantities available for a set of sku ids.
|
Integer |
retrieveQuantityAvailable(Long skuId)
Retrieves the quantity available for a particular sku.
|
void |
setCatalogService(org.broadleafcommerce.core.catalog.service.CatalogService catalogService) |
void |
setInventoryDao(BasicInventoryDao inventoryDao) |
protected BasicInventoryDao inventoryDao
protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService
protected boolean checkBasicAvailablility(org.broadleafcommerce.core.catalog.domain.Sku sku)
@Transactional(value="blTransactionManager") public Integer retrieveQuantityAvailable(Long skuId)
BasicInventoryServiceretrieveQuantityAvailable in interface BasicInventoryService@Transactional(value="blTransactionManager") public Map<Long,Integer> retrieveQuantitiesAvailable(Set<Long> skuIds)
BasicInventoryServiceretrieveQuantitiesAvailable in interface BasicInventoryService@Transactional(value="blTransactionManager") public boolean isAvailable(Long skuId, int quantity)
BasicInventoryServiceisAvailable in interface BasicInventoryService@Transactional(value="blTransactionManager",
rollbackFor=BasicInventoryUnavailableException.class)
public void decrementInventory(Long skuId,
int quantity)
throws BasicInventoryUnavailableException
BasicInventoryServicedecrementInventory in interface BasicInventoryServiceBasicInventoryUnavailableException@Transactional(value="blTransactionManager",
rollbackFor=BasicInventoryUnavailableException.class)
public void decrementInventory(Map<Long,Integer> skuQuantities)
throws BasicInventoryUnavailableException
BasicInventoryServicedecrementInventory in interface BasicInventoryServiceBasicInventoryUnavailableException@Transactional(value="blTransactionManager") public void incrementInventory(Long skuId, int quantity)
BasicInventoryServiceincrementInventory in interface BasicInventoryService@Transactional(value="blTransactionManager") public void incrementInventory(Map<Long,Integer> skuQuantities)
BasicInventoryServiceincrementInventory in interface BasicInventoryServicepublic void setInventoryDao(BasicInventoryDao inventoryDao)
public void setCatalogService(org.broadleafcommerce.core.catalog.service.CatalogService catalogService)
Copyright © 2014. All rights reserved.