com.atlassian.confluence.mail.notification
Class DefaultNotificationManager

java.lang.Object
  extended by com.atlassian.confluence.mail.notification.DefaultNotificationManager
All Implemented Interfaces:
NotificationManager

public class DefaultNotificationManager
extends Object
implements NotificationManager


Constructor Summary
DefaultNotificationManager()
           
 
Method Summary
 Notification addDailyReportNotfication(com.atlassian.user.User user)
           
protected  Notification addNotification(com.atlassian.user.User user, Space space, AbstractPage page)
           
 Notification addPageNotification(com.atlassian.user.User user, AbstractPage page)
           
 Notification addSpaceNotification(com.atlassian.user.User user, Space space)
           
 List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
          Retrieves the list of Network Notifications for Users who are following the given User.
 Notification getDailyReportNotificationForUser(com.atlassian.user.User user)
           
 List<Notification> getDailyReportNotifications()
           
 Notification getNetworkNotificationForUser(com.atlassian.user.User user)
           
 Notification getNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
           
 Notification getNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
           
 NotificationDao getNotificationDao()
           
 List<Notification> getNotificationsByPage(AbstractPage page)
           
 List<Notification> getNotificationsBySpace(Space space)
           
 List<Notification> getNotificationsByUser(com.atlassian.user.User user)
           
 Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)
           
 List<Notification> getSiteBlogNotifications()
           
 boolean isUserWatchingPageOrSpace(com.atlassian.user.User user, Space space, AbstractPage page)
           
 void removeAllNotificationsForUser(com.atlassian.user.User user)
          Remove all of the notifications setup for this user.
 void removeDailyReportNotification(com.atlassian.user.User user)
           
 void removeNotification(Notification notification)
           
 void setEventManager(com.atlassian.event.EventManager eventManager)
           
 void setNetworkNotificationForUser(com.atlassian.user.User user, boolean watchingNetwork)
           
 void setNotificationDao(NotificationDao notificationDao)
           
 void setSiteBlogNotificationForUser(com.atlassian.user.User user, boolean globalBlogWatchForUser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNotificationManager

public DefaultNotificationManager()
Method Detail

setEventManager

public void setEventManager(com.atlassian.event.EventManager eventManager)

getNotificationDao

public NotificationDao getNotificationDao()

setNotificationDao

public void setNotificationDao(NotificationDao notificationDao)

getNotificationsByUser

public List<Notification> getNotificationsByUser(com.atlassian.user.User user)
Specified by:
getNotificationsByUser in interface NotificationManager

getNotificationByUserAndPage

public Notification getNotificationByUserAndPage(com.atlassian.user.User user,
                                                 AbstractPage page)
Specified by:
getNotificationByUserAndPage in interface NotificationManager

getNotificationByUserAndSpace

public Notification getNotificationByUserAndSpace(com.atlassian.user.User user,
                                                  String spaceKey)
Specified by:
getNotificationByUserAndSpace in interface NotificationManager

addPageNotification

public Notification addPageNotification(com.atlassian.user.User user,
                                        AbstractPage page)
Specified by:
addPageNotification in interface NotificationManager

addSpaceNotification

public Notification addSpaceNotification(com.atlassian.user.User user,
                                         Space space)
Specified by:
addSpaceNotification in interface NotificationManager

addNotification

protected Notification addNotification(com.atlassian.user.User user,
                                       Space space,
                                       AbstractPage page)

removeNotification

public void removeNotification(Notification notification)
Specified by:
removeNotification in interface NotificationManager

isUserWatchingPageOrSpace

public boolean isUserWatchingPageOrSpace(com.atlassian.user.User user,
                                         Space space,
                                         AbstractPage page)
Specified by:
isUserWatchingPageOrSpace in interface NotificationManager

getNotificationsByPage

public List<Notification> getNotificationsByPage(AbstractPage page)
Specified by:
getNotificationsByPage in interface NotificationManager

getNotificationsBySpace

public List<Notification> getNotificationsBySpace(Space space)
Specified by:
getNotificationsBySpace in interface NotificationManager

removeAllNotificationsForUser

public void removeAllNotificationsForUser(com.atlassian.user.User user)
Description copied from interface: NotificationManager
Remove all of the notifications setup for this user. This includes space, page and daily report notifications.

Specified by:
removeAllNotificationsForUser in interface NotificationManager

getDailyReportNotifications

public List<Notification> getDailyReportNotifications()
Specified by:
getDailyReportNotifications in interface NotificationManager

getDailyReportNotificationForUser

public Notification getDailyReportNotificationForUser(com.atlassian.user.User user)
Specified by:
getDailyReportNotificationForUser in interface NotificationManager

getSiteBlogNotifications

public List<Notification> getSiteBlogNotifications()
Specified by:
getSiteBlogNotifications in interface NotificationManager

findNotificationsByFollowing

public List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
Description copied from interface: NotificationManager
Retrieves the list of Network Notifications for Users who are following the given User. That is, all Notifications that return true from Notification.isNetwork() and belong to somebody who is following modifier via a Connection.

Specified by:
findNotificationsByFollowing in interface NotificationManager
Parameters:
modifier - usually a user who has modified a piece of content.
Returns:
notifications for anybody subscribed to network notifications who follows modifier.
See Also:
Connection

getSiteBlogNotificationForUser

public Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)
Specified by:
getSiteBlogNotificationForUser in interface NotificationManager

getNetworkNotificationForUser

public Notification getNetworkNotificationForUser(com.atlassian.user.User user)
Specified by:
getNetworkNotificationForUser in interface NotificationManager

setSiteBlogNotificationForUser

public void setSiteBlogNotificationForUser(com.atlassian.user.User user,
                                           boolean globalBlogWatchForUser)
Specified by:
setSiteBlogNotificationForUser in interface NotificationManager

setNetworkNotificationForUser

public void setNetworkNotificationForUser(com.atlassian.user.User user,
                                          boolean watchingNetwork)
Specified by:
setNetworkNotificationForUser in interface NotificationManager

addDailyReportNotfication

public Notification addDailyReportNotfication(com.atlassian.user.User user)
Specified by:
addDailyReportNotfication in interface NotificationManager

removeDailyReportNotification

public void removeDailyReportNotification(com.atlassian.user.User user)
Specified by:
removeDailyReportNotification in interface NotificationManager


Copyright © 2003-2011 Atlassian. All Rights Reserved.