@ExperimentalApi
public interface ContentDraftService
In shared drafts, the draftId and the contentId to create a draft will be the same. A draft is just a content with the status of draft.
In the legacy drafts, the draft may have a different id
Modifier and Type | Interface and Description |
---|---|
static class |
ContentDraftService.ConflictPolicy
The conflict resolution policy to apply when a conflict occurs.
|
static class |
ContentDraftService.DraftErrorCodes |
static interface |
ContentDraftService.DraftValidator
Validate the operations for a piece of content
|
Modifier and Type | Method and Description |
---|---|
void |
deleteDraft(ContentId contentId)
Deletes the draft for this content.
|
Content |
publishEditDraft(Content content,
ContentDraftService.ConflictPolicy conflictPolicy)
Update existing page/blog post that has an existing draft
|
Content |
publishNewDraft(Content content,
Expansion... expansions)
Publishes the draft.
|
ContentDraftService.DraftValidator |
validator() |
Content publishNewDraft(Content content, Expansion... expansions)
content:
- new content to be createdexpansions:
- An array list of properties to expand on the content.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 draftContent publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
content
- - page/blog post content, requires a valid content id of an existing draftconflictPolicy
- - the policy to apply on a conflict, either abort or automerge. No mergeable conflicts
will still return a 409 even if policy is automergeNotFoundException
- if the draft doesn't existServiceException
- if the updated content is missing
spacekey or typevoid deleteDraft(ContentId contentId)
contentId
- - id of the draft to deleteNotFoundException
- if a draft doesn't exist, or the user doesn't have permission to view itPermissionException
- if the user does not have permission to modify this draftContentDraftService.DraftValidator validator()
Copyright © 2003–2018 Atlassian. All rights reserved.