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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<Void>
deleteDraft(ContentId contentId)
Deprecated.since 7.0.1.CompletionStage<Void>
deleteDraftCompletionStage(ContentId contentId)
Deletes the draft.com.atlassian.util.concurrent.Promise<Content>
publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Deprecated.since 7.0.1.CompletionStage<Content>
publishEditDraftCompletionStage(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Update contentcom.atlassian.util.concurrent.Promise<Content>
publishNewDraft(Content content, Expansion... expansions)
Deprecated.since 7.0.1.CompletionStage<Content>
publishNewDraftCompletionStage(Content content, Expansion... expansions)
Publishes the draft.
-
-
-
Method Detail
-
publishNewDraft
@Deprecated com.atlassian.util.concurrent.Promise<Content> publishNewDraft(Content content, Expansion... expansions)
Deprecated.since 7.0.1. UsepublishNewDraftCompletionStage(Content, Expansion...)
instead.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
-
publishEditDraft
@Deprecated com.atlassian.util.concurrent.Promise<Content> publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Deprecated.since 7.0.1. UsepublishEditDraftCompletionStage(Content, ContentDraftService.ConflictPolicy)
instead.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
-
deleteDraft
@Deprecated com.atlassian.util.concurrent.Promise<Void> deleteDraft(ContentId contentId)
Deprecated.since 7.0.1. UsedeleteDraftCompletionStage(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 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:
- 7.0.1
-
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
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
-
-