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 Summary
Modifier and TypeMethodDescriptiondeleteDraftCompletionStage
(ContentId contentId) Deletes the draft.publishEditDraftCompletionStage
(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Update contentpublishNewDraftCompletionStage
(Content content, Expansion... expansions) Publishes the draft.
-
Method Details
-
publishNewDraftCompletionStage
Publishes the draft. This will change the status of the current draft to current.- Parameters:
content
- new content to be createdexpansions
- 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 itPermissionException
- if the user does have permission to modify this draft- Since:
- 9.0
-
publishEditDraftCompletionStage
CompletionStage<Content> publishEditDraftCompletionStage(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Update content- Parameters:
content
- page/blogpost contentconflictPolicy
- 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 existServiceException
- if the updated content is missed spacekey or type
-
deleteDraftCompletionStage
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:
- 9.0
-