atg.projects.b2cstore
Class B2CEmailFormHandler

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.service.email.EmailFormHandler
                      extended by atg.projects.b2cstore.B2CEmailFormHandler
All Implemented Interfaces:
DropletFormHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class B2CEmailFormHandler
extends EmailFormHandler

This class handles sending an email to Pioneer Cycling's customer support group. It extends atg.service.email.EmailFormHandler, overriding the sendMail() method to extract the user's name, repository id, and email address from her/his profile, and sending the email to a fixed destination (by default, customer_svc@pioneer_cycling.com)

See Also:
EmailFormHandler

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.service.email.EmailFormHandler
MSG_EMPTY_MESSAGE, MSG_INVALID_RECIPIENT_EMAIL, MSG_INVALID_SENDER_EMAIL, MSG_NO_EMAIL_HOST_NAME, MSG_NO_RECIPIENT_EMAIL, MSG_NO_SENDER_EMAIL, RESOURCE_BUNDLE
 
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
B2CEmailFormHandler()
          Constructs a B2CEmailFormHandler.
 
Method Summary
 java.lang.String getCustomerServiceEmailAddress()
          Returns property customerServiceEmailAddress
 Profile getProfile()
          Returns property profile
protected  boolean sendMail(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Customizes the send operation.
 void setCustomerServiceEmailAddress(java.lang.String pCustomerServiceEmailAddress)
          Sets property customerServiceEmailAddress, the fixed recipient of feedback email messages from registered users of the PioneerCycling store.
 void setProfile(Profile pProfile)
          Sets property profile
 
Methods inherited from class atg.service.email.EmailFormHandler
getBody, getDefaultLocale, getEmailSenderService, getRecipient, getSender, getSendErrorURL, getSendSuccessURL, getSubject, getUserLocale, handleSendEmail, isUseRequestLocale, setBody, setDefaultLocale, setEmailSenderService, setRecipient, setSender, setSendErrorURL, setSendSuccessURL, setSubject, setUseRequestLocale, toString, validate
 
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, 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, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

B2CEmailFormHandler

public B2CEmailFormHandler()
Constructs a B2CEmailFormHandler.

Method Detail

setCustomerServiceEmailAddress

public void setCustomerServiceEmailAddress(java.lang.String pCustomerServiceEmailAddress)
Sets property customerServiceEmailAddress, the fixed recipient of feedback email messages from registered users of the PioneerCycling store.


getCustomerServiceEmailAddress

public java.lang.String getCustomerServiceEmailAddress()
Returns property customerServiceEmailAddress


setProfile

public void setProfile(Profile pProfile)
Sets property profile


getProfile

public Profile getProfile()
Returns property profile


sendMail

protected boolean sendMail(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Customizes the send operation. Overrides the sender and recipient properties to the following:

sender: full name (id) <email>
recipient: customer_svc@pioneer_cycling.com

The full name and email address come from the user's profile, and the id is the user's profile repository id. The recipient is the value specified in the properties file for the customerServiceEmailAddress.

The EmailFormHandler's sendMail() is then called normally.

Overrides:
sendMail in class EmailFormHandler
Returns:
a boolean value
Throws:
javax.servlet.ServletException
java.io.IOException