com.ibm.itim.mail
Class NotificationMessage

java.lang.Object
  extended by 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.It is internally used for upgrade. Implements Importable interface to indicate deserializer to perform the default object import even if the class definition has changed.
If notification message is sent with the topic then the post office collects similar notifications for a period of time and combines those into a single notification which is sent to the user.

See Also:
Serialized Form

Constructor Summary
NotificationMessage()
          The default constructor of NotificationMessage.Initializes subject, message, htmlMessage to blank string.
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 the HTML message body.
 void setLocale(java.lang.String locale)
          Changes the locale, the message was written in.The format of locale is en_US.
 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()
The default constructor of NotificationMessage.Initializes subject, message, htmlMessage to blank string.


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).The format of address is account@host.domain
subject - The subject.
textMessage - The plain text message.
htmlMessage - The HTML message.null means the email content will have no plain text.

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).The format of address is account@host.domain
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).The format of address is account@host.domain
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 the 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. Used to group notification templates with post office. 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 null topic indicates the message does not have a topic and should not be aggregated by the post office feature.

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.The format of locale is en_US.

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 - The shortname of the new tenant for this message.

toString

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


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.