public class InventoryInfo
extends java.lang.Object
InventoryDroplet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
InventoryInfo() |
InventoryInfo(java.lang.String pInventoryId,
InventoryManager pInventoryManager)
Construct a new InventoryInfo with the given inventory id
|
InventoryInfo(java.lang.String pInventoryId,
InventoryManager pInventoryManager,
ApplicationLogging pLog)
Construct a new InventoryInfo with the given inventory id
|
InventoryInfo(java.lang.String pInventoryId,
java.lang.String pLocationId,
InventoryManager pInventoryManager)
Construct a new InventoryInfo with the given location and inventory id
|
InventoryInfo(java.lang.String pInventoryId,
java.lang.String pLocationId,
InventoryManager pInventoryManager,
ApplicationLogging pLog)
Construct a new InventoryInfo with the given inventory id
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAvailabilityDate()
The availabilityDate for the inventory item with id
inventoryId |
java.lang.Integer |
getAvailabilityStatus()
The availabilityStatus for the inventory item with id
inventoryId |
protected java.lang.String |
getAvailabilityStatusMessage(int pCode)
Return a String message that should correspond to the supplied code.
|
java.lang.String |
getAvailabilityStatusMsg()
The string associated with the availabilityStatus for the
inventory item with id
inventoryId
1000 constant InventoryManager.AVAILABILITY_STATUS_IN_STOCK -> INSTOCK
1001 constant InventoryManager.AVAILABILITY_STATUS_OUT_OF_STOCK -> OUTOFSTOCK
1002 constant InventoryManager.AVAILABILITY_STATUS_PREORDERABLE -> PREORDERABLE
1003 constant InventoryManager.AVAILABILITY_STATUS_BACKORDERABLE -> BACKORDERABLE
1005 constant InventoryManager.AVAILABILITY_STATUS_DISCONTINUED -> DISCONTINUED
|
AvailableToPromise |
getAvailableToPromise()
The availability dates information for the inventory item with id
inventoryId |
java.lang.Long |
getBackorderLevel()
The backorderLevel for the inventory item with id
inventoryId |
java.lang.Double |
getBackorderLevelDerivedAsFloatingPoint()
This method will decide upon the correct back order level value to return.
|
java.lang.Double |
getBackorderLevelWithFraction()
The backorderLevelWithFraction for the inventory item with id
inventoryId |
java.lang.Long |
getBackorderThreshold()
The backorderThreshold for the inventory item with id
inventoryId |
java.lang.String |
getInventoryId()
The id of the inventory item having each of these properties.
|
InventoryManager |
getInventoryManager()
The inventory manager used to retrieve each of these properties
|
java.lang.String |
getLocationId()
The id of the inventory item's location.
|
ApplicationLogging |
getLog()
Error messages are logged here.
|
java.lang.Long |
getPreorderLevel()
The preorderLevel for the inventory item with id
inventoryId |
java.lang.Double |
getPreorderLevelDerivedAsFloatingPoint()
This method will decide upon the correct pre order level value to return.
|
java.lang.Double |
getPreorderLevelWithFraction()
The preorderLevelWithFraction for the inventory item with id
inventoryId |
java.lang.Long |
getPreorderThreshold()
The preorderThreshold for the inventory item with id
inventoryId |
java.lang.Long |
getStockLevel()
The stockLevel for the inventory item with id
inventoryId |
java.lang.Double |
getStockLevelDerivedAsFloatingPoint()
This method will decide upon the correct stock level value to return.
|
java.lang.Double |
getStockLevelWithFraction()
The stockLevelWithFraction for the inventory item with id
inventoryId |
java.lang.Long |
getStockThreshold()
The stockThreshold for the inventory item with id
inventoryId |
boolean |
isLogMissingInventoryExceptionsAsError()
Return the logMissingInventoryExceptionsAsError property.
|
void |
setInventoryId(java.lang.String pInventoryId) |
void |
setInventoryManager(InventoryManager pInventoryManager) |
void |
setLocationId(java.lang.String pLocationId) |
void |
setLog(ApplicationLogging pLog) |
void |
setLogMissingInventoryExceptionsAsError(boolean pLogMissingInventoryExceptionsAsError)
Set the logMissingInventoryExceptionsAsError property.
|
public InventoryInfo()
public InventoryInfo(java.lang.String pInventoryId, InventoryManager pInventoryManager)
pInventoryId
- The sku whose inventory we are querying.pInventoryManager
- The inventory manager used to retrieve the inventory information.public InventoryInfo(java.lang.String pInventoryId, java.lang.String pLocationId, InventoryManager pInventoryManager)
pInventoryId
- The sku whose inventory we are queryingpLocationId
- the location of the inventorypInventoryManager
- The inventory manager used to retrieve the inventory informationpublic InventoryInfo(java.lang.String pInventoryId, InventoryManager pInventoryManager, ApplicationLogging pLog)
pInventoryId
- The sku whose inventory we are querying.pLocationId
- the location of the inventory.pInventoryManager
- The inventory manager used to retrieve the inventory information.pLog
- All errors are logged here.public InventoryInfo(java.lang.String pInventoryId, java.lang.String pLocationId, InventoryManager pInventoryManager, ApplicationLogging pLog)
pInventoryId
- The sku whose inventory we are querying.pLocationId
- the location of the inventory.pInventoryManager
- The inventory manager used to retrieve the inventory information.pLog
- All errors are logged here.public void setLogMissingInventoryExceptionsAsError(boolean pLogMissingInventoryExceptionsAsError)
public boolean isLogMissingInventoryExceptionsAsError()
public java.lang.Long getStockLevel()
inventoryId
public java.lang.Double getStockLevelWithFraction()
inventoryId
public java.lang.Double getStockLevelDerivedAsFloatingPoint()
It will return the value of the stockLevelWithFraction
property if it is greater than or equal to zero. Otherwise the value for the
stockLevel
property will be returned.
The method should be used where there is a need to know the stockLevel of an item
but it is unknown to the caller as to which property stockLevelWithFraction
or
stockLevel
holds the value.
public java.lang.Long getBackorderLevel()
inventoryId
public java.lang.Double getBackorderLevelWithFraction()
inventoryId
public java.lang.Double getBackorderLevelDerivedAsFloatingPoint()
It will return the value of the backorderLevelWithFraction
property if it is greater than or equal to zero. Otherwise the value for the
backorderLevel
property will be returned.
The method should be used where there is a need to know the backorderLevel of an item
but it is unknown to the caller as to which property backorderLevelWithFraction
or
backorderLevel
holds the value.
public java.lang.Long getPreorderLevel()
inventoryId
public java.lang.Double getPreorderLevelWithFraction()
inventoryId
public java.lang.Double getPreorderLevelDerivedAsFloatingPoint()
It will return the value of the preorderLevelWithFraction
property if it is greater than or equal to zero. Otherwise the value for the
preorderLevel
property will be returned.
The method should be used where there is a need to know the preorderLevel of an item
but it is unknown to the caller as to which property preorderLevelWithFraction
or
preorderLevel
holds the value.
public java.lang.Long getStockThreshold()
inventoryId
public java.lang.Long getBackorderThreshold()
inventoryId
public java.lang.Long getPreorderThreshold()
inventoryId
public java.lang.Integer getAvailabilityStatus()
inventoryId
public java.lang.String getAvailabilityStatusMsg()
inventoryId
public java.util.Date getAvailabilityDate()
inventoryId
public AvailableToPromise getAvailableToPromise() throws InventoryException
inventoryId
InventoryException
public void setInventoryManager(InventoryManager pInventoryManager)
public InventoryManager getInventoryManager()
public void setInventoryId(java.lang.String pInventoryId)
public java.lang.String getInventoryId()
public void setLocationId(java.lang.String pLocationId)
public java.lang.String getLocationId()
public void setLog(ApplicationLogging pLog)
public ApplicationLogging getLog()
protected java.lang.String getAvailabilityStatusMessage(int pCode)