atg.commerce.inventory
Class InventoryInfo

java.lang.Object
  extended by atg.commerce.inventory.InventoryInfo

public class InventoryInfo
extends java.lang.Object

This class can be used to retrieve inventory information for a given sku on demand. As each property is accessed a call is made to the inventory manager. If there is an error returning any of the inventory information, null is returned. Created: Fri Jun 16 14:57:30 2000

See Also:
InventoryDroplet

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
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
 
Method Summary
 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
 java.lang.Long getBackorderLevel()
          The backorderLevel 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
 ApplicationLogging getLog()
          Error messages are logged here.
 java.lang.Long getPreorderLevel()
          The preorderLevel 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.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 setLog(ApplicationLogging pLog)
           
 void setLogMissingInventoryExceptionsAsError(boolean pLogMissingInventoryExceptionsAsError)
          Set the logMissingInventoryExceptionsAsError property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

InventoryInfo

public InventoryInfo()

InventoryInfo

public InventoryInfo(java.lang.String pInventoryId,
                     InventoryManager pInventoryManager)
Construct a new InventoryInfo with the given inventory id

Parameters:
pInventoryId - The sku whose inventory we are querying.
pInventoryManager - The inventory manager used to retrieve the inventory information.

InventoryInfo

public InventoryInfo(java.lang.String pInventoryId,
                     InventoryManager pInventoryManager,
                     ApplicationLogging pLog)
Construct a new InventoryInfo with the given inventory id

Parameters:
pInventoryId - The sku whose inventory we are querying.
pInventoryManager - The inventory manager used to retrieve the inventory information.
pLog - All errors are logged here.
Method Detail

setLogMissingInventoryExceptionsAsError

public void setLogMissingInventoryExceptionsAsError(boolean pLogMissingInventoryExceptionsAsError)
Set the logMissingInventoryExceptionsAsError property.


isLogMissingInventoryExceptionsAsError

public boolean isLogMissingInventoryExceptionsAsError()
Return the logMissingInventoryExceptionsAsError property.


getStockLevel

public java.lang.Long getStockLevel()
The stockLevel for the inventory item with id inventoryId


getBackorderLevel

public java.lang.Long getBackorderLevel()
The backorderLevel for the inventory item with id inventoryId


getPreorderLevel

public java.lang.Long getPreorderLevel()
The preorderLevel for the inventory item with id inventoryId


getStockThreshold

public java.lang.Long getStockThreshold()
The stockThreshold for the inventory item with id inventoryId


getBackorderThreshold

public java.lang.Long getBackorderThreshold()
The backorderThreshold for the inventory item with id inventoryId


getPreorderThreshold

public java.lang.Long getPreorderThreshold()
The preorderThreshold for the inventory item with id inventoryId


getAvailabilityStatus

public java.lang.Integer getAvailabilityStatus()
The availabilityStatus for the inventory item with id inventoryId


getAvailabilityStatusMsg

public java.lang.String getAvailabilityStatusMsg()
The string associated with the availabilityStatus for the inventory item with id inventoryId


getAvailabilityDate

public java.util.Date getAvailabilityDate()
The availabilityDate for the inventory item with id inventoryId


setInventoryManager

public void setInventoryManager(InventoryManager pInventoryManager)

getInventoryManager

public InventoryManager getInventoryManager()
The inventory manager used to retrieve each of these properties


setInventoryId

public void setInventoryId(java.lang.String pInventoryId)

getInventoryId

public java.lang.String getInventoryId()
The id of the inventory item having each of these properties.


setLog

public void setLog(ApplicationLogging pLog)

getLog

public ApplicationLogging getLog()
Error messages are logged here. Responsibility of the creator of the object to set this. If this is null, errors are logged to System.out.


getAvailabilityStatusMessage

protected java.lang.String getAvailabilityStatusMessage(int pCode)
Return a String message that should correspond to the supplied code. Currently the code to String mapping is as follows: