atg.projects.store.inventory
Class BackInStockFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.projects.store.inventory.BackInStockFormHandler
All Implemented Interfaces:
atg.droplet.DropletFormHandler, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, 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 BackInStockFormHandler
extends atg.droplet.GenericFormHandler

This form handler will take requests from users to be notified when an item is back in stock.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
 java.lang.String mNoJavascriptErrorURL
          Error url set from a javascript free form
 java.lang.String mNoJavascriptSuccessURL
          Success url set from a javascript free form
protected static java.lang.String MSG_INVALIDATE_EMAIL_FORMAT
          Invalid e-mail format message key.
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
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
BackInStockFormHandler()
           
 
Method Summary
 java.lang.String getCatalogRefId()
           
 java.lang.String getEmailAddress()
           
 StoreEmailTools getEmailTools()
           
 java.lang.String getErrorURL()
           
 StoreInventoryManager getInventoryManager()
           
 atg.service.localeservice.LocaleService getLocaleService()
           
 java.lang.String getNoJavascriptErrorURL()
           
 java.lang.String getNoJavascriptSuccessURL()
           
 java.lang.String getProductId()
           
 atg.repository.MutableRepository getProfileRepository()
           
 java.util.ResourceBundle getResourceBundle(java.util.Locale pLocale)
          This method returns ResourceBundle object for specified locale.
 java.lang.String getSuccessURL()
           
 boolean handleNotifyMe(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method will handle "notify when back in stock" requests.
 void setCatalogRefId(java.lang.String pCatalogRefId)
           
 void setEmailAddress(java.lang.String pEmailAddress)
           
 void setEmailTools(StoreEmailTools pEmailTools)
           
 void setErrorURL(java.lang.String pErrorURL)
           
 void setInventoryManager(StoreInventoryManager pInventoryManager)
           
 void setLocaleService(atg.service.localeservice.LocaleService pLocaleService)
           
 void setNoJavascriptErrorURL(java.lang.String pNoJavascriptErrorURL)
           
 void setNoJavascriptSuccessURL(java.lang.String pNoJavascriptSuccessURL)
           
 void setProductId(java.lang.String pProductId)
           
 void setProfileRepository(atg.repository.MutableRepository pProfileRepository)
           
 void setSuccessURL(java.lang.String pSuccessURL)
           
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
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 final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values

MSG_INVALIDATE_EMAIL_FORMAT

protected static final java.lang.String MSG_INVALIDATE_EMAIL_FORMAT
Invalid e-mail format message key.

See Also:
Constant Field Values

mNoJavascriptSuccessURL

public java.lang.String mNoJavascriptSuccessURL
Success url set from a javascript free form


mNoJavascriptErrorURL

public java.lang.String mNoJavascriptErrorURL
Error url set from a javascript free form

Constructor Detail

BackInStockFormHandler

public BackInStockFormHandler()
Method Detail

getLocaleService

public atg.service.localeservice.LocaleService getLocaleService()
Returns:
the mLocaleService

setLocaleService

public void setLocaleService(atg.service.localeservice.LocaleService pLocaleService)
Parameters:
pLocaleService - the localeService to set

getCatalogRefId

public java.lang.String getCatalogRefId()
Returns:
the catalog reference id.

setCatalogRefId

public void setCatalogRefId(java.lang.String pCatalogRefId)
Parameters:
pCatalogRefId - - the catalog reference id.

getEmailAddress

public java.lang.String getEmailAddress()
Returns:
the e-mail address.

setEmailAddress

public void setEmailAddress(java.lang.String pEmailAddress)
Parameters:
pEmailAddress - - the e-mail address to set.

getProductId

public java.lang.String getProductId()
Returns:
the product id.

setProductId

public void setProductId(java.lang.String pProductId)
Parameters:
pProductId - - the product id to set.

getProfileRepository

public atg.repository.MutableRepository getProfileRepository()
Returns:
the profile repository.

setProfileRepository

public void setProfileRepository(atg.repository.MutableRepository pProfileRepository)
Parameters:
pProfileRepository - - the profile repository to set.

getSuccessURL

public java.lang.String getSuccessURL()
Returns:
the success redirect URL.

setSuccessURL

public void setSuccessURL(java.lang.String pSuccessURL)
Parameters:
pSuccessURL - - the success redirect URL to set.

getErrorURL

public java.lang.String getErrorURL()
Returns:
the error redirect URL.

setErrorURL

public void setErrorURL(java.lang.String pErrorURL)
Parameters:
pErrorURL - - the error redirect URL to set.

getEmailTools

public StoreEmailTools getEmailTools()
Returns:
the StoreEmailTools

setEmailTools

public void setEmailTools(StoreEmailTools pEmailTools)
Parameters:
pEmailTools - the StoreEmailTools to set

getInventoryManager

public StoreInventoryManager getInventoryManager()
Returns:
the StoreInventoryManager

setInventoryManager

public void setInventoryManager(StoreInventoryManager pInventoryManager)
Parameters:
pInventoryManager - the StoreInventoryManager to set

getNoJavascriptSuccessURL

public java.lang.String getNoJavascriptSuccessURL()
Returns:
mNoJavascriptSuccessURL

setNoJavascriptSuccessURL

public void setNoJavascriptSuccessURL(java.lang.String pNoJavascriptSuccessURL)
Parameters:
pNoJavascriptSuccessURL - the noJavascriptSuccessURL to set

getNoJavascriptErrorURL

public java.lang.String getNoJavascriptErrorURL()
Returns:
mNoJavascriptErrorURL

setNoJavascriptErrorURL

public void setNoJavascriptErrorURL(java.lang.String pNoJavascriptErrorURL)
Parameters:
pNoJavascriptErrorURL - the noJavascriptErrorURL to set

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale pLocale)
This method returns ResourceBundle object for specified locale.

Parameters:
pLocale - The locale used to retrieve the resource bundle. If null then the default resource bundle is returned.
Returns:
the resource bundle.

handleNotifyMe

public boolean handleNotifyMe(atg.servlet.DynamoHttpServletRequest pRequest,
                              atg.servlet.DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This method will handle "notify when back in stock" requests.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io