Class SharedContentDraftServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.draft.SharedContentDraftServiceImpl
-
- All Implemented Interfaces:
ContentDraftService
public class SharedContentDraftServiceImpl 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 SharedContentDraftServiceImpl(ContentService contentService, ContentEntityManagerInternal contentEntityManager, ContentPermissionManager contentPermissionManager, RelatableResolver relatableResolver, PageManager pageManager, com.atlassian.event.api.EventPublisher eventPublisher, RelationService relationService, RelationManager relationManager, AccessModeService accessModeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
deleteDraft(ContentId contentId)
Deletes the draft for this content.Content
publishEditDraft(Content updatedContent, ContentDraftService.ConflictPolicy conflictPolicy)
Update existing page/blog post that has an existing draftContent
publishNewDraft(Content content, Expansion... expansions)
Deprecated.since 5.9 - we use the same method for publishing drafts for new pages and for page editscom.atlassian.confluence.api.impl.service.content.draft.SharedContentDraftServiceImpl.DraftValidatorImpl
validator()
-
-
-
Constructor Detail
-
SharedContentDraftServiceImpl
public SharedContentDraftServiceImpl(ContentService contentService, ContentEntityManagerInternal contentEntityManager, ContentPermissionManager contentPermissionManager, RelatableResolver relatableResolver, PageManager pageManager, com.atlassian.event.api.EventPublisher eventPublisher, RelationService relationService, RelationManager relationManager, AccessModeService accessModeService)
-
-
Method Detail
-
publishNewDraft
@Deprecated public Content publishNewDraft(Content content, Expansion... expansions) throws ServiceException
Deprecated.since 5.9 - we use the same method for publishing drafts for new pages and for page editsTODO SHARED-DRAFTS: For shared drafts we never publish new drafts Content draft service interface will be reworked to remove this method- 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
- 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 draftServiceException
-
publishEditDraft
public Content publishEditDraft(Content updatedContent, ContentDraftService.ConflictPolicy conflictPolicy)
Description copied from interface:ContentDraftService
Update existing page/blog post that has an existing draft- Specified by:
publishEditDraft
in interfaceContentDraftService
- Parameters:
updatedContent
- 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 com.atlassian.confluence.api.impl.service.content.draft.SharedContentDraftServiceImpl.DraftValidatorImpl validator()
- Specified by:
validator
in interfaceContentDraftService
-
-