org.tigris.scarab.notification
Interface NotificationManager

All Known Implementing Classes:
ScarabNewNotificationManager, ScarabOldNotificationManager

public interface NotificationManager

The Notification Manager is meant to be the central service to provide notifications related with the usual flow of activities in Scarab. It has essentially two functions:

The simpler notification manager implementation might directly send emails to the involved users in the moment the notifications are created.

A slightly improved implementation will be able to:

The real implementation of this interface to be instantiated is defined by scarab.notificationmanager.classname property (defaults to ScarabNotificationManager)
This interface also holds the constants defining the different types of events in the system.

Author:
jorgeuriarte
See Also:
NotificationManagerFactory

Method Summary
 void addActivityNotification(ActivityType event, ActivitySet activitySet, Issue issue, ScarabUser fromUser)
          This method should add a notification to be processed.
 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'.
 java.lang.Integer getManagerId()
          Each manager has its own id (Which happens to be a small integer value.
 void sendPendingNotifications()
          Implementations of this method should provide the means to send the pending notifications.
 

Method Detail

addActivityNotification

public void addActivityNotification(ActivityType event,
                                    ActivitySet activitySet,
                                    Issue issue,
                                    ScarabUser fromUser)
This method should add a notification to be processed. It must decide if the activities are relevant to the recipients and filter acordingly.

Parameters:
event - The event that originated the notification
activitySet - The activity set describing the event
issue - The issue affected by the event
fromUser - 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'.

Parameters:
event - The event that originated the notification
activitySet - The activity set describing the event
issue - The issue affected by the event
toUsers - 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()
Implementations of this method should provide the means to send the pending notifications. Only makes sense when the implementation is 'offline', probably calling regularly to this method.


getManagerId

public java.lang.Integer getManagerId()
Each manager has its own id (Which happens to be a small integer value.

Returns:


Copyright © 2000-2004 Tigris.org. All Rights Reserved.