com.ibm.itim.mail
Class NotificationMessage

java.lang.Object
  |
  +--com.ibm.itim.mail.NotificationMessage
All Implemented Interfaces:
com.ibm.itim.util.xml.objectstream.Importable, java.io.Serializable

public class NotificationMessage
extends java.lang.Object
implements java.io.Serializable, com.ibm.itim.util.xml.objectstream.Importable

Represents an email message with recipients, subject, a plain text message, and an optional HTML message. Both a plain text AND HTML formatted body is supported within the same message.

See Also:
Serialized Form

Constructor Summary
NotificationMessage()
          Default constructor.
NotificationMessage(java.util.Collection addresses, java.lang.String subject, java.lang.String textMessage, java.lang.String htmlMessage)
          The constructor of NotificationMessage.
NotificationMessage(java.util.Collection addresses, java.lang.String subject, java.lang.String textMessage, java.lang.String htmlMessage, java.lang.String tenant, java.lang.String locale)
          The constructor of NotificationMessage when taking advantage of Post Office functionality.
NotificationMessage(java.util.Collection addresses, java.lang.String subject, java.lang.String textMessage, java.lang.String htmlMessage, java.lang.String tenant, java.lang.String topic, java.lang.String locale)
          The constructor of NotificationMessage when taking advantage of Post Office functionality.
 
Method Summary
 java.util.Collection getEmailAddresses()
          Returns the recipients of the message.
 java.lang.String getHtmlMessage()
          Returns the HTML message body (if any).
 java.lang.String getLocale()
          Returns the locale the message was written in.
 java.lang.String getMessage()
          Returns the text message body.
 java.lang.String getSubject()
          Returns the subject of the message.
 java.lang.String getTenant()
          Returns the tenant of this message.
 java.lang.String getTopic()
          Returns the topic of the message (if any).
 void setEmailAddresses(java.util.Collection addresses)
          Changes the recipients of the message.
 void setHtmlMessage(java.lang.String htmlMessage)
          Change sthe HTML message body.
 void setLocale(java.lang.String locale)
          Changes the locale the message was written in.
 void setMessage(java.lang.String textMessage)
          Changes the text body of the message.
 void setSubject(java.lang.String subject)
          Changes the subject of the message.
 void setTenant(java.lang.String tenant)
          Changes the tenant for this message.
 void setTopic(java.lang.String topic)
          Changes the topic of the message.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationMessage

public NotificationMessage()
Default constructor.


NotificationMessage

public NotificationMessage(java.util.Collection addresses,
                           java.lang.String subject,
                           java.lang.String textMessage,
                           java.lang.String htmlMessage)
The constructor of NotificationMessage.

Parameters:
addresses - The collection of email address (Strings).
subject - The subject.
textMessage - The plain text message.
htmlMessage - The HTML message.

NotificationMessage

public NotificationMessage(java.util.Collection addresses,
                           java.lang.String subject,
                           java.lang.String textMessage,
                           java.lang.String htmlMessage,
                           java.lang.String tenant,
                           java.lang.String topic,
                           java.lang.String locale)
The constructor of NotificationMessage when taking advantage of Post Office functionality. This constructor can be used in a multi-tenant deployment when creating notifications that are subject to Post Office (grouping and forwarding on interval) processing.

Parameters:
addresses - The collection of email address (Strings).
subject - The subject of the email. null means the email will have no Subject
textMessage - The plain text message of the email. null means the email content will have no plain text.
htmlMessage - The HTML message of the email. null means the email content will have no HTML.
tenant - The short name of the tenant to use when applying email aggregation template. null means use the system default tenant. NOTE: this is not the tenant DN
topic - The topic to use for grouping emails. null means grouping is not desired.
locale - The locale of the recipient of this message (ie, en_US.

NotificationMessage

public NotificationMessage(java.util.Collection addresses,
                           java.lang.String subject,
                           java.lang.String textMessage,
                           java.lang.String htmlMessage,
                           java.lang.String tenant,
                           java.lang.String locale)
The constructor of NotificationMessage when taking advantage of Post Office functionality. This constructor can be used in a multi-tenant deployment when creating notifications that are subject to Post Office (grouping and forwarding on interval) processing. This constructor differs from the one above in that it does not take a topic as a parameter.

Parameters:
addresses - The collection of email address (Strings).
subject - The subject of the email. null means the email will have no Subject
textMessage - The plain text message of the email. null means the email content will have no plain text.
htmlMessage - The HTML message of the email. null means the email content will have no HTML.
tenant - The short name of the tenant to use when applying email aggregation template. null means use the system default tenant. NOTE: this is not the tenant DN
locale - The locale of the recipient of this message.
Method Detail

getEmailAddresses

public java.util.Collection getEmailAddresses()
Returns the recipients of the message.

Returns:
Collection of recipients (Strings).

setEmailAddresses

public void setEmailAddresses(java.util.Collection addresses)
Changes the recipients of the message.

Parameters:
addresses - Collection of the new recipients (Strings).

getSubject

public java.lang.String getSubject()
Returns the subject of the message.

Returns:
Subject of the message.

setSubject

public void setSubject(java.lang.String subject)
Changes the subject of the message.

Parameters:
subject - New message subject.

getMessage

public java.lang.String getMessage()
Returns the text message body.

Returns:
Plain text message body.

setMessage

public void setMessage(java.lang.String textMessage)
Changes the text body of the message.

Parameters:
textMessage - New text body.

getHtmlMessage

public java.lang.String getHtmlMessage()
Returns the HTML message body (if any).

Returns:
HTML message body content.

setHtmlMessage

public void setHtmlMessage(java.lang.String htmlMessage)
Change sthe HTML message body.

Parameters:
htmlMessage - String holding the new HTML formatted message body.

getTopic

public java.lang.String getTopic()
Returns the topic of the message (if any). Messages that have the same topic share enough similarities that may be useful for the mail system to base rules on, such as how to forward messages in a group to their recipients.

Returns:
Topic of this message.

setTopic

public void setTopic(java.lang.String topic)
Changes the topic of the message. Messages that have the same topic share enough similarities that may be useful for the mail system to base rules on, such as how to forward messages in a group to their recipients.

Parameters:
topic - Topic of the message. An empty string or null indicates the message does not have a topic.

getLocale

public java.lang.String getLocale()
Returns the locale the message was written in.

Returns:
Locale locale of this message.

setLocale

public void setLocale(java.lang.String locale)
Changes the locale the message was written in.

Parameters:
locale - Locale of the message.

getTenant

public java.lang.String getTenant()
Returns the tenant of this message. If this message has a Topic, the tenant is used by the mail system to determine store and forwarding policy. If null, this message will be handled under the default tenant policy. This is the tenant shortname, not full DN

Returns:
Tenant of this message.

setTenant

public void setTenant(java.lang.String tenant)
Changes the tenant for this message. If this message has a Topic, the tenant is used by the mail system to determine store and forwarding policy. If null, this message will be handled under the default tenant policy. Note: this is the tenant shortname, not full DN

Parameters:
tenant - String shortname value of tenant.

toString

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


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.