atg.projects.store.inventory
Class StoreInventoryManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.messaging.SourceSinkTemplate
              extended by atg.commerce.inventory.RepositoryInventoryManager
                  extended by atg.projects.store.inventory.StoreInventoryManager
All Implemented Interfaces:
atg.commerce.inventory.InventoryManager, atg.commerce.inventory.LocationInventoryManager, atg.dms.patchbay.MessageSink, atg.dms.patchbay.MessageSource, atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreInventoryManager
extends atg.commerce.inventory.RepositoryInventoryManager

This class is an extension of the RepositoryInventoryManager. It will be responsible for writing to the inventory repository. This should only happen from the fulfillment server.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/inventory/StoreInventoryManager.java#6 $
Author:
ATG

Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
static long DEFAULT_THRESHOLD_LEVEL
          Default threshold level constant.
static java.lang.String NO_PARENT_PRODUCT_FOUND
           
static java.lang.String NO_SUCH_ITEM
          Resource keys for error messages
static java.lang.String PARAM_LOCATION_ID
           
static java.lang.String PARAM_SITE_ID
           
static java.lang.String RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM
          RQL query for duplicating item.
static java.lang.String RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM_WITH_LOCATION
           
 
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
StoreInventoryManager()
           
 
Method Summary
protected  void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository, java.lang.String pCatalogRefId, java.lang.String pEmail, java.lang.String pProductId)
          Creates the required item in the repository.
protected  void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository, java.lang.String pCatalogRefId, java.lang.String pEmail, java.lang.String pProductId, java.lang.String pLocale, java.lang.String pSiteId)
          Creates the required item in the repository.
protected  void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository, java.lang.String pCatalogRefId, java.lang.String pEmail, java.lang.String pProductId, java.lang.String pLocale, java.lang.String pSiteId, java.lang.String pLocationId)
           
protected  int deriveAvailabilityStatus(java.lang.String pSkuId, java.lang.String pLocationId)
           Derive the availabilityStatus based on the properties of the item.
 java.util.Date getBackorderAvailabilityDate(java.lang.String pSkuId)
          Get the availabilityDate from the inventory data for a SKU item.
 java.util.Date getBackorderAvailabilityDate(java.lang.String pSkuId, java.lang.String pLocationId)
           
 StoreCatalogProperties getCatalogProperties()
           
 atg.service.util.CurrentDate getCurrentDate()
          Gets the CurrentDate component.
 long getDefaultThresholdLevel()
           
protected  long getInventoryLevel(atg.repository.RepositoryItem pInventory, java.lang.String pInventoryLevelPropertyName, long pDefaultLevel)
          Given the inventory item of note get the inventory level for the particular property.
 atg.repository.Repository getOrderRepository()
           
 java.util.Date getPreorderAvailabilityDate(atg.repository.RepositoryItem pProduct)
          Get the availabilityDate for a product.
 StorePropertyManager getPropertyManager()
           
protected  java.lang.Object getPropertyValue(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName)
          Returns the object associated with the given property name.
 int increaseStockLevel(java.lang.String pSkuId, long pQuantity, java.lang.String pLocationId)
          This method will send an "UpdateInventory" message if the item changes from Out of stock to In stock with this method.
 boolean isBackInStockItemExists(atg.repository.MutableRepository pRepository, java.lang.String pCatalogRefId, java.lang.String pEmail, java.lang.String pProductId)
          Check to see if backInStoreNotifyItem already exists for this combination of CatalogRefId and email.
 boolean isBackInStockItemExists(atg.repository.MutableRepository pRepository, java.lang.String pCatalogRefId, java.lang.String pEmail, java.lang.String pProductId, java.lang.String pLocationId)
           
 boolean isItemInStock(java.lang.String pSkuId)
          Returns true if SKU is in stock.
 boolean isItemInStock(java.lang.String pSkuId, java.lang.String pLocationId)
           
 boolean isLogMissingInventoryExceptionsAsError()
          Return the logMissingInventoryExceptionsAsError property.
 boolean logInventoryException(atg.commerce.inventory.InventoryException pException)
          The method logs InventoryException.
 int queryAvailabilityStatus(atg.repository.RepositoryItem pProduct, java.lang.String pSkuId)
          Derive the availabilityStatus based on the properties of the product and the item.
 int queryAvailabilityStatus(atg.repository.RepositoryItem pProduct, java.lang.String pSkuId, java.lang.String pLocationId)
           
 int queryAvailabilityStatus(java.lang.String pSkuId, java.lang.String pLocationId)
          Override base method to honor not only inventory item but product's preorderable settings when determining availability status.
 void setCatalogProperties(StoreCatalogProperties pCatalogProperties)
           
 void setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
          Sets the CurrentDate component.
 void setDefaultThresholdLevel(long pDefaultThresholdLevel)
           
 void setLogMissingInventoryExceptionsAsError(boolean pLogMissingInventoryExceptionsAsError)
          Set the logMissingInventoryExceptionsAsError property.
 void setOrderRepository(atg.repository.Repository pOrderRepository)
           
 void setPropertyManager(StorePropertyManager pPropertyManager)
          .
 int setStockLevel(java.lang.String pSkuId, long pQuantity, java.lang.String pLocationId)
          This method will send an "UpdateInventory" message if the item changes from Out of stock to In stock with this method.
 
Methods inherited from class atg.commerce.inventory.RepositoryInventoryManager
acquireInventoryLocks, acquireInventoryLocks, backorder, backorder, backorderBundle, decreaseBackorderLevel, decreaseBackorderLevel, decreasePreorderLevel, decreasePreorderLevel, decreaseStockLevel, decreaseStockLevel, decrementSKULevel, decrementSKULevel, deriveAvailabilityStatus, deriveBundleAvailabilityStatus, deriveBundleAvailabilityStatus, getATPDatePropertyName, getATPInformationPropertyName, getATPQuantityPropertyName, getAvailabilityDatePropertyName, getAvailabilityStatusBackorderableValue, getAvailabilityStatusDerivedValue, getAvailabilityStatusDiscontinuedValue, getAvailabilityStatusInStockValue, getAvailabilityStatusOutOfStockValue, getAvailabilityStatusPreorderableValue, getAvailabilityStatusPropertyName, getBackorderLevelPropertyName, getBackorderThresholdPropertyName, getBundledIds, getBundleLinks, getBundleLinks, getBundleLinksPropertyName, getCatalogRefIdMatchQuery, getCatalogRefIdPropertyName, getCatalogRefItem, getCatalogRefItemType, getCatalogRefRepository, getClientLockManager, getDefaultBackorderLevel, getDefaultPreorderLevel, getDefaultStockLevel, getInventoryEventPort, getInventoryItem, getInventoryItem, getInventoryItemForUpdate, getInventoryItemForUpdate, getInventoryName, getInventoryRowLockProperty, getInventoryRowLockSQL, getItemType, getLocationCatalogRefIdMatchQuery, getLocationInventoryRowLockSQL, getMaximumRetriesPerRowLock, getMessageIdGenerator, getMessageIdSpaceName, getMillisecondDelayBeforeLockRetry, getNextMessageId, getPreorderLevelPropertyName, getPreorderThresholdPropertyName, getRepository, getSkuLinkItemPropertyName, getSkuLinkQuantityPropertyName, getStockLevelPropertyName, getStockThresholdPropertyName, getUpdateInventoryPort, increaseBackorderLevel, increaseBackorderLevel, increasePreorderLevel, increasePreorderLevel, increaseStockLevel, inventoryWasUpdated, inventoryWasUpdated, isBundle, lock, lock, preorder, preorder, preorderBundle, preorderBundle, purchase, purchase, purchaseBundle, purchaseBundle, purchaseBundleOffBackorder, purchaseBundleOffBackorder, purchaseBundleOffPreorder, purchaseBundleOffPreorder, purchaseOffBackorder, purchaseOffBackorder, purchaseOffPreorder, purchaseOffPreorder, queryAvailabilityDate, queryAvailabilityDate, queryAvailabilityStatus, queryAvailableToPromise, queryBackorderLevel, queryBackorderLevel, queryBackorderThreshold, queryBackorderThreshold, queryBundleAvailabilityDate, queryBundleBackorderLevel, queryBundleBackorderLevel, queryBundleBackorderThreshold, queryBundlePreorderLevel, queryBundlePreorderThreshold, queryBundleStockLevel, queryBundleStockThreshold, queryInventoryInformation, queryInventoryInformation, queryInventoryInformation, queryInventoryInformation, queryPreorderLevel, queryPreorderLevel, queryPreorderThreshold, queryPreorderThreshold, queryStockLevel, queryStockLevel, queryStockThreshold, queryStockThreshold, releaseInventoryLocks, releaseInventoryLocks, setATPDatePropertyName, setATPInformationPropertyName, setATPQuantityPropertyName, setAvailabilityDate, setAvailabilityDate, setAvailabilityDatePropertyName, setAvailabilityStatus, setAvailabilityStatus, setAvailabilityStatusBackorderableValue, setAvailabilityStatusDerivedValue, setAvailabilityStatusDiscontinuedValue, setAvailabilityStatusInStockValue, setAvailabilityStatusOutOfStockValue, setAvailabilityStatusPreorderableValue, setAvailabilityStatusPropertyName, setBackorderLevel, setBackorderLevel, setBackorderLevelPropertyName, setBackorderThreshold, setBackorderThreshold, setBackorderThresholdPropertyName, setBundleLinksPropertyName, setCatalogRefIdMatchQuery, setCatalogRefIdPropertyName, setCatalogRefItemType, setCatalogRefRepository, setClientLockManager, setDefaultBackorderLevel, setDefaultPreorderLevel, setDefaultStockLevel, setInventoryEventPort, setInventoryName, setInventoryRowLockProperty, setInventoryRowLockSQL, setItemType, setLocationCatalogRefIdMatchQuery, setLocationInventoryRowLockSQL, setMaximumRetriesPerRowLock, setMessageIdGenerator, setMessageIdSpaceName, setMillisecondDelayBeforeLockRetry, setPreorderLevel, setPreorderLevel, setPreorderLevelPropertyName, setPreorderThreshold, setPreorderThreshold, setPreorderThresholdPropertyName, setRepository, setSkuLinkItemPropertyName, setSkuLinkQuantityPropertyName, setStockLevel, setStockLevelPropertyName, setStockThreshold, setStockThreshold, setStockThresholdPropertyName, setUpdateInventoryPort, thresholdHasBeenReached, thresholdHasBeenReached, unlock, unlock, updateItem
 
Methods inherited from class atg.commerce.messaging.SourceSinkTemplate
getDelayOnSendRetry, getMessageSourceContext, getMessageSourceName, getTransactionManager, isAllowMessageSending, receiveMessage, sendCommerceMessage, sendObjectMessage, setAllowMessageSending, setDelayOnSendRetry, setMessageSourceContext, setMessageSourceName, setTransactionManager, startMessageSource, stopMessageSource
 
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

PARAM_SITE_ID

public static final java.lang.String PARAM_SITE_ID
See Also:
Constant Field Values

PARAM_LOCATION_ID

public static final java.lang.String PARAM_LOCATION_ID
See Also:
Constant Field Values

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values

NO_SUCH_ITEM

public static final java.lang.String NO_SUCH_ITEM
Resource keys for error messages

See Also:
Constant Field Values

NO_PARENT_PRODUCT_FOUND

public static final java.lang.String NO_PARENT_PRODUCT_FOUND
See Also:
Constant Field Values

RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM

public static final java.lang.String RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM
RQL query for duplicating item.

See Also:
Constant Field Values

RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM_WITH_LOCATION

public static final java.lang.String RQL_QUERY_DUPLICATE_BACK_IN_STOCK_ITEM_WITH_LOCATION
See Also:
Constant Field Values

DEFAULT_THRESHOLD_LEVEL

public static final long DEFAULT_THRESHOLD_LEVEL
Default threshold level constant.

See Also:
Constant Field Values
Constructor Detail

StoreInventoryManager

public StoreInventoryManager()
Method Detail

getPropertyManager

public StorePropertyManager getPropertyManager()
Returns:
the StorePropertyManager.

setPropertyManager

public void setPropertyManager(StorePropertyManager pPropertyManager)
.

Parameters:
pPropertyManager - the StorePropertyManager to set.

setDefaultThresholdLevel

public void setDefaultThresholdLevel(long pDefaultThresholdLevel)
Parameters:
pDefaultThresholdLevel - - the default value if the stock level of an item is not defined.

getDefaultThresholdLevel

public long getDefaultThresholdLevel()
Returns:
the default value if the stock level of an item is not defined.

getOrderRepository

public atg.repository.Repository getOrderRepository()
Returns:
order repository.

setOrderRepository

public void setOrderRepository(atg.repository.Repository pOrderRepository)
Parameters:
pOrderRepository - - order repository.

getCatalogProperties

public StoreCatalogProperties getCatalogProperties()
Returns:
catalog properties.

setCatalogProperties

public void setCatalogProperties(StoreCatalogProperties pCatalogProperties)
Parameters:
pCatalogProperties - - catalog properties to set.

setCurrentDate

public void setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
Sets the CurrentDate component.


getCurrentDate

public atg.service.util.CurrentDate getCurrentDate()
Gets the CurrentDate component.


setLogMissingInventoryExceptionsAsError

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


isLogMissingInventoryExceptionsAsError

public boolean isLogMissingInventoryExceptionsAsError()
Return the logMissingInventoryExceptionsAsError property.


setStockLevel

public int setStockLevel(java.lang.String pSkuId,
                         long pQuantity,
                         java.lang.String pLocationId)
                  throws atg.commerce.inventory.InventoryException
This method will send an "UpdateInventory" message if the item changes from Out of stock to In stock with this method.

Specified by:
setStockLevel in interface atg.commerce.inventory.LocationInventoryManager
Overrides:
setStockLevel in class atg.commerce.inventory.RepositoryInventoryManager
Parameters:
pSkuId - - The id of the SKU whose stockLevel is being set.
pQuantity - - The amount to set the stockLevel to.
Returns:
INVENTORY_STATUS_SUCCEED if the item's stock level was set successfully. INVENTORY_STATUS_ITEM_NOT_FOUND if no item could be found for the SKU.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

increaseStockLevel

public int increaseStockLevel(java.lang.String pSkuId,
                              long pQuantity,
                              java.lang.String pLocationId)
                       throws atg.commerce.inventory.InventoryException
This method will send an "UpdateInventory" message if the item changes from Out of stock to In stock with this method.

Specified by:
increaseStockLevel in interface atg.commerce.inventory.LocationInventoryManager
Overrides:
increaseStockLevel in class atg.commerce.inventory.RepositoryInventoryManager
Parameters:
pSkuId - The id of the SKU whose stockLevel is being increased.
pQuantity - The amount to increase the stockLevel to.
Returns:
INVENTORY_STATUS_SUCCEED if the item's stock level was set successfully. INVENTORY_STATUS_ITEM_NOT_FOUND if no item could be found for the SKU.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

deriveAvailabilityStatus

protected int deriveAvailabilityStatus(java.lang.String pSkuId,
                                       java.lang.String pLocationId)
                                throws atg.commerce.inventory.InventoryException

Derive the availabilityStatus based on the properties of the item. Always derives the status, does not check the current value of availabilityStatus.

Uses these rules: (a negative level indicates infinite supply)

Overrides:
deriveAvailabilityStatus in class atg.commerce.inventory.RepositoryInventoryManager
Parameters:
pSkuId - - The SKU we are deriving the status for.
Returns:
The derived status.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

isItemInStock

public boolean isItemInStock(java.lang.String pSkuId)
                      throws atg.commerce.inventory.InventoryException
Returns true if SKU is in stock.

Parameters:
pSkuId - SKU ID.
Returns:
true if SKU is in stock.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

isItemInStock

public boolean isItemInStock(java.lang.String pSkuId,
                             java.lang.String pLocationId)
                      throws atg.commerce.inventory.InventoryException
Throws:
atg.commerce.inventory.InventoryException

queryAvailabilityStatus

public int queryAvailabilityStatus(atg.repository.RepositoryItem pProduct,
                                   java.lang.String pSkuId)
                            throws atg.commerce.inventory.InventoryException
Derive the availabilityStatus based on the properties of the product and the item. Always derives the status, does not check the current value of availabilityStatus. Pre-orderability is checked first. Pre-orderability can be set based just on product properties or on a combination of product properties and inventory levels. The end date for pre-orderability can be set to a fixed date or use stockLevel to determine when it ends. If an item is not pre-orderable, then the inventory levels are checked to see if it is available, back-orderable or unavailable.

Parameters:
pProduct - The product we are deriving the status for.
pSkuId - The SKU we are deriving the status for.
Returns:
The derived status.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

queryAvailabilityStatus

public int queryAvailabilityStatus(atg.repository.RepositoryItem pProduct,
                                   java.lang.String pSkuId,
                                   java.lang.String pLocationId)
                            throws atg.commerce.inventory.InventoryException
Throws:
atg.commerce.inventory.InventoryException

queryAvailabilityStatus

public int queryAvailabilityStatus(java.lang.String pSkuId,
                                   java.lang.String pLocationId)
                            throws atg.commerce.inventory.InventoryException
Override base method to honor not only inventory item but product's preorderable settings when determining availability status.

Specified by:
queryAvailabilityStatus in interface atg.commerce.inventory.LocationInventoryManager
Overrides:
queryAvailabilityStatus in class atg.commerce.inventory.RepositoryInventoryManager
Throws:
atg.commerce.inventory.InventoryException

getPreorderAvailabilityDate

public java.util.Date getPreorderAvailabilityDate(atg.repository.RepositoryItem pProduct)
Get the availabilityDate for a product.

Parameters:
pProduct - - The product we are getting the availability date for.
Returns:
The availabilityDate which may be null.

getBackorderAvailabilityDate

public java.util.Date getBackorderAvailabilityDate(java.lang.String pSkuId)
                                            throws atg.commerce.inventory.InventoryException
Get the availabilityDate from the inventory data for a SKU item.

Parameters:
pSkuId - - The SKU we are getting the availability date for.
Returns:
The availabilityDate which may be null.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

getBackorderAvailabilityDate

public java.util.Date getBackorderAvailabilityDate(java.lang.String pSkuId,
                                                   java.lang.String pLocationId)
                                            throws atg.commerce.inventory.InventoryException
Throws:
atg.commerce.inventory.InventoryException

getInventoryLevel

protected long getInventoryLevel(atg.repository.RepositoryItem pInventory,
                                 java.lang.String pInventoryLevelPropertyName,
                                 long pDefaultLevel)
                          throws atg.commerce.inventory.InventoryException
Given the inventory item of note get the inventory level for the particular property.

Parameters:
pInventory - - The inventory repository Item to work with.
pInventoryLevelPropertyName - - the property name of the inventory property that denotes the level.
pDefaultLevel - a default level if the property is not set.
Returns:
Returns the inventory level stored for the property or the default if not found.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information.

getPropertyValue

protected java.lang.Object getPropertyValue(atg.repository.RepositoryItem pItem,
                                            java.lang.String pPropertyName)
                                     throws atg.commerce.inventory.InventoryException
Returns the object associated with the given property name.

Parameters:
pItem - the repository item to fetch the value from.
pPropertyName - the property value to return.
Returns:
The object, null if pItem is null or pPropertyName is null.
Throws:
atg.commerce.inventory.InventoryException - if there was an error while attempting to return the inventory information. An error can occur if no item can be found with the given id; if the value from the named property is null, or a general RepositoryException occurs.

isBackInStockItemExists

public boolean isBackInStockItemExists(atg.repository.MutableRepository pRepository,
                                       java.lang.String pCatalogRefId,
                                       java.lang.String pEmail,
                                       java.lang.String pProductId)
                                throws atg.repository.RepositoryException
Check to see if backInStoreNotifyItem already exists for this combination of CatalogRefId and email.

Parameters:
pRepository - - Repository where to check if item exists.
pCatalogRefId - - repository id.
pEmail - - string that represents email.
pProductId - - product id.
Returns:
true if item exists.
Throws:
atg.repository.RepositoryException - if there was an error while creating repository item.

isBackInStockItemExists

public boolean isBackInStockItemExists(atg.repository.MutableRepository pRepository,
                                       java.lang.String pCatalogRefId,
                                       java.lang.String pEmail,
                                       java.lang.String pProductId,
                                       java.lang.String pLocationId)
                                throws atg.repository.RepositoryException
Throws:
atg.repository.RepositoryException

createBackInStockNotifyItem

protected void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository,
                                           java.lang.String pCatalogRefId,
                                           java.lang.String pEmail,
                                           java.lang.String pProductId)
                                    throws atg.repository.RepositoryException
Creates the required item in the repository.

Parameters:
pRepository - - Repository where to create item.
pCatalogRefId - - repository id.
pEmail - - string that represents email.
pProductId - - product id.
Throws:
atg.repository.RepositoryException - if there was an error while creating repository item.

createBackInStockNotifyItem

protected void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository,
                                           java.lang.String pCatalogRefId,
                                           java.lang.String pEmail,
                                           java.lang.String pProductId,
                                           java.lang.String pLocale,
                                           java.lang.String pSiteId)
                                    throws atg.repository.RepositoryException
Creates the required item in the repository.

Parameters:
pRepository - - Repository where to create item.
pCatalogRefId - - repository id.
pEmail - - string that represents email.
pProductId - - product id.
pLocale - - local.
pSiteId - - site id.
Throws:
atg.repository.RepositoryException - if there was an error while creating repository item.

createBackInStockNotifyItem

protected void createBackInStockNotifyItem(atg.repository.MutableRepository pRepository,
                                           java.lang.String pCatalogRefId,
                                           java.lang.String pEmail,
                                           java.lang.String pProductId,
                                           java.lang.String pLocale,
                                           java.lang.String pSiteId,
                                           java.lang.String pLocationId)
                                    throws atg.repository.RepositoryException
Throws:
atg.repository.RepositoryException

logInventoryException

public boolean logInventoryException(atg.commerce.inventory.InventoryException pException)
The method logs InventoryException. MissingInventoryException is logged only if logMissingInventoryExceptionsAsError property is configured to true.

Parameters:
pException - The InventoryException to log.
Returns:
true if exception has been logged as error.