Package com.atlassian.confluence.it.rpc
Class NotificationsRpc
java.lang.Object
com.atlassian.confluence.it.rpc.NotificationsRpc
Wraps the ConfluenceRpc object for notification-specific calls.
All `watch*` calls are synced on event queue in order to avoid race condition when user starts watching space before first space page get created
- Since:
- 4.2
-
Method Summary
Modifier and TypeMethodDescriptionGets all watchers of a page.boolean
isWatchingPage
(AbstractPageEntity page, User user) Check whether the given user is watching the given page.boolean
isWatchingSpace
(Space space, User user) Check whether the given user is watching the given space.boolean
isWatchingSpaceForType
(Space space, ContentTypeEnum contentType, User user) Check whether the given user is watching the given content type (e.g.void
unwatchPageForUser
(AbstractPageEntity page, User user) Removes a page watch for the specified user.void
unwatchSpace
(User user, Space space, ContentTypeEnum contentType) void
watchNetwork
(User user, boolean watchingNetwork) Sets Network watch emails for a user to enabled or disabled.void
watchPage
(AbstractPageEntity page) Watch a page as the current user.void
watchPageForUser
(AbstractPageEntity page, User user) Add a page watch for the specified user.void
watchSiteBlogs
(User user) void
watchSpace
(Space space) Watch a space as the current user.void
watchSpace
(User user, Space space) Watch all content in a space.void
watchSpace
(User user, Space space, ContentTypeEnum contentType) Watch all content of a certain type in a space.void
watchSpaces
(User user, Iterable<Space> spaces) void
watchSpaces
(User user, Iterable<Space> spaces, ContentTypeEnum contentType)
-
Method Details
-
watchSiteBlogs
-
watchSpace
Watch all content in a space.- Parameters:
user
- to watch content forspace
- to watch content in
-
watchSpaces
-
watchSpace
Watch all content of a certain type in a space.- Parameters:
user
- to watch content forspace
- to watch content incontentType
- type of content to watch (usually blogpost)
-
watchSpaces
-
watchSpace
Watch a space as the current user. -
watchPage
Watch a page as the current user. -
watchPageForUser
Add a page watch for the specified user.- Parameters:
page
- the page whose watches will be checked, this must have its correct id set.
-
unwatchPageForUser
Removes a page watch for the specified user.- Parameters:
page
- the page to stop watchinguser
- the user who no longer wants to watch
-
unwatchSpace
-
isWatchingPage
Check whether the given user is watching the given page.- Parameters:
page
- the page whose watches will be checked, this must have its correct id set.
-
isWatchingSpace
Check whether the given user is watching the given space. -
isWatchingSpaceForType
Check whether the given user is watching the given content type (e.g. blogs) in the space. -
watchNetwork
Sets Network watch emails for a user to enabled or disabled.- Parameters:
user
- the user to set the watch state forwatchingNetwork
- true if the user should watch their network, false if not
-
getWatchersForPage
Gets all watchers of a page.- Parameters:
page
- page to get watchers from
-