Interface RemoteContentService

All Known Implementing Classes:
AbstractRemoteContentService, GraphQLRemoteContentServiceImpl, RemoteContentServiceImpl

@ExperimentalApi public interface RemoteContentService
ContentService implementation that communicates with Confluence remotely using the Confluence REST API.

Provides future returning equivalents for the methods in ContentService.

  • Method Details

    • find

      Create a content finder to retrieve content from the remote server
      Returns:
      the content, if one exists matching the id, or none otherwise.
    • createCompletionStage

      CompletionStage<Content> createCompletionStage(Content newContent)
      Create a piece of content.

      Valid ContentRepresentations for the ContentBody can be found in the documentation on the ContentBodyConversionService.

      Parameters:
      newContent - the content to create
      Returns:
      the content created
      Throws:
      ServiceException - if the content cannot be created
      Since:
      9.0
    • createCompletionStage

      CompletionStage<Content> createCompletionStage(Content newContent, Expansion... expansions) throws ServiceException
      Create a piece of content.

      Valid ContentRepresentations for the ContentBody can be found in the documentation on the ContentBodyConversionService.

      Parameters:
      newContent - the content to create
      expansions - the particular expansions will be applied to the new created content
      Returns:
      the content created
      Throws:
      ServiceException - if the content cannot be created
      Since:
      9.0
    • updateCompletionStage

      CompletionStage<Content> updateCompletionStage(Content content)
      Updates a piece of content.

      Valid ContentRepresentations for the ContentBody can be found in the documentation on the ContentBodyConversionService.

      Parameters:
      content - the updated Content with metadata about the change
      Returns:
      the updated content after being persisted
      Since:
      9.0
    • trashCompletionStage

      CompletionStage<Content> trashCompletionStage(Content content)
      Trash a piece of content.

      The #delete(Content) method should be used for content that doesn't support trashing. Currently Pages and Blogposts support trashing.

      Parameters:
      content - the content to be trashed
      Returns:
      the content after being trashed
      Since:
      9.0
    • restoreCompletionStage

      CompletionStage<Content> restoreCompletionStage(Content content)
      Restore a trashed piece of content.
      Parameters:
      content - the content to be restored
      Returns:
      the content after being restored
      Since:
      9.0
    • purgeCompletionStage

      CompletionStage<Void> purgeCompletionStage(Content content)
      Permanently delete a trashed piece of content.
      Parameters:
      content - the content to be purged
      Since:
      9.0
    • deleteCompletionStage

      CompletionStage<Void> deleteCompletionStage(Content content)
      Removes an item of Content from the system.
      Parameters:
      content - if of the content to remove
      Throws:
      ServiceException - if the content cannot be found, or cannot be deleted
      Since:
      9.0
    • getChildrenCompletionStage

      CompletionStage<PageResponse<Content>> getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansion)
      Retrieve the children of an item of Content.

      Children will be Content items of the same type as the parent.

      The pageRequest limit is restricted to a maximum page size.

      Parameters:
      parent - - the content to retrieve the children for
      pageRequest - - a pageRequest indicating how much content to retrieve.
      Returns:
      a partial list of the top level content in this space.
      Since:
      9.0