Interface RemoteContentTrashService

All Known Implementing Classes:
RemoteContentTrashServiceImpl

@ExperimentalApi public interface RemoteContentTrashService
ContentTrashService implementation that communicates with Confluence remotely using the Confluence REST API.

Provides Promise-returning equivalents for the methods in ContentTrashService.

  • Method Details

    • trashCompletionStage

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

      The purgeCompletionStage(Content) method can be used for content that doesn't support trashing. Currently, only content with types ContentType.PAGE and ContentType.BLOG_POST 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 piece of content.

      There are two main cases:

      • Trashable content (e.g. Pages, BlogPosts) must have status "trashed" to be purged.
      • Non-trashable content (e.g. Comments, Attachment) can be purged with status "current".
      Parameters:
      content - the content to be purged
      Since:
      9.0
    • getTrashContentsCompletionStage

      CompletionStage<PageResponse<Content>> getTrashContentsCompletionStage(Space space, LimitedRequest limitedRequest, Expansion... expansions)
      Parameters:
      space - the space where the trash contents belong to
      limitedRequest - the pagination request, with a cursor which is an identifier to skip results from a previous query when paginating and limit for the result
      expansions - the optional properties to expand on the result
      Returns:
      the contents of the trash, up to the request limit
      Since:
      9.0