|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.notify.TemplateNotification
A Notification
that derives its message body from an html
template and its subject from a resource bundle message.
Provides the ability to send a translated version of the notification
body, based on an html template, when the distribution list contains
users in different locales.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private String |
contentType
|
private static String |
RESOURCE
|
private String |
sender
|
private Object[] |
subjectInserts
|
private String |
subjectMessageKey
|
private String |
subjectResource
|
private String |
template
|
private Object |
templateProcessor
|
private String |
textPart
|
private DistributionList |
theDistributionList
|
private static boolean |
VERBOSE
|
Fields inherited from interface wt.notify.Notification |
BODY, CONTENT_TYPE, DISTRIBUTION_LIST, SENDER, SUBJECT |
Constructor Summary | |
TemplateNotification(DistributionList recipients)
Supported API: false |
Method Summary | |
String |
getBody()
Processes the HTML template and returns the HTML body of the notification. |
String |
getBody(Locale locale)
Return the HTML template for the given Locale. |
String |
getContentType()
Gets the value of the attribute: contentType; "text/html" indicates a SimpleNotification, and "text/html" indicates a TemplateNotification. |
DistributionList |
getDistributionList()
Gets the object for the association that plays role: theDistributionList. |
String |
getSender()
Gets the value of the attribute: sender. |
String |
getSubject()
Supported API: false |
Object[] |
getSubjectInserts()
Gets the value of the attribute: subjectInserts. |
String |
getSubjectMessageKey()
Gets the value of the attribute: subjectMessageKey; The key of the subject message as found in the subjectResource. |
String |
getSubjectResource()
Gets the value of the attribute: subjectResource; The name of the base resource bundle that the subject string belongs to. |
String |
getTemplate()
Gets the value of the attribute: template; The name of the html template that will be processed to generate the body of this notification. |
Object |
getTemplateProcessor()
Gets the value of the attribute: templateProcessor; The object containing all the methods that can be invoked from the html template which is being processed to generate the notification body. |
String |
getTextPart()
Gets the value of the attribute: textPart; The text part of the notification. |
void |
send()
This method constructs and sends an e-mail message for each locale in the distribution list. |
void |
setBody(String a_Body)
Sets the value of the attribute: body. |
void |
setDistributionList(DistributionList a_DistributionList)
Sets the object for the association that plays role: theDistributionList. |
void |
setSender(String a_Sender)
Sets the value of the attribute: sender. |
void |
setSubjectInserts(Object[] a_SubjectInserts)
Sets the value of the attribute: subjectInserts. |
void |
setSubjectMessageKey(String a_SubjectMessageKey)
Sets the value of the attribute: subjectMessageKey; The key of the subject message as found in the subjectResource. |
void |
setSubjectResource(String a_SubjectResource)
Sets the value of the attribute: subjectResource; The name of the base resource bundle that the subject string belongs to. |
void |
setTemplate(String a_Template)
Sets the value of the attribute: template; The name of the html template that will be processed to generate the body of this notification. |
void |
setTemplateProcessor(Object a_TemplateProcessor)
Sets the value of the attribute: templateProcessor; The object containing all the methods that can be invoked from the html template which is being processed to generate the notification body. |
void |
setTextPart(String a_TextPart)
Sets the value of the attribute: textPart; The text part of the notification. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Object templateProcessor
private String template
private String subjectResource
private String subjectMessageKey
private Object[] subjectInserts
private String textPart
private String sender
private String contentType
private DistributionList theDistributionList
private static final boolean VERBOSE
Constructor Detail |
public TemplateNotification(DistributionList recipients)
recipients
- Method Detail |
public Object getTemplateProcessor()
public void setTemplateProcessor(Object a_TemplateProcessor)
a_TemplateProcessor
- public String getTemplate()
public void setTemplate(String a_Template)
a_Template
- public String getSubjectResource()
public void setSubjectResource(String a_SubjectResource)
a_SubjectResource
- public String getSubjectMessageKey()
public void setSubjectMessageKey(String a_SubjectMessageKey)
a_SubjectMessageKey
- public Object[] getSubjectInserts()
public void setSubjectInserts(Object[] a_SubjectInserts)
a_SubjectInserts
- public String getTextPart()
public void setTextPart(String a_TextPart)
a_TextPart
- public String getBody() throws WTRuntimeException
getBody
in interface Notification
WTRuntimeException
public String getSubject()
getSubject
in interface Notification
public void send() throws NotificationException
send
in interface Notification
NotificationException
wt.mail
public String getBody(Locale locale) throws WTRuntimeException
locale
-
WTRuntimeException
public String getSender()
getSender
in interface Notification
public void setSender(String a_Sender)
setSender
in interface Notification
a_Sender
- public void setBody(String a_Body)
setBody
in interface Notification
a_Body
- public String getContentType()
getContentType
in interface Notification
public DistributionList getDistributionList()
getDistributionList
in interface Notification
public void setDistributionList(DistributionList a_DistributionList)
setDistributionList
in interface Notification
a_DistributionList
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |