atg.service.email
Class EmailEvent

java.lang.Object
  extended by atg.service.email.EmailEvent

public class EmailEvent
extends java.lang.Object


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
EmailEvent()
           
EmailEvent(javax.mail.Message pMessage)
           
EmailEvent(java.lang.String pFrom, java.lang.String[] pRecipients, java.lang.String pSubject, java.lang.String pBody)
           
EmailEvent(java.lang.String pFrom, java.lang.String[] pRecipients, java.lang.String pSubject, java.lang.String pBody, java.lang.String pExtraHeader)
           
EmailEvent(java.lang.String pFrom, java.lang.String[] pRecipients, java.lang.String pSubject, java.lang.String pBody, java.lang.String[] pExtraHeaders)
           
EmailEvent(java.lang.String pFrom, java.lang.String[] pRecipients, java.lang.String pSubject, java.lang.String pBody, java.lang.String[] pExtraHeaders, java.util.Map pTrackingData)
           
EmailEvent(java.lang.String pFrom, java.lang.String pRecipient, java.lang.String pSubject, java.lang.String pBody)
           
EmailEvent(java.lang.String pFrom, java.lang.String pRecipient, java.lang.String pSubject, java.lang.String pBody, java.lang.String pExtraHeader)
           
EmailEvent(java.lang.String pFrom, java.lang.String pRecipient, java.lang.String pSubject, java.lang.String pBody, java.lang.String[] pExtraHeaders)
           
EmailEvent(java.lang.String pFrom, java.lang.String pRecipient, java.lang.String pSubject, java.lang.String pBody, java.lang.String[] pExtraHeaders, java.util.Map pTrackingData)
           
 
Method Summary
protected  javax.mail.Message createMessage(javax.mail.Session pSession, atg.service.email.EmailTrackingTools pTools)
          Creates a new Message from the given EmailEvent's parameters (from, subject, recipients, body, etc.).
 java.lang.String getBcc()
          Returns the sender (Bcc:) field.
 java.lang.String getBody()
          Returns the message body.
 java.lang.String getCc()
          Returns the sender (Cc:) field.
 java.lang.String getCharSet()
          Returns the character set.
 java.lang.String[] getExtraHeaders()
          Returns the list of extra headers that should be used in the email (e.g.
 java.lang.String getFrom()
          Returns the sender (From:) field.
 javax.mail.Message getMessage()
          Returns the Message to be sent.
 javax.mail.Message getMessage(javax.mail.Session pSession)
          Returns the Message to be sent.
 javax.mail.Message getMessage(javax.mail.Session pSession, atg.service.email.EmailTrackingTools pTools)
          Returns the Message to be sent.
 java.lang.String getRecipient()
          Returns the recipient that should receive email
 java.lang.String[] getRecipientList()
          Returns the list of recipients that should receive email
 java.lang.String getSubject()
          Returns the subject field.
 java.util.Map getTrackingData()
          Gets the NV pair data to associate with the out-bound email.
 void setBcc(java.lang.String pBcc)
          Sets the sender (Bcc:) field.
 void setBody(java.lang.String pBody)
          Sets the message body.
 void setCc(java.lang.String pCc)
          Sets the sender (Cc:) field.
 void setCharSet(java.lang.String pCharSet)
          Sets the character set.
 void setExtraHeaders(java.lang.String[] pExtraHeaders)
          Sets the list of extra headers that should be used in the email (e.g.
 void setFrom(java.lang.String pFrom)
          Sets the sender (Cc:) field.
 void setMessage(javax.mail.Message pMessage)
          Sets the Message to be sent.
 void setRecipient(java.lang.String pRecipient)
          Sets the recipient that should receive email
 void setRecipientList(java.lang.String[] pRecipients)
          Sets the list of recipients that should receive email
 void setSubject(java.lang.String pSubject)
          Sets the subject field.
 void setTrackingData(java.util.Map pTrackingData)
          Sets the NV pair data to associate with the out-bound email.
 
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

EmailEvent

public EmailEvent()

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String pRecipient,
                  java.lang.String pSubject,
                  java.lang.String pBody)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String[] pRecipients,
                  java.lang.String pSubject,
                  java.lang.String pBody)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String pRecipient,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String pExtraHeader)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String pRecipient,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String[] pExtraHeaders)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String[] pRecipients,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String pExtraHeader)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String[] pRecipients,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String[] pExtraHeaders)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String pRecipient,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String[] pExtraHeaders,
                  java.util.Map pTrackingData)

EmailEvent

public EmailEvent(java.lang.String pFrom,
                  java.lang.String[] pRecipients,
                  java.lang.String pSubject,
                  java.lang.String pBody,
                  java.lang.String[] pExtraHeaders,
                  java.util.Map pTrackingData)

EmailEvent

public EmailEvent(javax.mail.Message pMessage)
Method Detail

getRecipientList

public java.lang.String[] getRecipientList()
Returns the list of recipients that should receive email


setRecipientList

public void setRecipientList(java.lang.String[] pRecipients)
Sets the list of recipients that should receive email


getRecipient

public java.lang.String getRecipient()
Returns the recipient that should receive email


setRecipient

public void setRecipient(java.lang.String pRecipient)
Sets the recipient that should receive email


getCharSet

public java.lang.String getCharSet()
Returns the character set.


setCharSet

public void setCharSet(java.lang.String pCharSet)
Sets the character set.


getFrom

public java.lang.String getFrom()
Returns the sender (From:) field.


setFrom

public void setFrom(java.lang.String pFrom)
Sets the sender (Cc:) field.


getCc

public java.lang.String getCc()
Returns the sender (Cc:) field.


setCc

public void setCc(java.lang.String pCc)
Sets the sender (Cc:) field.


getBcc

public java.lang.String getBcc()
Returns the sender (Bcc:) field.


setBcc

public void setBcc(java.lang.String pBcc)
Sets the sender (Bcc:) field.


getSubject

public java.lang.String getSubject()
Returns the subject field.


setSubject

public void setSubject(java.lang.String pSubject)
Sets the subject field.


getExtraHeaders

public java.lang.String[] getExtraHeaders()
Returns the list of extra headers that should be used in the email (e.g. "X-URL: http://foo.bar.com/")


setExtraHeaders

public void setExtraHeaders(java.lang.String[] pExtraHeaders)
Sets the list of extra headers that should be used in the email (e.g. "X-URL: http://foo.bar.com/")


getTrackingData

public java.util.Map getTrackingData()
Gets the NV pair data to associate with the out-bound email.


setTrackingData

public void setTrackingData(java.util.Map pTrackingData)
Sets the NV pair data to associate with the out-bound email.


getBody

public java.lang.String getBody()
Returns the message body.


setBody

public void setBody(java.lang.String pBody)
Sets the message body.


getMessage

public javax.mail.Message getMessage()
                              throws EmailException
Returns the Message to be sent. If this property has not been set explicitly, a Message object is created using the rest of the email parameters.

Throws:
EmailException - if an error occurs while creating the Message
See Also:
Message

getMessage

public javax.mail.Message getMessage(javax.mail.Session pSession)
                              throws EmailException
Returns the Message to be sent. If this property has not been set explicitly, a Message object is created using the rest of the email parameters.

Throws:
EmailException - if an error occurs while creating the Message
See Also:
Message

getMessage

public javax.mail.Message getMessage(javax.mail.Session pSession,
                                     atg.service.email.EmailTrackingTools pTools)
                              throws EmailException
Returns the Message to be sent. If this property has not been set explicitly, a Message object is created using the rest of the email parameters.

Throws:
EmailException - if an error occurs while creating the Message
See Also:
Message

setMessage

public void setMessage(javax.mail.Message pMessage)
Sets the Message to be sent. If this method is called with a non-null Message argument, any other event properties (from, subject, recipients, body, etc.) will be ignored, and the parameters/content contained within the Message object will be used when sending the email.

This property should be used if the other EmailEvent properties are not sufficient to describe the message headers and/or content: for example, if you wish to send a message with an attachment, or a multipart message.

See Also:
Message

createMessage

protected javax.mail.Message createMessage(javax.mail.Session pSession,
                                           atg.service.email.EmailTrackingTools pTools)
                                    throws EmailException
Creates a new Message from the given EmailEvent's parameters (from, subject, recipients, body, etc.).

Throws:
EmailException - if the Message could not be created from the given event parameters