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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<Boolean>isWatchingContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)Deprecated.since 7.0.1.CompletionStage<Boolean>isWatchingContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)com.atlassian.util.concurrent.Promise<Boolean>isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<Boolean>isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)Deprecated.since 7.0.1.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)com.atlassian.util.concurrent.Promise<Void>unwatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)Deprecated.since 7.0.1.CompletionStage<Void>unwatchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)Remove a watch to the givencontentcom.atlassian.util.concurrent.Promise<Void>unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<Void>unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)Deprecated.since 7.0.1.CompletionStage<Void>unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)Remove a watch to the givenspaceCompletionStage<Void>unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)WatchService.Validatorvalidator()Get the validator of theWatchService.com.atlassian.util.concurrent.Promise<ContentWatch>watchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)Deprecated.since 7.0.1.CompletionStage<ContentWatch>watchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)Create a watch to the givencontentcom.atlassian.util.concurrent.Promise<SpaceWatch>watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<SpaceWatch>watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)Deprecated.since 7.0.1.CompletionStage<SpaceWatch>watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)Create a watch to the givenspaceCompletionStage<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, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, putCompletionStage, putFuture
-
-
-
-
Constructor Detail
-
RemoteWatchServiceImpl
public RemoteWatchServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
-
Method Detail
-
validator
public WatchService.Validator 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.
-
watchSpace
@Deprecated public com.atlassian.util.concurrent.Promise<SpaceWatch> watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Deprecated.since 7.0.1. UsewatchSpaceCompletionStage(UserKey, String, List)instead.Description copied from interface:RemoteWatchServiceRemove a watch to the blog posts in a givenspace- Specified by:
watchSpacein 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
-
unwatchSpace
@Deprecated public com.atlassian.util.concurrent.Promise<Void> unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Deprecated.since 7.0.1. UseunwatchSpaceCompletionStage(UserKey, String, List)instead.- Specified by:
unwatchSpacein 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
-
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
-
isWatchingSpace
@Deprecated public com.atlassian.util.concurrent.Promise<Boolean> isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
Deprecated.since 7.0.1. UseisWatchingSpaceCompletionStage(UserKey, String, ContentType)instead.- Specified by:
isWatchingSpacein 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
-
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
-
watchSpace
@Deprecated public com.atlassian.util.concurrent.Promise<SpaceWatch> watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Deprecated.since 7.0.1. UsewatchSpaceCompletionStage(UserKey, String)instead.Description copied from interface:RemoteWatchServiceCreate a watch to the givenspace- Specified by:
watchSpacein interfaceRemoteWatchService- Parameters:
userKey- the key of the user to add as a watcherspaceKey- the key of the space to add the watch for
-
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
-
isWatchingSpace
@Deprecated public com.atlassian.util.concurrent.Promise<Boolean> isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Deprecated.since 7.0.1. UseisWatchingSpaceCompletionStage(UserKey, String)instead.- Specified by:
isWatchingSpacein interfaceRemoteWatchService- Parameters:
userKey- the watcherspaceKey- the key of the space to check- Returns:
- whether the user is watching the given
spaceor not
-
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
-
unwatchSpace
@Deprecated public com.atlassian.util.concurrent.Promise<Void> unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Deprecated.since 7.0.1. UseunwatchSpaceCompletionStage(UserKey, String)instead.Description copied from interface:RemoteWatchServiceRemove a watch to the givenspace- Specified by:
unwatchSpacein interfaceRemoteWatchService- Parameters:
userKey- the key of the user to add as a watcherspaceKey- the key of the space to remove the watch for
-
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
-
watchContent
@Deprecated public com.atlassian.util.concurrent.Promise<ContentWatch> watchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Deprecated.since 7.0.1. UsewatchContentCompletionStage(UserKey, ContentId)instead.Description copied from interface:RemoteWatchServiceCreate a watch to the givencontent- Specified by:
watchContentin interfaceRemoteWatchService- Parameters:
userKey- the key of the user to add as a watchercontentId- the id of the content to add the watch for
-
unwatchContent
@Deprecated public com.atlassian.util.concurrent.Promise<Void> unwatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Deprecated.since 7.0.1. UseunwatchContentCompletionStage(UserKey, ContentId)instead.Description copied from interface:RemoteWatchServiceRemove a watch to the givencontent- Specified by:
unwatchContentin interfaceRemoteWatchService- Parameters:
userKey- the key of the user to add as a watchercontentId- the id of the content 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
-
isWatchingContent
@Deprecated public com.atlassian.util.concurrent.Promise<Boolean> isWatchingContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Deprecated.since 7.0.1. UseisWatchingContentCompletionStage(UserKey, ContentId)instead.- Specified by:
isWatchingContentin interfaceRemoteWatchService- Parameters:
userKey- the watchercontentId- the content to check- Returns:
- whether the user is watching the given
contentor not
-
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
-
-