Interface RemoteWatchService

All Known Implementing Classes:
RemoteWatchServiceImpl

@ExperimentalApi public interface RemoteWatchService
WatchService implementation that communicates with Confluence remotely using the Confluence REST api.

Provides future returning equivalents for the methods in WatchService.

  • Method Details

    • watchSpaceCompletionStage

      CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
      Remove a watch to the blog posts in a given space
      Parameters:
      userKey - the key of the user to add as a watcher
      spaceKey - the key of the space to remove the watch for
      contentTypes - the content types in the space to remove the watch for
      Since:
      9.0
    • unwatchSpaceCompletionStage

      CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
      Parameters:
      userKey - the watcher
      spaceKey - the key of the space to check
      contentTypes - the content types in the space to check if watching is given
      Returns:
      whether the user is watching the given space or not
      Since:
      9.0
    • isWatchingSpaceCompletionStage

      CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
      Parameters:
      userKey - the watcher
      spaceKey - the key of the space to check
      contentType - the content type
      Returns:
      whether the user is watching the specific content type in the given space or not
      Since:
      9.0
    • watchSpaceCompletionStage

      CompletionStage<SpaceWatch> watchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
      Create a watch to the given space
      Parameters:
      userKey - the key of the user to add as a watcher
      spaceKey - the key of the space to add the watch for
      Since:
      9.0
    • unwatchSpaceCompletionStage

      CompletionStage<Void> unwatchSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
      Remove a watch to the given space
      Parameters:
      userKey - the key of the user to add as a watcher
      spaceKey - the key of the space to remove the watch for
      Since:
      9.0
    • isWatchingSpaceCompletionStage

      CompletionStage<Boolean> isWatchingSpaceCompletionStage(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
      Parameters:
      userKey - the watcher
      spaceKey - the key of the space to check
      Returns:
      whether the user is watching the given space or not
      Since:
      9.0
    • watchContentCompletionStage

      CompletionStage<ContentWatch> watchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
      Create a watch to the given content
      Parameters:
      userKey - the key of the user to add as a watcher
      contentId - the id of the content to add the watch for
      Since:
      9.0
    • unwatchContentCompletionStage

      CompletionStage<Void> unwatchContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
      Remove a watch to the given content
      Parameters:
      userKey - the key of the user to add as a watcher
      contentId - the id of the content to remove the watch for
      Since:
      9.0
    • isWatchingContentCompletionStage

      CompletionStage<Boolean> isWatchingContentCompletionStage(com.atlassian.sal.api.user.UserKey userKey, ContentId content)
      Parameters:
      userKey - the watcher
      content - the content to check
      Returns:
      whether the user is watching the given content or not
      Since:
      9.0
    • findUsersWatchingSpacePaginated

      CompletionStage<PageResponse<User>> findUsersWatchingSpacePaginated(String spaceKey, PageRequest pageRequest)
      Returns a paginated list of Users watching the given Space identified by spaceKey. Only a Confluence Administrator or Space Administrator can perform this action.
      Parameters:
      spaceKey - the key of the Space the User is attempting to view.
      pageRequest - the pagination parameters.
      Returns:
      Users watching the given Space.
      Since:
      9.0
    • findUsersWatchingContentPaginated

      CompletionStage<PageResponse<User>> findUsersWatchingContentPaginated(ContentId contentId, PageRequest pageRequest)
      Returns a paginated list of Users watching the given Content identified by contentId. Only a Confluence Administrator or Space Administrator can perform this action.
      Parameters:
      contentId - the id of the Content the User is attempting to view.
      pageRequest - the pagination parameters.
      Returns:
      Users watching the given Content.
      Since:
      9.0
    • validator

      Get the validator of the WatchService.
      Returns:
      a Validator that can be used to validate service requests.