com.atlassian.confluence.mail.notification
Interface NotificationManager

All Known Implementing Classes:
DefaultNotificationManager

public interface NotificationManager


Method Summary
 Notification addContentNotification(com.atlassian.user.User user, ContentEntityObject content)
           
 Notification addDailyReportNotfication(com.atlassian.user.User user)
           
 boolean addLabelNotification(com.atlassian.user.User user, Label label)
           
 Notification addPageNotification(com.atlassian.user.User user, AbstractPage page)
          Deprecated. since 5.3. Use addContentNotification(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.
 Notification addSpaceNotification(com.atlassian.user.User user, Space space)
           
 Notification addSpaceNotification(com.atlassian.user.User user, Space space, ContentTypeEnum type)
          Add a space notification for a particular content type.
 java.util.List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
          Retrieves the list of Network Notifications for Users who are following the given User.
 java.lang.Iterable<java.lang.Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
          Retrieves ids of all notifications in a space.
 Notification getDailyReportNotificationForUser(com.atlassian.user.User user)
           
 java.util.List<Notification> getDailyReportNotifications()
           
 Notification getNetworkNotificationForUser(com.atlassian.user.User user)
           
 Notification getNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
           
 Notification getNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
          Deprecated. since 5.3. Use getNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.
 Notification getNotificationByUserAndSpace(com.atlassian.user.User user, Space space)
          Return a notification if the user is watching the entire space.
 Notification getNotificationByUserAndSpace(com.atlassian.user.User user, java.lang.String spaceKey)
          Return a notification if the user is watching the entire space with the given spaceKey.
 Notification getNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type)
           
 java.util.List<Notification> getNotificationsByContent(ContentEntityObject content)
           
 java.util.List<Notification> getNotificationsByLabel(Label label)
           
 java.util.List<Notification> getNotificationsByPage(AbstractPage page)
          Deprecated. since 5.3. Use getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead.
 java.util.List<Notification> getNotificationsBySpace(Space space)
          Deprecated. Since 3.5 - use getNotificationsBySpaceAndType(Space, ContentTypeEnum)
 java.util.List<Notification> getNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
           
 java.util.List<Notification> getNotificationsByUser(com.atlassian.user.User user)
           
 Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)
           
 java.util.List<Notification> getSiteBlogNotifications()
           
 boolean isUserWatchingPageOrSpace(com.atlassian.user.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.
 boolean isWatchingContent(com.atlassian.user.User user, ContentEntityObject content)
           
 boolean isWatchingLabel(com.atlassian.user.User user, Label label)
           
 void removeAllNotificationsForSpace(Space space)
          Remove all of the notifications set up for this space.
 void removeAllNotificationsForUser(com.atlassian.user.User user)
          Remove all of the notifications setup for this user.
 void removeContentNotification(com.atlassian.user.User user, ContentEntityObject content)
           
 void removeDailyReportNotification(com.atlassian.user.User user)
           
 void removeLabelNotification(com.atlassian.user.User user, Label label)
           
 void removeNotification(Notification notification)
           
 void setNetworkNotificationForUser(com.atlassian.user.User user, boolean watchingNetwork)
           
 void setSiteBlogNotificationForUser(com.atlassian.user.User user, boolean globalBlogWatchForUser)
           
 

Method Detail

getNotificationsByUser

java.util.List<Notification> getNotificationsByUser(com.atlassian.user.User user)

getNotificationsByContent

java.util.List<Notification> getNotificationsByContent(ContentEntityObject content)

getNotificationByUserAndContent

Notification getNotificationByUserAndContent(com.atlassian.user.User user,
                                             ContentEntityObject content)

getNotificationsBySpaceAndType

java.util.List<Notification> getNotificationsBySpaceAndType(Space space,
                                                            ContentTypeEnum type)

getNotificationByUserAndSpace

Notification getNotificationByUserAndSpace(com.atlassian.user.User user,
                                           java.lang.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(com.atlassian.user.User, com.atlassian.confluence.spaces.Space, com.atlassian.confluence.search.service.ContentTypeEnum) instead.


getNotificationByUserAndSpace

Notification getNotificationByUserAndSpace(com.atlassian.user.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(com.atlassian.user.User, com.atlassian.confluence.spaces.Space, com.atlassian.confluence.search.service.ContentTypeEnum) instead.


getNotificationByUserAndSpaceAndType

Notification getNotificationByUserAndSpaceAndType(com.atlassian.user.User user,
                                                  Space space,
                                                  ContentTypeEnum type)

addContentNotification

Notification addContentNotification(com.atlassian.user.User user,
                                    ContentEntityObject content)

addSpaceNotification

Notification addSpaceNotification(com.atlassian.user.User user,
                                  Space space)

removeContentNotification

void removeContentNotification(com.atlassian.user.User user,
                               ContentEntityObject content)

isWatchingContent

boolean isWatchingContent(com.atlassian.user.User user,
                          ContentEntityObject content)

addLabelNotification

boolean addLabelNotification(com.atlassian.user.User user,
                             Label label)

removeLabelNotification

void removeLabelNotification(com.atlassian.user.User user,
                             Label label)

isWatchingLabel

boolean isWatchingLabel(com.atlassian.user.User user,
                        Label label)

getNotificationsByLabel

java.util.List<Notification> getNotificationsByLabel(Label label)

addSpaceNotification

Notification addSpaceNotification(com.atlassian.user.User user,
                                  Space space,
                                  ContentTypeEnum type)
Add a space notification for a particular content type. For example, watch only blogs in a space.


addDailyReportNotfication

Notification addDailyReportNotfication(com.atlassian.user.User user)

removeDailyReportNotification

void removeDailyReportNotification(com.atlassian.user.User user)

removeNotification

void removeNotification(Notification notification)

isUserWatchingPageOrSpace

boolean isUserWatchingPageOrSpace(com.atlassian.user.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.


removeAllNotificationsForUser

void removeAllNotificationsForUser(com.atlassian.user.User user)
Remove all of the notifications setup for this user. This includes space, page and daily report notifications.


removeAllNotificationsForSpace

void removeAllNotificationsForSpace(Space space)
Remove all of the notifications set up for this space.


getDailyReportNotifications

java.util.List<Notification> getDailyReportNotifications()

getDailyReportNotificationForUser

Notification getDailyReportNotificationForUser(com.atlassian.user.User user)

getSiteBlogNotificationForUser

Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)

getNetworkNotificationForUser

Notification getNetworkNotificationForUser(com.atlassian.user.User user)

setSiteBlogNotificationForUser

void setSiteBlogNotificationForUser(com.atlassian.user.User user,
                                    boolean globalBlogWatchForUser)

setNetworkNotificationForUser

void setNetworkNotificationForUser(com.atlassian.user.User user,
                                   boolean watchingNetwork)

getSiteBlogNotifications

java.util.List<Notification> getSiteBlogNotifications()

findNotificationsByFollowing

java.util.List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
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.

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

findPageAndSpaceNotificationIdsFromSpace

java.lang.Iterable<java.lang.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.
Since:
4.2

getNotificationsByPage

@Deprecated
java.util.List<Notification> getNotificationsByPage(AbstractPage page)
Deprecated. since 5.3. Use getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead.


getNotificationsBySpace

@Deprecated
java.util.List<Notification> getNotificationsBySpace(Space space)
Deprecated. Since 3.5 - use getNotificationsBySpaceAndType(Space, ContentTypeEnum)

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


getNotificationByUserAndPage

@Deprecated
Notification getNotificationByUserAndPage(com.atlassian.user.User user,
                                                     AbstractPage page)
Deprecated. since 5.3. Use getNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.


addPageNotification

@Deprecated
Notification addPageNotification(com.atlassian.user.User user,
                                            AbstractPage page)
Deprecated. since 5.3. Use addContentNotification(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.



Copyright © 2003-2014 Atlassian. All Rights Reserved.