org.tigris.scarab.notification
Class ScarabNewNotificationManager
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.tigris.scarab.notification.ScarabNewNotificationManager
- All Implemented Interfaces:
- NotificationManager, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- ScarabNotificationManager
- public class ScarabNewNotificationManager
- extends javax.servlet.http.HttpServlet
- implements NotificationManager
This class provides the new implementation for the Notification Manager.
It will queue the notifications, and then process them consolidating by user and issue, so
a user will only get ONE email for issue containing every activity relating this
issue since the last notification.
- Author:
- jorgeuriarte
- See Also:
- Serialized Form
|
Field Summary |
static org.apache.log4j.Logger |
log
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static org.apache.log4j.Logger log
ScarabNewNotificationManager
public ScarabNewNotificationManager()
getManagerId
public java.lang.Integer getManagerId()
- Description copied from interface:
NotificationManager
- Each manager has its own id (Which happens to be
a small integer value.
- Specified by:
getManagerId in interface NotificationManager
- Returns:
addActivityNotification
public void addActivityNotification(ActivityType event,
ActivitySet activitySet,
Issue issue,
ScarabUser fromUser)
- Receives an activitySet from which to generate notification. Current
implementation does only online email sending, with no aggregation or
filtering.
- Specified by:
addActivityNotification in interface NotificationManager
- Parameters:
event - The event that originated the notificationactivitySet - The activity set describing the eventissue - The issue affected by the eventfromUser - TODO- See Also:
addActivityNotification(NotificationEvent, EmailContext,
ActivitySet, Issue, Set, Set),
#addActivityNotification(NotificationEvent, EmailContext, ActivitySet, Issue, Set, Set)
addActivityNotification
public void addActivityNotification(ActivityType event,
ActivitySet activitySet,
Issue issue,
java.util.Set toUsers,
java.util.Set ccUsers,
ScarabUser fromUser)
- Long version of the addActivityNotification method, allowing to pass the sets of
users involved as 'To' or 'CC'.
- Specified by:
addActivityNotification in interface NotificationManager
- Parameters:
event - The event that originated the notificationactivitySet - The activity set describing the eventissue - The issue affected by the eventtoUsers - List of users intended to be notified as 'To:'ccUsers - List of users intended to be notified in 'CC:'fromUser - TODO- See Also:
#addActivityNotification(NotificationEvent, ActivitySet, Issue, ScarabUser)
sendPendingNotifications
public void sendPendingNotifications()
- This method process the pending notifications and send them
to the users.
If the NotificationManager is not activated, this method
will not do anything (the mail should have been sent already).
- Specified by:
sendPendingNotifications in interface NotificationManager
Copyright © 2000-2004 Tigris.org. All Rights Reserved.