Class ContentDraftServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.draft.ContentDraftServiceImpl
-
- All Implemented Interfaces:
ContentDraftService
public class ContentDraftServiceImpl extends Object implements ContentDraftService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.ContentDraftService
ContentDraftService.ConflictPolicy, ContentDraftService.DraftErrorCodes, ContentDraftService.DraftValidator
-
-
Constructor Summary
Constructors Constructor Description ContentDraftServiceImpl(ContentDraftService legacyContentDraftServiceImpl, ContentDraftService sharedContentDraftServiceImpl, CollaborativeEditingHelper collaborativeEditingHelper, ContentEntityManager contentEntityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 draftContent
publishNewDraft(Content content, Expansion... expansions)
Publishes the draft.ContentDraftService.DraftValidator
validator()
-
-
-
Constructor Detail
-
ContentDraftServiceImpl
public ContentDraftServiceImpl(ContentDraftService legacyContentDraftServiceImpl, ContentDraftService sharedContentDraftServiceImpl, CollaborativeEditingHelper collaborativeEditingHelper, ContentEntityManager contentEntityManager)
-
-
Method Detail
-
publishNewDraft
public Content publishNewDraft(Content content, Expansion... expansions)
Description copied from interface:ContentDraftService
Publishes the draft. This will change the status of the current draft to current.- Specified by:
publishNewDraft
in interfaceContentDraftService
- Parameters:
content
- new content to be createdexpansions
- An array list of properties to expand on the content.- Returns:
- the newly published content
-
publishEditDraft
public Content publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Description copied from interface:ContentDraftService
Update existing page/blog post that has an existing draft- Specified by:
publishEditDraft
in interfaceContentDraftService
- Parameters:
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 automerge- Returns:
- the updated content
-
deleteDraft
public void deleteDraft(ContentId contentId)
Description copied from interface:ContentDraftService
Deletes the draft for this content. In the case of shared drafts, only drafts which have never been published can be deleted- Specified by:
deleteDraft
in interfaceContentDraftService
- Parameters:
contentId
- id of the draft to delete
-
validator
public ContentDraftService.DraftValidator validator()
- Specified by:
validator
in interfaceContentDraftService
-
-