atg.projects.store.catalog
Class EmailAFriendFormHandler

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.email.GenericEmailSenderFormHandler
                      extended by atg.projects.store.catalog.EmailAFriendFormHandler
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 EmailAFriendFormHandler
extends GenericEmailSenderFormHandler

Form handler for sending email from the ATG Store website.
The JSP form that accepts the email can directly set the From, Subject and To fields or use the defaults as named in the configuration of the DefaultEmailInfo.
When the form submits the parameters the template is used to format the email and then the EmailSender sends the email. The names for the From, Subject, To and Profile parameters that are sent to the Email Template are set in the configuration and must match the email template.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
 
Fields inherited from class atg.projects.store.email.GenericEmailSenderFormHandler
MSG_ACTION_SUCCESS
 
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
EmailAFriendFormHandler()
           
 
Method Summary
protected  java.util.Map collectParams()
          Collect parameters for e-mail templates
 java.lang.String getLocale()
          Gets the value of the Locale: field.
 java.lang.String getLocaleParamName()
           
 java.lang.String getProductId()
          Gets the value of the ProductId: field.
 java.lang.String getProductIdParamName()
          Gets the name of the parameter used for the ProductId: field.
 java.lang.String getStoreId()
          Gets the value of the StoreId: field.
 java.lang.String getStoreIdParamName()
           
 java.lang.String getSubjectParamName()
          Gets the name of the parameter used for the Subject: field.
 java.lang.String getSuccessURL()
           
protected  void redirectOrForward(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, java.lang.String pURL)
           
 void setLocale(java.lang.String pLocale)
          Sets the value of the locale: field.
 void setLocaleParamName(java.lang.String pLocaleParamName)
           
 void setProductId(java.lang.String pProductId)
          Sets the value of the ProductId: field.
 void setProductIdParamName(java.lang.String pProductIdParamName)
          Sets the name of the parameter used for the ProductId: field.
 void setStoreId(java.lang.String pStoreId)
          Sets the value of the StoreId: field.
 void setStoreIdParamName(java.lang.String pStoreIdParamName)
          The storeId parameter name - it represents the Store from which the email is dispatched parameter to be used in Email template
 void setSubjectParamName(java.lang.String pSubjectParamName)
          Sets the name of the parameter used for the Subject: field.
 
Methods inherited from class atg.projects.store.email.GenericEmailSenderFormHandler
getActionResult, getEmailTools, getErrorURL, getMessage, getMessageParamName, getProfile, getProfileTools, getRecipientEmail, getRecipientEmailParamName, getRecipientName, getRecipientNameParamName, getResourceBundle, getResourceBundleName, getSenderEmail, getSenderEmailParamName, getSenderName, getSenderNameParamName, getSiteId, getSiteIdParamName, getSubject, getTemplateUrl, getTemplateUrlName, handleSend, processException, setActionResult, setEmailTools, setErrorURL, setMessage, setMessageParamName, setProfile, setRecipientEmail, setRecipientEmailParamName, setRecipientName, setRecipientNameParamName, setResourceBundleName, setSenderEmail, setSenderEmailParamName, setSenderName, setSenderNameParamName, setSiteId, setSiteIdParamName, setSubject, setSuccessURL, setTemplateUrl, setTemplateUrlName
 
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, 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, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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
Class version string.

Constructor Detail

EmailAFriendFormHandler

public EmailAFriendFormHandler()
Method Detail

getProductIdParamName

public java.lang.String getProductIdParamName()
Gets the name of the parameter used for the ProductId: field. This is configured in the component property file.

Returns:
the name of the parameter used for the ProductId: field.

setProductIdParamName

public void setProductIdParamName(java.lang.String pProductIdParamName)
Sets the name of the parameter used for the ProductId: field. This is configured in the component property file.

Parameters:
pProductIdParamName - - the name of the parameter used for the ProductId: field.

getSubjectParamName

public java.lang.String getSubjectParamName()
Gets the name of the parameter used for the Subject: field. This is configured in the component property file.

Overrides:
getSubjectParamName in class GenericEmailSenderFormHandler
Returns:
the name of the parameter used for the Subject: field.

setSubjectParamName

public void setSubjectParamName(java.lang.String pSubjectParamName)
Sets the name of the parameter used for the Subject: field. This is configured in the component property file.

Overrides:
setSubjectParamName in class GenericEmailSenderFormHandler
Parameters:
pSubjectParamName - - the name of the parameter used for the Subject: field.

setLocaleParamName

public void setLocaleParamName(java.lang.String pLocaleParamName)
Parameters:
pLocaleParamName - - locale parameter name.

getLocaleParamName

public java.lang.String getLocaleParamName()
Returns:
the value of property getEmailParamName.

getLocale

public java.lang.String getLocale()
Gets the value of the Locale: field.

Returns:
the value of the locale: field.

setLocale

public void setLocale(java.lang.String pLocale)
Sets the value of the locale: field.

Parameters:
pLocale - - the value of the locale: field.

getProductId

public java.lang.String getProductId()
Gets the value of the ProductId: field.

Returns:
the value of the ProductId: field.

setProductId

public void setProductId(java.lang.String pProductId)
Sets the value of the ProductId: field.

Parameters:
pProductId - - the value of the ProductId: field.

setStoreIdParamName

public void setStoreIdParamName(java.lang.String pStoreIdParamName)
The storeId parameter name - it represents the Store from which the email is dispatched parameter to be used in Email template

Parameters:
pStoreIdParamName - storeId parameter name

getStoreIdParamName

public java.lang.String getStoreIdParamName()
Returns:
the value of property StoreIdParamName

getStoreId

public java.lang.String getStoreId()
Gets the value of the StoreId: field.

Returns:
The value of the StoreId: field.

setStoreId

public void setStoreId(java.lang.String pStoreId)
Sets the value of the StoreId: field.

Parameters:
pStoreId - The value of the StoreId: field.

collectParams

protected java.util.Map collectParams()
Description copied from class: GenericEmailSenderFormHandler
Collect parameters for e-mail templates

Overrides:
collectParams in class GenericEmailSenderFormHandler
Returns:
map of parameters

redirectOrForward

protected void redirectOrForward(atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse,
                                 java.lang.String pURL)
                          throws java.io.IOException,
                                 javax.servlet.ServletException
Overrides:
redirectOrForward in class atg.droplet.GenericFormHandler
Throws:
java.io.IOException
javax.servlet.ServletException

getSuccessURL

public java.lang.String getSuccessURL()
Overrides:
getSuccessURL in class GenericEmailSenderFormHandler
Returns:
the URL of the success page.