Interface RemoteContentDraftService

  • All Known Implementing Classes:
    RemoteContentDraftServiceImpl

    @ExperimentalApi
    public interface RemoteContentDraftService
    ContentDraftService implementation that communicates with Confluence remotely using the Confluence REST API.

    Provides future returning equivalents for the methods in ContentDraftService.

    • Method Detail

      • publishNewDraft

        @Deprecated
        default com.atlassian.util.concurrent.Promise<Content> publishNewDraft​(Content content,
                                                                               Expansion... expansions)
        Deprecated.
        Publishes the draft. This will change the status of the current draft to current.
        Parameters:
        content - new content to be created
        expansions - An array list of properties to expand on the content.
        Returns:
        the newly published content
        Throws:
        NotFoundException - if the draft doesn't exist or the user doesn't have permission to view it
        PermissionException - if the user does have permission to modify this draft
      • deleteDraft

        @Deprecated
        default com.atlassian.util.concurrent.Promise<Void> deleteDraft​(ContentId contentId)
        Deprecated.
        since 7.0.1. Use deleteDraftCompletionStage(ContentId) instead.
        Deletes the draft. In the case of shared drafts, the draft is not allowed to be deleted if there is a corresponding published page
        Parameters:
        contentId - id of the page/blogpost content
      • publishNewDraftCompletionStage

        CompletionStage<Content> publishNewDraftCompletionStage​(Content content,
                                                                Expansion... expansions)
        Publishes the draft. This will change the status of the current draft to current.
        Parameters:
        content - new content to be created
        expansions - An array list of properties to expand on the content.
        Returns:
        the newly published content
        Throws:
        NotFoundException - if the draft doesn't exist or the user doesn't have permission to view it
        PermissionException - if the user does have permission to modify this draft
        Since:
        7.0.1
      • publishEditDraftCompletionStage

        CompletionStage<Content> publishEditDraftCompletionStage​(Content content,
                                                                 ContentDraftService.ConflictPolicy conflictPolicy)
        Update content
        Parameters:
        content - page/blogpost content
        conflictPolicy - the policy to apply on a conflict, either abort or automerge. No mergeable conflicts will still return a 409 even if policy is automerge
        Returns:
        the updated content
        Throws:
        NotFoundException - if the draft doesn't exist
        ServiceException - if the updated content is missed spacekey or type
      • deleteDraftCompletionStage

        CompletionStage<Void> deleteDraftCompletionStage​(ContentId contentId)
        Deletes the draft. In the case of shared drafts, the draft is not allowed to be deleted if there is a corresponding published page
        Parameters:
        contentId - id of the page/blogpost content
        Since:
        7.0.1