public class B2CEmailFormHandler extends EmailFormHandler
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)EmailFormHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
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_BUNDLEPARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
B2CEmailFormHandler()
Constructs a B2CEmailFormHandler.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
getBody, getDefaultLocale, getEmailSenderService, getRecipient, getSender, getSendErrorURL, getSendSuccessURL, getSubject, getUserLocale, handleSendEmail, isUseRequestLocale, setBody, setDefaultLocale, setEmailSenderService, setRecipient, setSender, setSendErrorURL, setSendSuccessURL, setSubject, setUseRequestLocale, toString, validateaddFormException, 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, setUseForwardsafterGet, beforeGetaddLogListener, 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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic B2CEmailFormHandler()
public void setCustomerServiceEmailAddress(java.lang.String pCustomerServiceEmailAddress)
public java.lang.String getCustomerServiceEmailAddress()
public void setProfile(Profile pProfile)
public Profile getProfile()
protected boolean sendMail(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
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.
sendMail in class EmailFormHandlerjavax.servlet.ServletExceptionjava.io.IOException