atg.projects.store.fulfillment
Class ConfirmationEmailSender

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.projects.store.fulfillment.ConfirmationEmailSender
All Implemented Interfaces:
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 ConfirmationEmailSender
extends atg.nucleus.GenericService

This class is responsible for sending order confirmation emails.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected  atg.userprofiling.email.MessageContentProcessor mContentProcessor
          Message content processor.
protected  java.lang.String mEmailMessageFrom
          E-mail message sender address.
protected  java.lang.String mEmailMessageSubject
          E-mail message subject.
protected  boolean mFillFromTemplate
          Should fill from template.
protected  atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
          Template e-mail sender.
protected static java.lang.String ORDER
          Order constant.
 
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
ConfirmationEmailSender()
           
 
Method Summary
protected  atg.userprofiling.email.TemplateEmailInfo createTemplateEmailInfo(java.lang.String pEmailTo, java.lang.String pEmailTemplate)
          Creates the template email info for the template we need to use for order confirmation.
 atg.userprofiling.email.MessageContentProcessor getContentProcessor()
           
 java.lang.String getEmailMessageFrom()
          The email address to set the message from for the order confirm email.
 java.lang.String getEmailMessageSubject()
          The subject to use for the order confirmation emails.
 boolean getFillFromTemplate()
           
 atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
          The template email sender used to send the order confirm email.
 void sendConfirmationEmail(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pTemplateUrl)
          This method sends the order confirmation emails.
 void setContentProcessor(atg.userprofiling.email.MessageContentProcessor pContentProcessor)
           
 void setEmailMessageFrom(java.lang.String pEmailMessageFrom)
          The email address to set the message from for the order confirm email.
 void setEmailMessageSubject(java.lang.String pEmailMessageSubject)
          The subject to use for the order confirmation emails.
 void setFillFromTemplate(boolean pFillFromTemplate)
          Sets the flag indicating whether we should try to extract email information from the <meta> tags in the template.
 void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
          The template email sender to use to send the order confirm email.
 
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.


ORDER

protected static final java.lang.String ORDER
Order constant.

See Also:
Constant Field Values

mContentProcessor

protected atg.userprofiling.email.MessageContentProcessor mContentProcessor
Message content processor.


mTemplateEmailSender

protected atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
Template e-mail sender.


mEmailMessageFrom

protected java.lang.String mEmailMessageFrom
E-mail message sender address.


mEmailMessageSubject

protected java.lang.String mEmailMessageSubject
E-mail message subject.


mFillFromTemplate

protected boolean mFillFromTemplate
Should fill from template.

Constructor Detail

ConfirmationEmailSender

public ConfirmationEmailSender()
Method Detail

getContentProcessor

public atg.userprofiling.email.MessageContentProcessor getContentProcessor()
Returns:
the content processor.

setContentProcessor

public void setContentProcessor(atg.userprofiling.email.MessageContentProcessor pContentProcessor)
Parameters:
pContentProcessor - - content processor.

setTemplateEmailSender

public void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
The template email sender to use to send the order confirm email.

Parameters:
pTemplateEmailSender - - template e-mail sender

getTemplateEmailSender

public atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
The template email sender used to send the order confirm email.

Returns:
template e-mail sender

setEmailMessageFrom

public void setEmailMessageFrom(java.lang.String pEmailMessageFrom)
The email address to set the message from for the order confirm email.

Parameters:
pEmailMessageFrom - - e-mail address sender

getEmailMessageFrom

public java.lang.String getEmailMessageFrom()
The email address to set the message from for the order confirm email.

Returns:
e-mail message sender address

setEmailMessageSubject

public void setEmailMessageSubject(java.lang.String pEmailMessageSubject)
The subject to use for the order confirmation emails.

Parameters:
pEmailMessageSubject - - e-mail message subject

getEmailMessageSubject

public java.lang.String getEmailMessageSubject()
The subject to use for the order confirmation emails.

Returns:
e-mail message subject

getFillFromTemplate

public boolean getFillFromTemplate()
Returns:
true if we should try to extract email information from the <meta> tags in the template.

setFillFromTemplate

public void setFillFromTemplate(boolean pFillFromTemplate)
Sets the flag indicating whether we should try to extract email information from the <meta> tags in the template.

Parameters:
pFillFromTemplate - - true if should be filled, false - otherwise

sendConfirmationEmail

public void sendConfirmationEmail(atg.commerce.order.Order pOrder,
                                  atg.repository.RepositoryItem pProfile,
                                  java.lang.String pTemplateUrl)
This method sends the order confirmation emails.

Parameters:
pOrder - - order
pProfile - - user profile
pTemplateUrl - - template URL

createTemplateEmailInfo

protected atg.userprofiling.email.TemplateEmailInfo createTemplateEmailInfo(java.lang.String pEmailTo,
                                                                            java.lang.String pEmailTemplate)
Creates the template email info for the template we need to use for order confirmation.

Parameters:
pEmailTo - - e-mail recipient address
pEmailTemplate - - e-mail template
Returns:
template e-mail information