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
Constructors Constructor Description RemoteWatchServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8RemoteWatchServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Boolean>
isWatchingContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
CompletionStage<Boolean>
isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
CompletionStage<Boolean>
isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
CompletionStage<Void>
unwatchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Remove a watch to the givencontent
CompletionStage<Void>
unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Remove a watch to the givenspace
CompletionStage<Void>
unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
WatchService.Validator
validator()
Get the validator of theWatchService
.CompletionStage<ContentWatch>
watchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Create a watch to the givencontent
CompletionStage<SpaceWatch>
watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Create a watch to the givenspace
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
-
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, deleteFuture, deleteFuture, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFutureOptional, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.rest.client.RemoteWatchService
isWatchingContent, isWatchingSpace, isWatchingSpace, unwatchContent, unwatchSpace, unwatchSpace, watchContent, watchSpace, watchSpace
-
-
-
-
Constructor Detail
-
RemoteWatchServiceImpl
public RemoteWatchServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor)
- Since:
- 8.8
-
RemoteWatchServiceImpl
@Deprecated public RemoteWatchServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8
-
-
Method Detail
-
validator
public WatchService.Validator 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
-
-