public class InventoryServices extends GenericService
InventoryManager services.
 Inventory accessed by these helper methods is determined by the property
 getInventoryManager().
SimpleInventoryInfo, 
InventoryManager| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION  | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
InventoryServices()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected java.lang.String | 
getAvailabilityStatusMsg(int pCode)
Return a String message that should correspond to the supplied code. 
 | 
SimpleInventoryInfo[] | 
getInventory(java.lang.String[] pSkuIds)
This method will return a SimpleInventoryInfo object for each
 of the given skus. 
 | 
InventoryManager | 
getInventoryManager()
Returns InventoryManager component to query against 
 | 
java.lang.String[] | 
getInventoryStatus(java.lang.String[] pSkuIds)
This method will return an inventory status message for each
 of the given skus. 
 | 
SimpleInventoryInfo[] | 
getLocationInventory(java.lang.String[] pSkuIds,
                    java.lang.String pLocationId)
This method will return a SimpleInventoryInfo object for each of the given skus. 
 | 
java.lang.String[] | 
getLocationInventoryStatus(java.lang.String[] pSkuIds,
                          java.lang.String pLocationId)
This method will return an inventory status message for each
 of the given skus. 
 | 
void | 
setInventoryManager(InventoryManager pInventoryManager)
Sets InventoryManager component to query against 
 | 
void | 
setLocationStockLevel(java.lang.String pSkuId,
                     java.lang.String pLocationId,
                     long pStockLevel)
This method will update the stock level for the given sku. 
 | 
void | 
setLocationStockLevels(java.lang.String[] pSkuIds,
                      java.lang.String pLocationId,
                      long[] pStockLevels)
This method will update each of the given sku ids with the new
 given stock level. 
 | 
void | 
setStockLevel(java.lang.String pSkuId,
             long pStockLevel)
This method will update the stock level for the given sku. 
 | 
void | 
setStockLevels(java.lang.String[] pSkuIds,
              long[] pStockLevels)
This method will update each of the given sku ids with the new
 given stock level. 
 | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic InventoryManager getInventoryManager()
public void setInventoryManager(InventoryManager pInventoryManager)
InventoryManager - public SimpleInventoryInfo[] getInventory(java.lang.String[] pSkuIds) throws InventoryException
pSkuIds - The array of sku ids whose info is returnedInventoryException - Thrown if any of the skus is invalid, or for some other problem.public SimpleInventoryInfo[] getLocationInventory(java.lang.String[] pSkuIds, java.lang.String pLocationId) throws InventoryException
pSkuIds - The array of sku ids whose info is returnedpLocationId - The location of the inventory whose info is returnedInventoryExceptionpublic java.lang.String[] getInventoryStatus(java.lang.String[] pSkuIds)
                                      throws InventoryException
pSkuIds - The array of sku ids whose status will be returnInventoryExceptiongetAvailabilityStatusMsg(int)public java.lang.String[] getLocationInventoryStatus(java.lang.String[] pSkuIds,
                                            java.lang.String pLocationId)
                                              throws InventoryException
pSkuIds - The array of sku ids whose status will be returnpLocationId - The location of the inventory itemInventoryExceptiongetAvailabilityStatusMsg(int)public void setStockLevels(java.lang.String[] pSkuIds,
                  long[] pStockLevels)
                    throws InventoryException
pStockLevels corresponds
 to an id in pSkuIdspSkuIds - An array of sku ids being updatedpStockLevels - An array the same length as pSkuIdsInventoryExceptionpublic void setLocationStockLevels(java.lang.String[] pSkuIds,
                          java.lang.String pLocationId,
                          long[] pStockLevels)
                            throws InventoryException
pStockLevels corresponds
 to an id in pSkuIdspSkuIds - An array of sku ids being updatedpLocationId - The Location Id to updatepStockLevels - An array the same length as pSkuIdsInventoryExceptionpublic void setStockLevel(java.lang.String pSkuId,
                 long pStockLevel)
                   throws InventoryException
pSkuId - The sku being updatedpStockLevel - The new stock levelInventoryExceptionpublic void setLocationStockLevel(java.lang.String pSkuId,
                         java.lang.String pLocationId,
                         long pStockLevel)
                           throws InventoryException
pSkuId - The sku being updatedpLocationId - The location being updatedpStockLevel - The new stock levelInventoryExceptionprotected java.lang.String getAvailabilityStatusMsg(int pCode)