public interface

NotificationManager

com.atlassian.confluence.mail.notification.NotificationManager
Known Indirect Subclasses

Summary

Public Methods
Notification addDailyReportNotfication(User user)
Notification addPageNotification(User user, AbstractPage page)
Notification addSpaceNotification(User user, Space space)
Notification addSpaceNotification(User user, Space space, ContentTypeEnum type)
Add a space notification for a particular content type.
List<Notification> findNotificationsByFollowing(User modifier)
Retrieves the list of Network Notifications for Users who are following the given User.
Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids of all notifications in a space.
Notification getDailyReportNotificationForUser(User user)
List<Notification> getDailyReportNotifications()
Notification getNetworkNotificationForUser(User user)
Notification getNotificationByUserAndPage(User user, AbstractPage page)
Notification getNotificationByUserAndSpace(User user, String spaceKey)
Return a notification if the user is watching the entire space with the given spaceKey.
Notification getNotificationByUserAndSpace(User user, Space space)
Return a notification if the user is watching the entire space.
Notification getNotificationByUserAndSpaceAndType(User user, Space space, ContentTypeEnum type)
List<Notification> getNotificationsByPage(AbstractPage page)
@Deprecated List<Notification> getNotificationsBySpace(Space space)
This method is deprecated. Since 3.5 - use getNotificationsBySpaceAndType(Space, ContentTypeEnum)
List<Notification> getNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
List<Notification> getNotificationsByUser(User user)
Notification getSiteBlogNotificationForUser(User user)
List<Notification> getSiteBlogNotifications()
boolean isUserWatchingPageOrSpace(User user, Space space, AbstractPage page)
Returns true if: a) the user is watching the AbstractPage b) the user is watching the space, or c) the user is watching the contentType of the AbstractPage for the Space This method can be used to check if a user is watching a page directly or indirectly.
void removeAllNotificationsForSpace(Space space)
Remove all of the notifications set up for this space.
void removeAllNotificationsForUser(User user)
Remove all of the notifications setup for this user.
void removeDailyReportNotification(User user)
void removeNotification(Notification notification)
void setNetworkNotificationForUser(User user, boolean watchingNetwork)
void setSiteBlogNotificationForUser(User user, boolean globalBlogWatchForUser)

Public Methods

public Notification addDailyReportNotfication (User user)

public Notification addPageNotification (User user, AbstractPage page)

public Notification addSpaceNotification (User user, Space space)

public Notification addSpaceNotification (User user, Space space, ContentTypeEnum type)

Add a space notification for a particular content type. For example, watch only blogs in a space.

public List<Notification> findNotificationsByFollowing (User modifier)

Retrieves the list of Network Notifications for Users who are following the given User. That is, all Notifications that return true from isNetwork() and belong to somebody who is following modifier via a Connection.

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

public Iterable<Long> findPageAndSpaceNotificationIdsFromSpace (Space space)

Retrieves ids of all notifications in a space. This is useful for large-scale operations such as space exports. The result includes all notifications for the space, including notifications for pages in the space.

Parameters
space a space to find the notifications for
Returns
  • ids of all the notifications in the space.

public Notification getDailyReportNotificationForUser (User user)

public List<Notification> getDailyReportNotifications ()

public Notification getNetworkNotificationForUser (User user)

public Notification getNotificationByUserAndPage (User user, AbstractPage page)

public Notification getNotificationByUserAndSpace (User user, String spaceKey)

Return a notification if the user is watching the entire space with the given spaceKey. Note that notifications with specified ContentTypeEnum values will not be returned. Use getNotificationByUserAndSpaceAndType(User, Space, ContentTypeEnum) instead.

public Notification getNotificationByUserAndSpace (User user, Space space)

Return a notification if the user is watching the entire space. Note that notifications with specified ContentTypeEnum values will not be returned. Use getNotificationByUserAndSpaceAndType(User, Space, ContentTypeEnum) instead.

public Notification getNotificationByUserAndSpaceAndType (User user, Space space, ContentTypeEnum type)

public List<Notification> getNotificationsByPage (AbstractPage page)

@Deprecated public List<Notification> getNotificationsBySpace (Space space)

This method is deprecated.
Since 3.5 - use getNotificationsBySpaceAndType(Space, ContentTypeEnum)

Return all notifications for a space, regardless of content type.

public List<Notification> getNotificationsBySpaceAndType (Space space, ContentTypeEnum type)

public List<Notification> getNotificationsByUser (User user)

public Notification getSiteBlogNotificationForUser (User user)

public List<Notification> getSiteBlogNotifications ()

public boolean isUserWatchingPageOrSpace (User user, Space space, AbstractPage page)

Returns true if: a) the user is watching the AbstractPage b) the user is watching the space, or c) the user is watching the contentType of the AbstractPage for the Space This method can be used to check if a user is watching a page directly or indirectly.

public void removeAllNotificationsForSpace (Space space)

Remove all of the notifications set up for this space.

public void removeAllNotificationsForUser (User user)

Remove all of the notifications setup for this user. This includes space, page and daily report notifications.

public void removeDailyReportNotification (User user)

public void removeNotification (Notification notification)

public void setNetworkNotificationForUser (User user, boolean watchingNetwork)

public void setSiteBlogNotificationForUser (User user, boolean globalBlogWatchForUser)