Class RemoteWatchServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<WatchService>
com.atlassian.confluence.rest.client.impl.RemoteWatchServiceImpl
- All Implemented Interfaces:
RemoteWatchService
public class RemoteWatchServiceImpl
extends AbstractRemoteService<WatchService>
implements RemoteWatchService
-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteWatchServiceImpl
(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
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 contentId) 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
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfGenericListResponse, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, newExperimentalRestWebTarget, newWebTarget, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postVoidCompletionStage, putCompletionStage, putVoidCompletionStage
-
Constructor Details
-
RemoteWatchServiceImpl
- Since:
- 9.0
-
-
Method Details
-
validator
Description copied from interface:RemoteWatchService
Get the validator of theWatchService
.- Specified by:
validator
in interfaceRemoteWatchService
- Returns:
- a Validator that can be used to validate service requests.
-
watchSpaceCompletionStage
public CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) Description copied from interface:RemoteWatchService
Remove a watch to the blog posts in a givenspace
- Specified by:
watchSpaceCompletionStage
in interfaceRemoteWatchService
- 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
-
unwatchSpaceCompletionStage
public CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) - Specified by:
unwatchSpaceCompletionStage
in interfaceRemoteWatchService
- 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
-
isWatchingSpaceCompletionStage
public CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType) - Specified by:
isWatchingSpaceCompletionStage
in interfaceRemoteWatchService
- 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
-
watchSpaceCompletionStage
public CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Description copied from interface:RemoteWatchService
Create a watch to the givenspace
- Specified by:
watchSpaceCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to add the watch for
-
isWatchingSpaceCompletionStage
public CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) - Specified by:
isWatchingSpaceCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the watcherspaceKey
- the key of the space to check- Returns:
- whether the user is watching the given
space
or not
-
unwatchSpaceCompletionStage
public CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Description copied from interface:RemoteWatchService
Remove a watch to the givenspace
- Specified by:
unwatchSpaceCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch for
-
watchContentCompletionStage
public CompletionStage<ContentWatch> watchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Description copied from interface:RemoteWatchService
Create a watch to the givencontent
- Specified by:
watchContentCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to add the watch for
-
unwatchContentCompletionStage
public CompletionStage<Void> unwatchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Description copied from interface:RemoteWatchService
Remove a watch to the givencontent
- Specified by:
unwatchContentCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to remove the watch for
-
isWatchingContentCompletionStage
public CompletionStage<Boolean> isWatchingContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) - Specified by:
isWatchingContentCompletionStage
in interfaceRemoteWatchService
- Parameters:
userKey
- the watchercontentId
- the content to check- Returns:
- whether the user is watching the given
content
or not
-
findUsersWatchingSpacePaginated
public CompletionStage<PageResponse<User>> findUsersWatchingSpacePaginated(String spaceKey, PageRequest pageRequest) Description copied from interface:RemoteWatchService
Returns a paginated list of Users watching the given Space identified by spaceKey. Only a Confluence Administrator or Space Administrator can perform this action.- Specified by:
findUsersWatchingSpacePaginated
in interfaceRemoteWatchService
- Parameters:
spaceKey
- the key of the Space the User is attempting to view.pageRequest
- the pagination parameters.- Returns:
- Users watching the given Space.
-
findUsersWatchingContentPaginated
public CompletionStage<PageResponse<User>> findUsersWatchingContentPaginated(ContentId contentId, PageRequest pageRequest) Description copied from interface:RemoteWatchService
Returns a paginated list of Users watching the given Content identified by contentId. Only a Confluence Administrator or Space Administrator can perform this action.- Specified by:
findUsersWatchingContentPaginated
in interfaceRemoteWatchService
- Parameters:
contentId
- the id of the Content the User is attempting to view.pageRequest
- the pagination parameters.- Returns:
- Users watching the given Content.
-