|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.projects.store.inventory.BackInStockNotificationService
public class BackInStockNotificationService
This class will be used to notify users when an item is back in stock. It will subscribe to a queue to listen for "UpdateInventory" messages which are only fired when an item goes from Out of Stock to In Stock.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
static java.lang.String |
DEFAULT_PROFILE_TYPE
This is the type of the profile that is created by the create operation. |
protected atg.repository.Repository |
mProfileRepository
Repository. |
protected atg.userprofiling.ProfileTools |
mProfileTools
Profile Tools |
protected java.lang.String |
mProfileType
Profile Type |
protected StorePropertyManager |
mPropertyManager
Property manager. |
protected atg.userprofiling.email.TemplateEmailInfo |
mTemplateEmailInfo
Template e-mail information. |
protected atg.userprofiling.email.TemplateEmailSender |
mTemplateEmailSender
Template e-mail sender. |
static java.lang.String |
PARAM_PRODUCT_ID
Product id parameter name. |
static java.lang.String |
PARAM_SKU_ID
Sku id parameter name. |
protected static java.lang.String |
RQL_QUERY_FIND_BISN_ITEMS
RQL query to find items. |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
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 | |
---|---|
BackInStockNotificationService()
|
Method Summary | |
---|---|
protected void |
deleteItemsFromRepository(atg.repository.RepositoryItem[] pItems)
Helper method to delete repository items. |
void |
doStartService()
Initialize service in this method. |
atg.repository.Repository |
getProfileRepository()
|
atg.userprofiling.ProfileTools |
getProfileTools()
|
java.lang.String |
getProfileType()
|
StorePropertyManager |
getPropertyManager()
|
atg.userprofiling.email.TemplateEmailInfo |
getTemplateEmailInfo()
|
atg.userprofiling.email.TemplateEmailSender |
getTemplateEmailSender()
|
void |
receiveMessage(java.lang.String pPortName,
javax.jms.Message pMessage)
The method called when a message is delivered. |
protected atg.repository.RepositoryItem[] |
retrieveBackInStockNotifyItems(java.lang.String pSkuId)
Perform the query to retrieve appropriate back in stock repository items. |
protected void |
sendBackInStockNotifications(atg.commerce.fulfillment.UpdateInventory pMessage)
Notify users when an item is back in stock. |
protected void |
sendEmail(atg.repository.RepositoryItem[] pItems)
Helper method to do the actual email sending. |
void |
setProfileRepository(atg.repository.Repository repository)
|
void |
setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
Sets the property ProfileTools. |
void |
setProfileType(java.lang.String pProfileType)
Sets the property ProfileType. |
void |
setPropertyManager(StorePropertyManager manager)
|
void |
setTemplateEmailInfo(atg.userprofiling.email.TemplateEmailInfo info)
|
void |
setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender sender)
|
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, 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 |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String DEFAULT_PROFILE_TYPE
public static final java.lang.String PARAM_SKU_ID
public static final java.lang.String PARAM_PRODUCT_ID
protected static final java.lang.String RQL_QUERY_FIND_BISN_ITEMS
protected atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
protected atg.repository.Repository mProfileRepository
protected StorePropertyManager mPropertyManager
protected atg.userprofiling.email.TemplateEmailInfo mTemplateEmailInfo
protected atg.userprofiling.ProfileTools mProfileTools
protected java.lang.String mProfileType
Constructor Detail |
---|
public BackInStockNotificationService()
Method Detail |
---|
public void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
public atg.userprofiling.ProfileTools getProfileTools()
public void setProfileType(java.lang.String pProfileType)
public java.lang.String getProfileType()
public void doStartService()
doStartService
in class atg.nucleus.GenericService
public void receiveMessage(java.lang.String pPortName, javax.jms.Message pMessage) throws javax.jms.JMSException
receiveMessage
in interface atg.dms.patchbay.MessageSink
pPortName
- - the message portpMessage
- - the JMS message being received
javax.jms.JMSException
- if message error occursprotected void sendBackInStockNotifications(atg.commerce.fulfillment.UpdateInventory pMessage)
pMessage
- - message to sendprotected void deleteItemsFromRepository(atg.repository.RepositoryItem[] pItems) throws atg.repository.RepositoryException
pItems
- - items to delete
atg.repository.RepositoryException
- if repository error occursprotected void sendEmail(atg.repository.RepositoryItem[] pItems) throws atg.userprofiling.email.TemplateEmailException
pItems
- - items
atg.userprofiling.email.TemplateEmailException
- If an exception occurs while fetching the
template for the emial to be send.protected atg.repository.RepositoryItem[] retrieveBackInStockNotifyItems(java.lang.String pSkuId) throws atg.repository.RepositoryException
pSkuId
- - sku ids
atg.repository.RepositoryException
- if repository error occurspublic atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
public void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender sender)
sender
- - template e-mail sender information.public atg.repository.Repository getProfileRepository()
public void setProfileRepository(atg.repository.Repository repository)
repository
- - profile repository.public StorePropertyManager getPropertyManager()
public void setPropertyManager(StorePropertyManager manager)
manager
- - property manager.public atg.userprofiling.email.TemplateEmailInfo getTemplateEmailInfo()
public void setTemplateEmailInfo(atg.userprofiling.email.TemplateEmailInfo info)
info
- - template e-mail information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |