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 givencontent
com.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 givenspace
CompletionStage<Void>
unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
WatchService.Validator
validator()
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 givencontent
com.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 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, 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:RemoteWatchService
Get the validator of theWatchService
.- Specified by:
validator
in 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:RemoteWatchService
Remove a watch to the blog posts in a givenspace
- Specified by:
watchSpace
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
-
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:
unwatchSpace
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
-
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
-
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:
isWatchingSpace
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
-
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
-
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:RemoteWatchService
Create a watch to the givenspace
- Specified by:
watchSpace
in 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: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
-
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:
isWatchingSpace
in interfaceRemoteWatchService
- Parameters:
userKey
- the watcherspaceKey
- the key of the space to check- 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)
- 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
-
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:RemoteWatchService
Remove a watch to the givenspace
- Specified by:
unwatchSpace
in 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: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
-
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:RemoteWatchService
Create a watch to the givencontent
- Specified by:
watchContent
in 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:RemoteWatchService
Remove a watch to the givencontent
- Specified by:
unwatchContent
in 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: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
-
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:
isWatchingContent
in interfaceRemoteWatchService
- Parameters:
userKey
- the watchercontentId
- the content to check- Returns:
- whether the user is watching the given
content
or not
-
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
-
-