public interface NotificationManager
Modifier and Type | Method and Description |
---|---|
@Nullable Notification |
addContentNotification(com.atlassian.user.User user,
ContentEntityObject content) |
Notification |
addDailyReportNotfication(com.atlassian.user.User user)
Deprecated.
since 7.0.0, use
setNetworkNotificationForUser(ConfluenceUser, boolean) |
Notification |
addDailyReportNotification(ConfluenceUser user) |
boolean |
addLabelNotification(com.atlassian.user.User user,
Label label) |
@Nullable Notification |
addSpaceNotification(com.atlassian.user.User user,
Space space) |
@Nullable Notification |
addSpaceNotification(com.atlassian.user.User user,
Space space,
ContentTypeEnum type)
Add a space notification for a particular content type.
|
List<Notification> |
findNotificationsByFollowing(com.atlassian.user.User modifier)
|
Iterable<Long> |
findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids of all notifications in a space.
|
Notification |
getDailyReportNotificationForUser(com.atlassian.user.User user) |
List<Notification> |
getDailyReportNotifications() |
Notification |
getNetworkNotificationForUser(com.atlassian.user.User user) |
Notification |
getNotificationByUserAndContent(com.atlassian.user.User user,
ContentEntityObject content) |
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,
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) |
List<Notification> |
getNotificationsByContent(ContentEntityObject content) |
List<Notification> |
getNotificationsByLabel(Label label) |
List<Notification> |
getNotificationsBySpaceAndType(Space space,
ContentTypeEnum type) |
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)
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
|
boolean |
isWatchingContent(@Nullable com.atlassian.user.User user,
@Nullable ContentEntityObject content)
Returns true if the given user is directly watching the given 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 |
removeSpaceNotification(com.atlassian.user.User user,
Space space) |
void |
setNetworkNotificationForUser(ConfluenceUser user,
boolean watchingNetwork) |
void |
setNetworkNotificationForUser(com.atlassian.user.User user,
boolean watchingNetwork)
Deprecated.
since 7.0.0, use
setNetworkNotificationForUser(ConfluenceUser, boolean) |
void |
setSiteBlogNotificationForUser(ConfluenceUser user,
boolean globalBlogWatchForUser) |
void |
setSiteBlogNotificationForUser(com.atlassian.user.User user,
boolean globalBlogWatchForUser)
Deprecated.
since 7.0.0, use
setSiteBlogNotificationForUser(ConfluenceUser, boolean) |
List<Notification> getNotificationsByUser(com.atlassian.user.User user)
List<Notification> getNotificationsByContent(ContentEntityObject content)
Notification getNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
List<Notification> getNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
Notification getNotificationByUserAndSpace(com.atlassian.user.User user, String 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.
Notification getNotificationByUserAndSpace(com.atlassian.user.User user, Space 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.
Notification getNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type)
@Nullable Notification addContentNotification(com.atlassian.user.User user, ContentEntityObject content)
@Nullable Notification addSpaceNotification(com.atlassian.user.User user, Space space)
void removeSpaceNotification(com.atlassian.user.User user, Space space)
void removeContentNotification(com.atlassian.user.User user, ContentEntityObject content)
boolean isWatchingContent(@Nullable com.atlassian.user.User user, @Nullable ContentEntityObject content)
Returns false if either the user or the content is null.
user
- user to checkcontent
- content to checkboolean addLabelNotification(com.atlassian.user.User user, Label label)
void removeLabelNotification(com.atlassian.user.User user, Label label)
boolean isWatchingLabel(com.atlassian.user.User user, Label label)
List<Notification> getNotificationsByLabel(Label label)
@Nullable Notification addSpaceNotification(com.atlassian.user.User user, Space space, ContentTypeEnum type)
@Deprecated Notification addDailyReportNotfication(com.atlassian.user.User user)
setNetworkNotificationForUser(ConfluenceUser, boolean)
Notification addDailyReportNotification(ConfluenceUser user)
void removeDailyReportNotification(com.atlassian.user.User user)
void removeNotification(Notification notification)
boolean isUserWatchingPageOrSpace(com.atlassian.user.User user, Space space, AbstractPage page)
This method can be used to check if a user is watching a page directly or indirectly.
void removeAllNotificationsForUser(com.atlassian.user.User user)
void removeAllNotificationsForSpace(Space space)
List<Notification> getDailyReportNotifications()
Notification getDailyReportNotificationForUser(com.atlassian.user.User user)
Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)
Notification getNetworkNotificationForUser(com.atlassian.user.User user)
@Deprecated void setSiteBlogNotificationForUser(com.atlassian.user.User user, boolean globalBlogWatchForUser)
setSiteBlogNotificationForUser(ConfluenceUser, boolean)
void setSiteBlogNotificationForUser(ConfluenceUser user, boolean globalBlogWatchForUser)
@Deprecated void setNetworkNotificationForUser(com.atlassian.user.User user, boolean watchingNetwork)
setNetworkNotificationForUser(ConfluenceUser, boolean)
void setNetworkNotificationForUser(ConfluenceUser user, boolean watchingNetwork)
List<Notification> getSiteBlogNotifications()
List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
Notification
s for User
s who are
following the given User
. That is, all Notification
s that
return true
from Notification.isNetwork()
and belong to somebody
who is following modifier
via a Connection
.modifier
- usually a user who has modified a piece of content.modifier
.Connection
Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
space
- a space to find the notifications forCopyright © 2003–2023 Atlassian. All rights reserved.