Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base
Class EmailMessage

java.lang.Object
  extended by com.jivesoftware.base.EmailMessage
All Implemented Interfaces:
java.io.Serializable

public class EmailMessage
extends java.lang.Object
implements java.io.Serializable

Represents an Email message that can be sent using EmailManager

Since:
5.0
See Also:
EmailManager, Serialized Form

Nested Class Summary
static class EmailMessage.EmailAddress
          Represents an email address with a name like Andrew Wright <andrew@jivesoftware.com>
 
Constructor Summary
EmailMessage()
           
 
Method Summary
 void addRecipient(EmailMessage.EmailAddress emailAddress)
          Adds a recipient (to address) for this email message
 void addRecipient(java.lang.String name, java.lang.String email)
          Adds a recipient (to address) for this email message
 boolean equals(java.lang.Object o)
           
 java.util.Map getContext()
          Returns a map of replacement tokens to use in the email
 java.lang.String getHtmlBody()
          Returns the html version of the body
 java.lang.String getHtmlBodyProperty()
           
 java.util.Locale getLocale()
          Return the locale for the email message.
 java.util.Collection getRecipients()
          Returns the recipients of the email
 EmailMessage.EmailAddress getSender()
          Returns the sender of them email
 java.lang.String getSubject()
          Returns the subject of the email.
 java.lang.String getSubjectProperty()
          Returns the property name for subject of the email
 java.lang.String getTextBody()
          Returns the text version of the body.
 java.lang.String getTextBodyProperty()
          Return the property name for the html version of the email body
 int hashCode()
           
 void setHtmlBody(java.lang.String htmlBody)
          Sets the text version of the body.
 void setHtmlBodyProperty(java.lang.String htmlBodyProperty)
           
 void setLocale(java.util.Locale locale)
          Set the locale for the email message.
 void setSender(EmailMessage.EmailAddress sender)
          Sets the address the email is sent from.
 void setSender(java.lang.String name, java.lang.String email)
          Sets the address the email is sent from.
 void setSubject(java.lang.String subject)
          Sets the subject of the email.
 void setSubjectProperty(java.lang.String subjectProperty)
          Sets the email's subject property name
 void setTextBody(java.lang.String textBody)
          Sets the text version of the body.
 void setTextBodyProperty(java.lang.String textBodyProperty)
          Set the property name for the html version of the email body
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmailMessage

public EmailMessage()
Method Detail

addRecipient

public void addRecipient(EmailMessage.EmailAddress emailAddress)
Adds a recipient (to address) for this email message

Parameters:
emailAddress - the recipient's address

addRecipient

public void addRecipient(java.lang.String name,
                         java.lang.String email)
Adds a recipient (to address) for this email message

Parameters:
name - the name of the recipient
email - the email address of the recipient

setSender

public void setSender(java.lang.String name,
                      java.lang.String email)
Sets the address the email is sent from.

Parameters:
name - Name of the sender
email - Email address of the sender

setSender

public void setSender(EmailMessage.EmailAddress sender)
Sets the address the email is sent from.

Parameters:
sender - The sender's email address

setSubjectProperty

public void setSubjectProperty(java.lang.String subjectProperty)
Sets the email's subject property name

Parameters:
subjectProperty - the email's subject

setTextBodyProperty

public void setTextBodyProperty(java.lang.String textBodyProperty)
Set the property name for the html version of the email body

Parameters:
textBodyProperty - the property name for the html version of the email body

getRecipients

public java.util.Collection getRecipients()
Returns the recipients of the email

Returns:
the recipients of the email

getSender

public EmailMessage.EmailAddress getSender()
Returns the sender of them email

Returns:
the sender of the email

getSubjectProperty

public java.lang.String getSubjectProperty()
Returns the property name for subject of the email

Returns:
the property name for subject of the email

getSubject

public java.lang.String getSubject()
Returns the subject of the email. Should be specified if subjectProperty is not specified.

Returns:
the subject of the email.

setSubject

public void setSubject(java.lang.String subject)
Sets the subject of the email. Should be specified if subjectProperty is not specified.

Parameters:
subject - the subject of the email.

getTextBodyProperty

public java.lang.String getTextBodyProperty()
Return the property name for the html version of the email body

Returns:
the property name for the html version of the email body

getTextBody

public java.lang.String getTextBody()
Returns the text version of the body.

Returns:
the text version of the body.

setTextBody

public void setTextBody(java.lang.String textBody)
Sets the text version of the body.

Parameters:
textBody - the text version of the body.

getHtmlBody

public java.lang.String getHtmlBody()
Returns the html version of the body

Returns:
the htmlVersion of the body.

setHtmlBody

public void setHtmlBody(java.lang.String htmlBody)
Sets the text version of the body.

Parameters:
htmlBody - the text version of the body.

getLocale

public java.util.Locale getLocale()
Return the locale for the email message. This in conjunction with the body|subject property name will be used to acquire the correct email content

Returns:
the locale for the email message

setLocale

public void setLocale(java.util.Locale locale)
Set the locale for the email message. This in conjunction with the body|subject property name will be used to acquire the correct email content

Parameters:
locale - the locale for the email message

getContext

public java.util.Map getContext()
Returns a map of replacement tokens to use in the email

Returns:
a map of replacement tokens

getHtmlBodyProperty

public java.lang.String getHtmlBodyProperty()

setHtmlBodyProperty

public void setHtmlBodyProperty(java.lang.String htmlBodyProperty)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.