atg.commerce.inventory
Class NoInventoryManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.inventory.AbstractInventoryManagerImpl
              extended by atg.commerce.inventory.NoInventoryManager
All Implemented Interfaces:
InventoryManager, MessageSource, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class NoInventoryManager
extends AbstractInventoryManagerImpl
implements MessageSource

This implementation of the InventoryManager interface is intented to be merely a placeholder. It will be useful in cases where no InventoryManager functionality is required, but an inventory manager of some kind is needed for a property setting (for example).


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.commerce.inventory.InventoryManager
AVAILABILITY_STATUS_BACKORDERABLE, AVAILABILITY_STATUS_DERIVED, AVAILABILITY_STATUS_DISCONTINUED, AVAILABILITY_STATUS_IN_STOCK, AVAILABILITY_STATUS_OUT_OF_STOCK, AVAILABILITY_STATUS_PREORDERABLE, INVENTORY_STATUS_FAIL, INVENTORY_STATUS_INSUFFICIENT_SUPPLY, INVENTORY_STATUS_ITEM_NOT_FOUND, INVENTORY_STATUS_SUCCEED
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
NoInventoryManager()
           
 
Method Summary
 int purchase(java.lang.String pId, long pHowMany)
          Actually purchases a product.
 void setMessageSourceContext(MessageSourceContext pContext)
          This notifies the MessageSource as to what its MessageSourceContext should be.
 void startMessageSource()
          This is called to tell the MessageSource that it may begin sending messages.
 void stopMessageSource()
          This is called to tell the MessageSource that it should stop sending messages.
 
Methods inherited from class atg.commerce.inventory.AbstractInventoryManagerImpl
acquireInventoryLocks, backorder, decreaseBackorderLevel, decreasePreorderLevel, decreaseStockLevel, getInventoryName, increaseBackorderLevel, increasePreorderLevel, increaseStockLevel, inventoryWasUpdated, preorder, purchaseOffBackorder, purchaseOffPreorder, queryAvailabilityDate, queryAvailabilityStatus, queryBackorderLevel, queryBackorderThreshold, queryPreorderLevel, queryPreorderThreshold, queryStockLevel, queryStockThreshold, releaseInventoryLocks, setAvailabilityDate, setAvailabilityStatus, setBackorderLevel, setBackorderThreshold, setPreorderLevel, setPreorderThreshold, setStockLevel, setStockThreshold
 
Methods inherited from class atg.nucleus.GenericService
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, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
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
Constructor Detail

NoInventoryManager

public NoInventoryManager()
Method Detail

purchase

public int purchase(java.lang.String pId,
                    long pHowMany)
             throws InventoryException
Actually purchases a product. The backend inventory system should register that a purchase has been made.

Specified by:
purchase in interface InventoryManager
Specified by:
purchase in class AbstractInventoryManagerImpl
Parameters:
pId - the id of the item involved
Returns:
INVENTORY_STATUS_SUCCEED because no work is required
Throws:
InventoryException - if there was a problem during the purchase process.

setMessageSourceContext

public void setMessageSourceContext(MessageSourceContext pContext)
This notifies the MessageSource as to what its MessageSourceContext should be. The context is what the component should use to generate and send out Messages. The component should not actually start to send out Messages until startMessageSource() is called. An implementation will generally store the MessageSourceContext in a member variable.

This is an empty implementation

Specified by:
setMessageSourceContext in interface MessageSource

startMessageSource

public void startMessageSource()
This is called to tell the MessageSource that it may begin sending messages.

This is an empty implementation

Specified by:
startMessageSource in interface MessageSource

stopMessageSource

public void stopMessageSource()
This is called to tell the MessageSource that it should stop sending messages.

This is an empty implementation

Specified by:
stopMessageSource in interface MessageSource