atg.commerce.inventory
Class CachedInventoryInfo

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

public class CachedInventoryInfo
extends java.lang.Object

Holds read-only inventory info about inventory objects (often SKUs)


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CachedInventoryInfo()
           
CachedInventoryInfo(long pStockLevel, long pBackorderLevel, long pPreorderLevel, long pStockThreshold, long pBackorderThreshold, long pPreorderThreshold, int pAvailabilityStatus, java.util.Date pAvailabilityDate)
          Construct a new CachedInventoryInfo with the given static information
CachedInventoryInfo(java.lang.String pInventoryId, InventoryManager pInventoryManager)
          Construct a new CachedInventoryInfo with the given inventory id
CachedInventoryInfo(java.lang.String pInventoryId, InventoryManager pInventoryManager, ApplicationLogging pLog)
          Construct a new CachedInventoryInfo with the given inventory id
 
Method Summary
 java.util.Date getAvailabilityDate()
          The availabilityDate for the inventory item with id inventoryId
 int getAvailabilityStatus()
          The availabilityStatus for the inventory item with id inventoryId
 long getBackorderLevel()
          The backorderLevel for the inventory item with id inventoryId
 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.
 long getPreorderLevel()
          The preorderLevel for the inventory item with id inventoryId
 long getPreorderThreshold()
          The preorderThreshold for the inventory item with id inventoryId
 long getStockLevel()
          The stockLevel for the inventory item with id inventoryId
 long getStockThreshold()
          The stockThreshold for the inventory item with id inventoryId
 void setInventoryId(java.lang.String pInventoryId)
           
 void setInventoryManager(InventoryManager pInventoryManager)
           
 void setLog(ApplicationLogging pLog)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CachedInventoryInfo

public CachedInventoryInfo()

CachedInventoryInfo

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

Parameters:
pInventoryId - The sku whose inventory we are querying.
pInventoryManager - The inventory manager used to retrieve the inventory information. If the inventory manage is also an instance of ApplicationLogging then we use that for the log

CachedInventoryInfo

public CachedInventoryInfo(java.lang.String pInventoryId,
                           InventoryManager pInventoryManager,
                           ApplicationLogging pLog)
Construct a new CachedInventoryInfo 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.

CachedInventoryInfo

public CachedInventoryInfo(long pStockLevel,
                           long pBackorderLevel,
                           long pPreorderLevel,
                           long pStockThreshold,
                           long pBackorderThreshold,
                           long pPreorderThreshold,
                           int pAvailabilityStatus,
                           java.util.Date pAvailabilityDate)
Construct a new CachedInventoryInfo with the given static information

Method Detail

getStockLevel

public long getStockLevel()
                   throws InventoryException
The stockLevel for the inventory item with id inventoryId

Throws:
InventoryException

getBackorderLevel

public long getBackorderLevel()
                       throws InventoryException
The backorderLevel for the inventory item with id inventoryId

Throws:
InventoryException

getPreorderLevel

public long getPreorderLevel()
                      throws InventoryException
The preorderLevel for the inventory item with id inventoryId

Throws:
InventoryException

getStockThreshold

public long getStockThreshold()
                       throws InventoryException
The stockThreshold for the inventory item with id inventoryId

Throws:
InventoryException

getBackorderThreshold

public long getBackorderThreshold()
                           throws InventoryException
The backorderThreshold for the inventory item with id inventoryId

Throws:
InventoryException

getPreorderThreshold

public long getPreorderThreshold()
                          throws InventoryException
The preorderThreshold for the inventory item with id inventoryId

Throws:
InventoryException

getAvailabilityStatus

public int getAvailabilityStatus()
                          throws InventoryException
The availabilityStatus for the inventory item with id inventoryId

Throws:
InventoryException

getAvailabilityDate

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

Throws:
InventoryException

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.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object