Interface RemoteWatchService
- All Known Implementing Classes:
RemoteWatchServiceImpl
@ExperimentalApi
public interface RemoteWatchService
WatchService
implementation that communicates with Confluence remotely using the Confluence REST api.
Provides future returning equivalents for the methods in WatchService.
-
Method Summary
Modifier and TypeMethodDescriptionfindUsersWatchingContentPaginated
(ContentId contentId, PageRequest pageRequest) Returns a paginated list of Users watching the given Content identified by contentId.findUsersWatchingSpacePaginated
(String spaceKey, PageRequest pageRequest) Returns a paginated list of Users watching the given Space identified by spaceKey.isWatchingContentCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, ContentId content) isWatchingSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) isWatchingSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType) unwatchContentCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Remove a watch to the givencontent
unwatchSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Remove a watch to the givenspace
unwatchSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) Get the validator of theWatchService
.watchContentCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Create a watch to the givencontent
watchSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Create a watch to the givenspace
watchSpaceCompletionStage
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) Remove a watch to the blog posts in a givenspace
-
Method Details
-
watchSpaceCompletionStage
CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) Remove a watch to the blog posts in a givenspace
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch forcontentTypes
- the content types in the space to remove the watch for- Since:
- 9.0
-
unwatchSpaceCompletionStage
CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) - Parameters:
userKey
- the watcherspaceKey
- the key of the space to checkcontentTypes
- the content types in the space to check if watching is given- Returns:
- whether the user is watching the given
space
or not - Since:
- 9.0
-
isWatchingSpaceCompletionStage
CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType) - Parameters:
userKey
- the watcherspaceKey
- the key of the space to checkcontentType
- the content type- Returns:
- whether the user is watching the specific content type in the given
space
or not - Since:
- 9.0
-
watchSpaceCompletionStage
CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Create a watch to the givenspace
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to add the watch for- Since:
- 9.0
-
unwatchSpaceCompletionStage
CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Remove a watch to the givenspace
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch for- Since:
- 9.0
-
isWatchingSpaceCompletionStage
CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) - Parameters:
userKey
- the watcherspaceKey
- the key of the space to check- Returns:
- whether the user is watching the given
space
or not - Since:
- 9.0
-
watchContentCompletionStage
CompletionStage<ContentWatch> watchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Create a watch to the givencontent
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to add the watch for- Since:
- 9.0
-
unwatchContentCompletionStage
CompletionStage<Void> unwatchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Remove a watch to the givencontent
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to remove the watch for- Since:
- 9.0
-
isWatchingContentCompletionStage
CompletionStage<Boolean> isWatchingContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId content) - Parameters:
userKey
- the watchercontent
- the content to check- Returns:
- whether the user is watching the given
content
or not - Since:
- 9.0
-
findUsersWatchingSpacePaginated
CompletionStage<PageResponse<User>> findUsersWatchingSpacePaginated(String spaceKey, PageRequest pageRequest) Returns a paginated list of Users watching the given Space identified by spaceKey. Only a Confluence Administrator or Space Administrator can perform this action.- Parameters:
spaceKey
- the key of the Space the User is attempting to view.pageRequest
- the pagination parameters.- Returns:
- Users watching the given Space.
- Since:
- 9.0
-
findUsersWatchingContentPaginated
CompletionStage<PageResponse<User>> findUsersWatchingContentPaginated(ContentId contentId, PageRequest pageRequest) Returns a paginated list of Users watching the given Content identified by contentId. Only a Confluence Administrator or Space Administrator can perform this action.- Parameters:
contentId
- the id of the Content the User is attempting to view.pageRequest
- the pagination parameters.- Returns:
- Users watching the given Content.
- Since:
- 9.0
-
validator
WatchService.Validator validator()Get the validator of theWatchService
.- Returns:
- a Validator that can be used to validate service requests.
-