Java Doc for EmailNotification.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.util.EmailNotification

All known Subclasses:   org.sakaiproject.util.SiteEmailNotification,
EmailNotification
public class EmailNotification implements NotificationAction(Code)

EmailNotification is the notification action that handles the act of message (email) based notify, site related, with user preferences.

The following should be specified to extend the class:

  • getRecipients() - get a collection of Users to send the notification to
  • getHeaders() - form the complete message headers (like from: to: reply-to: date: subject: etc). from: and to: are for display only
  • getMessage() - form the complete message body (minus headers)
  • getTag() - the part of the body at the end that identifies the list
  • isBodyHTML() - say if your body is html or not (not would be plain text)

getClone() should also be extended to clone the proper type of object.



Field Summary
protected  Stringm_siteId
     The related site id.

Constructor Summary
public  EmailNotification()
     Construct.
public  EmailNotification(String siteId)
     Construct.

Method Summary
protected  ListdigestRecipients(List recipients, Notification notification, Event event)
     Filter the recipients Users into the list of those who get this one by digest.
protected  StringfindHeader(String header, List headers)
     Find the header line that begins with the header parameter
Parameters:
  header - The header to find.
Parameters:
  headers - The list of full header lines.
protected  StringfindHeaderValue(String header, List headers)
     Find the header value whose name matches with the header parameter
Parameters:
  header - The header to find.
Parameters:
  headers - The list of full header lines.
public  NotificationActiongetClone()
     Make a new one like me.
protected  StringgetFrom(Event event)
    
protected  StringgetFromEventUser(Event event)
     Format the from user email address based on the user generating the event (current user).
Parameters:
  event - The event that matched criteria to cause the notification.
protected  StringgetFromService()
     Format a from address from the service, no reply.
protected  ListgetHeaders(Event event)
     Get headers for the email (List of String, full header lines) - including Subject: Date: To: From: if appropriate, as well as any others
Parameters:
  event - The event that matched criteria to cause the notification.
protected  StringgetMessage(Event event)
     Get the message for the email.
Parameters:
  event - The event that matched criteria to cause the notification.
protected  intgetOption(User user, Notification notification, Event event)
     Get the user's notification option for this...
protected  ListgetRecipients(Event event)
     Get the list of User objects who are eligible to receive the notification email.
Parameters:
  event - The event that matched criteria to cause the notification.
protected  StringgetSite()
     Get the site id this notification is related to.
protected  StringgetTag(String newline, String title)
     Get the message tag, the text to display at the bottom of the message.
Parameters:
  newline - The newline character(s).
Parameters:
  title - The title string.
protected  ListimmediateRecipients(List recipients, Notification notification, Event event)
     Filter the recipients Users into the list of those who get this one immediately.
protected  booleanisBodyHTML(Event event)
     Return true if the body of the email message should be sent as HTML.
protected  booleanisImmediateDeliveryOption(int option, Notification notification)
     Filter the preference option based on the notification resource type
Parameters:
  option - The preference option.
Parameters:
  notification - The notification responding to the event.
public  voidnotify(Notification notification, Event event)
     Do the notification.
public  voidset(Element el)
     Set from an xml element.
public  voidset(NotificationAction other)
     Set from another.
public  voidtoXml(Element el)
     Fill this xml element with the attributes.

Field Detail
m_siteId
protected String m_siteId(Code)
The related site id.




Constructor Detail
EmailNotification
public EmailNotification()(Code)
Construct.



EmailNotification
public EmailNotification(String siteId)(Code)
Construct.
Parameters:
  siteId - The related site id.




Method Detail
digestRecipients
protected List digestRecipients(List recipients, Notification notification, Event event)(Code)
Filter the recipients Users into the list of those who get this one by digest. Combine the event's notification priority with the user's notification profile.
Parameters:
  recipients - The List (User) of potential recipients.
Parameters:
  notification - The notification responding to the event.
Parameters:
  event - The event that matched criteria to cause the notification. The List (User) of digest recipients.



findHeader
protected String findHeader(String header, List headers)(Code)
Find the header line that begins with the header parameter
Parameters:
  header - The header to find.
Parameters:
  headers - The list of full header lines. The header line found or null if not found.



findHeaderValue
protected String findHeaderValue(String header, List headers)(Code)
Find the header value whose name matches with the header parameter
Parameters:
  header - The header to find.
Parameters:
  headers - The list of full header lines. The header line found or null if not found.



getClone
public NotificationAction getClone()(Code)
Make a new one like me. A new action just like me.



getFrom
protected String getFrom(Event event)(Code)
Format a From: respecting the notification service replyable configuration
Parameters:
  event -



getFromEventUser
protected String getFromEventUser(Event event)(Code)
Format the from user email address based on the user generating the event (current user).
Parameters:
  event - The event that matched criteria to cause the notification. the from user email address based on the user generating the event.



getFromService
protected String getFromService()(Code)
Format a from address from the service, no reply. a from address from the service, no reply.



getHeaders
protected List getHeaders(Event event)(Code)
Get headers for the email (List of String, full header lines) - including Subject: Date: To: From: if appropriate, as well as any others
Parameters:
  event - The event that matched criteria to cause the notification. the additional headers for the email.



getMessage
protected String getMessage(Event event)(Code)
Get the message for the email.
Parameters:
  event - The event that matched criteria to cause the notification. the message for the email.



getOption
protected int getOption(User user, Notification notification, Event event)(Code)
Get the user's notification option for this... one of the NotificationService's PREF_ settings



getRecipients
protected List getRecipients(Event event)(Code)
Get the list of User objects who are eligible to receive the notification email.
Parameters:
  event - The event that matched criteria to cause the notification. the list of User objects who are eligible to receive the notification email.



getSite
protected String getSite()(Code)
Get the site id this notification is related to. The site id this notification is related to.



getTag
protected String getTag(String newline, String title)(Code)
Get the message tag, the text to display at the bottom of the message.
Parameters:
  newline - The newline character(s).
Parameters:
  title - The title string. The message tag.



immediateRecipients
protected List immediateRecipients(List recipients, Notification notification, Event event)(Code)
Filter the recipients Users into the list of those who get this one immediately. Combine the event's notification priority with the user's notification profile.
Parameters:
  recipients - The List (User) of potential recipients.
Parameters:
  notification - The notification responding to the event.
Parameters:
  event - The event that matched criteria to cause the notification. The List (User) of immediate recipients.



isBodyHTML
protected boolean isBodyHTML(Event event)(Code)
Return true if the body of the email message should be sent as HTML. If this returns true, getHeaders() should also return a "Content-Type: text/html" header of some kind.
Parameters:
  event - The event that matched criteria to cause the notification. whether the body of the email message should be sent as HTML.



isImmediateDeliveryOption
protected boolean isImmediateDeliveryOption(int option, Notification notification)(Code)
Filter the preference option based on the notification resource type
Parameters:
  option - The preference option.
Parameters:
  notification - The notification responding to the event. A boolean value which tells if the User is one of immediate recipients.



notify
public void notify(Notification notification, Event event)(Code)
Do the notification.
Parameters:
  notification - The notification responding to the event.
Parameters:
  event - The event that matched criteria to cause the notification.



set
public void set(Element el)(Code)
Set from an xml element.
Parameters:
  el - The xml element.



set
public void set(NotificationAction other)(Code)
Set from another.
Parameters:
  other - The other to copy.



toXml
public void toXml(Element el)(Code)
Fill this xml element with the attributes.
Parameters:
  el - The xml element.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.