org.itracker.services
Interface NotificationService

All Known Implementing Classes:
NotificationServiceImpl

public interface NotificationService


Method Summary
 boolean addIssueNotification(Notification notification)
          TODO: whats its use? Moved from IssueService, could not find out the purpose of this method.
 List<Notification> getIssueNotifications(Issue issue)
          Retrieves all notifications for an issue where the notification's user is also active.
 List<Notification> getIssueNotifications(Issue issue, boolean primaryOnly, boolean activeOnly)
           
 List<Notification> getPrimaryIssueNotifications(Issue issue)
          Retrieves the primary issue notifications.
 boolean hasIssueNotification(Issue issue, Integer userId)
           
 boolean hasIssueNotification(Issue issue, Integer userId, Notification.Role role)
           
 boolean removeIssueNotification(Integer notificationId)
          Retrieves an array of issue notifications.
 void sendNotification(Issue issue, Notification.Type type, String baseURL)
           
 void sendNotification(Issue issue, Notification.Type type, String baseURL, javax.mail.internet.InternetAddress[] receipients, Integer lastModifiedDays)
           
 void sendNotification(Notification notification, Notification.Type type, String baseURL)
           
 

Method Detail

getPrimaryIssueNotifications

List<Notification> getPrimaryIssueNotifications(Issue issue)
Retrieves the primary issue notifications. Primary notifications are defined as the issue owner (or creator if not assigned), and any project owners. This should encompass the list of people that should be notified so that action can be taken on an issue that needs immediate attention.

Parameters:
issueId - the id of the issue to find notifications for

getIssueNotifications

List<Notification> getIssueNotifications(Issue issue)
Retrieves all notifications for an issue where the notification's user is also active.

Parameters:
issueId - the id of the issue to find notifications for

removeIssueNotification

boolean removeIssueNotification(Integer notificationId)
Retrieves an array of issue notifications. The notifications by default is the creator and owner of the issue, all project admins for the issue's project, and anyone else that has a notfication on file.

Parameters:
issueId - the id of the issue to find notifications for
pimaryOnly - only include the primary notifications
activeOnly - only include the notification if the user is currently active (not locked or deleted)
See Also:
org.itracker.services.implementations.IssueServiceImpl#getPrimaryIssueNotifications

getIssueNotifications

List<Notification> getIssueNotifications(Issue issue,
                                         boolean primaryOnly,
                                         boolean activeOnly)
Parameters:
issueId -
primaryOnly -
activeOnly -
Returns:

hasIssueNotification

boolean hasIssueNotification(Issue issue,
                             Integer userId)
Parameters:
issueId -
userId -
Returns:

hasIssueNotification

boolean hasIssueNotification(Issue issue,
                             Integer userId,
                             Notification.Role role)

sendNotification

void sendNotification(Notification notification,
                      Notification.Type type,
                      String baseURL)
Parameters:
notification -
type -
baseURL -

sendNotification

void sendNotification(Issue issue,
                      Notification.Type type,
                      String baseURL)
Parameters:
issue -
type -
baseURL -

sendNotification

void sendNotification(Issue issue,
                      Notification.Type type,
                      String baseURL,
                      javax.mail.internet.InternetAddress[] receipients,
                      Integer lastModifiedDays)
Parameters:
issueId -
type -
baseURL -
receipients -
lastModifiedDays -

addIssueNotification

boolean addIssueNotification(Notification notification)
TODO: whats its use? Moved from IssueService, could not find out the purpose of this method. What will happen with this added Notification?



Copyright © 2002-2012 itracker. All Rights Reserved.