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 givencontentunwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Remove a watch to the givenspaceunwatchSpaceCompletionStage(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 givencontentwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Create a watch to the givenspacewatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes) Remove a watch to the blog posts in a givenspaceMethods 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:RemoteWatchServiceGet the validator of theWatchService.- Specified by:
validatorin 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:RemoteWatchServiceRemove a watch to the blog posts in a givenspace- Specified by:
watchSpaceCompletionStagein 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:
unwatchSpaceCompletionStagein 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
spaceor not
-
isWatchingSpaceCompletionStage
public CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType) - Specified by:
isWatchingSpaceCompletionStagein 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
spaceor not
-
watchSpaceCompletionStage
public CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Description copied from interface:RemoteWatchServiceCreate a watch to the givenspace- Specified by:
watchSpaceCompletionStagein 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:
isWatchingSpaceCompletionStagein interfaceRemoteWatchService- Parameters:
userKey- the watcherspaceKey- the key of the space to check- Returns:
- whether the user is watching the given
spaceor not
-
unwatchSpaceCompletionStage
public CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Description copied from interface:RemoteWatchServiceRemove a watch to the givenspace- Specified by:
unwatchSpaceCompletionStagein 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:RemoteWatchServiceCreate a watch to the givencontent- Specified by:
watchContentCompletionStagein 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:RemoteWatchServiceRemove a watch to the givencontent- Specified by:
unwatchContentCompletionStagein 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:
isWatchingContentCompletionStagein interfaceRemoteWatchService- Parameters:
userKey- the watchercontentId- the content to check- Returns:
- whether the user is watching the given
contentor not
-
findUsersWatchingSpacePaginated
public CompletionStage<PageResponse<User>> findUsersWatchingSpacePaginated(String spaceKey, PageRequest pageRequest) Description copied from interface:RemoteWatchServiceReturns 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:
findUsersWatchingSpacePaginatedin 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:RemoteWatchServiceReturns 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:
findUsersWatchingContentPaginatedin interfaceRemoteWatchService- Parameters:
contentId- the id of the Content the User is attempting to view.pageRequest- the pagination parameters.- Returns:
- Users watching the given Content.
-