atg.userprofiling.email
Class TemplateEmailInfoImpl

java.lang.Object
  extended by atg.userprofiling.email.TemplateEmailInfo
      extended by atg.userprofiling.email.TemplateEmailInfoImpl
All Implemented Interfaces:
java.io.Serializable

public class TemplateEmailInfoImpl
extends TemplateEmailInfo
implements java.io.Serializable

A concrete extension of the TemplateEmailInfo class that contains the standard email message attributes as properties (messageFrom, messageSubject, etc.) and uses them to construct Message objects.

See Also:
TemplateEmailInfo, MessageContentProcessor, Message, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String PROFILE_ID_TRACKING_DATA_KEY
          The key used to store the profileId in the outgoing email tracking data
 
Constructor Summary
TemplateEmailInfoImpl()
           
 
Method Summary
protected  void appendProperties(java.lang.StringBuffer pBuffer)
          Append any properties for debugging.
 TemplateEmailInfo copy()
          Returns a copy of this TemplateEmailInfo.
 void copyPropertiesTo(TemplateEmailInfo pCopy)
          Copy known properties to pCopy.
 javax.mail.Message createMessage(java.lang.String pRecipient, java.lang.String[] pContents, java.lang.String[] pContentTypes)
          Creates and returns a Message object with the given email recipient and content.
 javax.mail.Message createMessage(java.lang.String pRecipient, java.lang.String pContent, java.lang.String pContentType)
          Creates and returns a Message object with the given email recipient and content.
 MessageContentProcessor getContentProcessor()
          Returns the MessageContentProcessor object used to process the message text and set the content of the email message.
 java.lang.String getMailingName()
          Returns the MailingName field for the email.
 java.lang.String getMessageBcc()
          Returns the Bcc field for the email.
 java.lang.String getMessageCc()
          Returns the CC field for the email.
 java.lang.String getMessageFrom()
          Returns the From field for the email.
 java.lang.String getMessageReplyTo()
          Returns the ReplyTo field for the email.
 java.lang.String getMessageSubject()
          Returns the Subject field for the email.
 java.lang.String getMessageTo()
          Returns the To field for the email.
 java.lang.String getProfileId()
          Gets the profile id associated with the email.
 java.util.Map getTrackingData()
          Returns the tracking data to associate with the email.
 atg.userprofiling.email.TemplateEmailTransitoryInfo getTransitoryInfo()
          Get the transitory info.
 void setContentProcessor(MessageContentProcessor pContentProcessor)
          Sets the MessageContentProcessor object used to process the message text and set the content of the email message.
 void setMailingName(java.lang.String pMailingName)
          Sets the MailingName field for the email.
 void setMessageBcc(java.lang.String pMessageBcc)
          Sets the Bcc field for the email.
 void setMessageCc(java.lang.String pMessageCc)
          Sets the CC field for the email.
 void setMessageFrom(java.lang.String pMessageFrom)
          Sets the From field for the email.
 void setMessageReplyTo(java.lang.String pMessageReplyTo)
          Sets the ReplyTo field for the email.
 void setMessageSubject(java.lang.String pMessageSubject)
          Sets the Subject field for the email.
 void setMessageTo(java.lang.String pMessageTo)
          Sets the To field for the email.
 void setProfileId(java.lang.String pProfileId)
          Sets the profile id associated with the email.
 void setTrackingData(java.util.Map pTrackingData)
          Sets the tracking data to associate with the email.
 void setTransitoryInfo(atg.userprofiling.email.TemplateEmailTransitoryInfo pTransitoryInfo)
          Set the transitory info.
 boolean supportsMultipleContents()
          Whether or not we support creating a message with multiple contents passed in.
 
Methods inherited from class atg.userprofiling.email.TemplateEmailInfo
addParameterProcessor, getAltTemplateURL, getBatchExecutionId, getBatchSize, getFillFromTemplate, getIgnoreContactFatigue, getLocaleMappedAltTemplateURLs, getLocaleMappedTemplateURLs, getMailingId, getMessageAttachments, getParameterProcessors, getTemplateParameters, getTemplateURL, isBatched, isIncludeEmailInErrors, setAltTemplateURL, setBatched, setBatchExecutionId, setBatchSize, setFillFromTemplate, setIgnoreContactFatigue, setIncludeEmailInErrors, setLocaleMappedAltTemplateURLs, setLocaleMappedTemplateURLs, setMailingId, setMessageAttachments, setParameterProcessors, setTemplateParameters, setTemplateURL, toString
 
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
Class version string


PROFILE_ID_TRACKING_DATA_KEY

public static final java.lang.String PROFILE_ID_TRACKING_DATA_KEY
The key used to store the profileId in the outgoing email tracking data

See Also:
Constant Field Values
Constructor Detail

TemplateEmailInfoImpl

public TemplateEmailInfoImpl()
Method Detail

getMailingName

public java.lang.String getMailingName()
Returns the MailingName field for the email.


setMailingName

public void setMailingName(java.lang.String pMailingName)
Sets the MailingName field for the email.


getMessageReplyTo

public java.lang.String getMessageReplyTo()
Returns the ReplyTo field for the email.


setMessageReplyTo

public void setMessageReplyTo(java.lang.String pMessageReplyTo)
Sets the ReplyTo field for the email.


setMessageTo

public void setMessageTo(java.lang.String pMessageTo)
Sets the To field for the email.


getMessageTo

public java.lang.String getMessageTo()
Returns the To field for the email.


getMessageFrom

public java.lang.String getMessageFrom()
Returns the From field for the email.


setMessageFrom

public void setMessageFrom(java.lang.String pMessageFrom)
Sets the From field for the email.


getMessageCc

public java.lang.String getMessageCc()
Returns the CC field for the email.


setMessageCc

public void setMessageCc(java.lang.String pMessageCc)
Sets the CC field for the email.


getMessageBcc

public java.lang.String getMessageBcc()
Returns the Bcc field for the email.


setMessageBcc

public void setMessageBcc(java.lang.String pMessageBcc)
Sets the Bcc field for the email.


getMessageSubject

public java.lang.String getMessageSubject()
Returns the Subject field for the email.


setMessageSubject

public void setMessageSubject(java.lang.String pMessageSubject)
Sets the Subject field for the email.


getTrackingData

public java.util.Map getTrackingData()
Returns the tracking data to associate with the email.


setTrackingData

public void setTrackingData(java.util.Map pTrackingData)
Sets the tracking data to associate with the email.


getProfileId

public java.lang.String getProfileId()
Gets the profile id associated with the email.


setProfileId

public void setProfileId(java.lang.String pProfileId)
Sets the profile id associated with the email.


getContentProcessor

public MessageContentProcessor getContentProcessor()
Returns the MessageContentProcessor object used to process the message text and set the content of the email message.


setContentProcessor

public void setContentProcessor(MessageContentProcessor pContentProcessor)
Sets the MessageContentProcessor object used to process the message text and set the content of the email message.


setTransitoryInfo

public void setTransitoryInfo(atg.userprofiling.email.TemplateEmailTransitoryInfo pTransitoryInfo)
Set the transitory info.


getTransitoryInfo

public atg.userprofiling.email.TemplateEmailTransitoryInfo getTransitoryInfo()
Get the transitory info.


supportsMultipleContents

public boolean supportsMultipleContents()
Description copied from class: TemplateEmailInfo
Whether or not we support creating a message with multiple contents passed in.

Overrides:
supportsMultipleContents in class TemplateEmailInfo

createMessage

public javax.mail.Message createMessage(java.lang.String pRecipient,
                                        java.lang.String pContent,
                                        java.lang.String pContentType)
                                 throws atg.userprofiling.email.InvalidSenderAddressException,
                                        InvalidRecipientAddressException,
                                        TemplateEmailException
Creates and returns a Message object with the given email recipient and content.

Specified by:
createMessage in class TemplateEmailInfo
Parameters:
pRecipient - the email address of the main recipient, corresponding to a particular profile
pContent - the message text obtained by instantiating the template for a particular profile
pContentType - the content type obtaine by instantiating the template for a particular profile (example : text/plain).
Throws:
InvalidRecipientAddressException - if the recipient email address is null, malformed, or invalid
TemplateEmailException - if any other problem is encountered while composing the Message
atg.userprofiling.email.InvalidSenderAddressException

createMessage

public javax.mail.Message createMessage(java.lang.String pRecipient,
                                        java.lang.String[] pContents,
                                        java.lang.String[] pContentTypes)
                                 throws atg.userprofiling.email.InvalidSenderAddressException,
                                        InvalidRecipientAddressException,
                                        TemplateEmailException
Creates and returns a Message object with the given email recipient and content.

Overrides:
createMessage in class TemplateEmailInfo
Parameters:
pRecipient - the email address of the main recipient, corresponding to a particular profile
pContent - the message text obtained by instantiating the template for a particular profile
pContentType - the content type obtaine by instantiating the template for a particular profile (example : text/plain).
Throws:
InvalidRecipientAddressException - if the recipient email address is null, malformed, or invalid
TemplateEmailException - if any other problem is encountered while composing the Message
atg.userprofiling.email.InvalidSenderAddressException

copyPropertiesTo

public void copyPropertiesTo(TemplateEmailInfo pCopy)
Copy known properties to pCopy.

Overrides:
copyPropertiesTo in class TemplateEmailInfo
Parameters:
pCopy - the info to which to copy properties.

copy

public TemplateEmailInfo copy()
Returns a copy of this TemplateEmailInfo.

Specified by:
copy in class TemplateEmailInfo

appendProperties

protected void appendProperties(java.lang.StringBuffer pBuffer)
Append any properties for debugging.

Overrides:
appendProperties in class TemplateEmailInfo