Class LegacyDraftValidator
java.lang.Object
com.atlassian.confluence.api.impl.service.content.draft.LegacyDraftValidator
- All Implemented Interfaces:
ContentDraftService.DraftValidator
-
Constructor Summary
ConstructorDescriptionLegacyDraftValidator
(ContentService contentService, DraftManager draftManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ContentDraftManagerInternal contentDraftManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate) -
Method Summary
Modifier and TypeMethodDescriptionvalidateContentForPageCreate
(Content content) Validate the publish new draft operation.validateContentForPageUpdate
(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Validate the publish edit draft operation.validateDelete
(ContentId draftId) Validates whether a draft can be deleted
-
Constructor Details
-
LegacyDraftValidator
public LegacyDraftValidator(ContentService contentService, DraftManager draftManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ContentDraftManagerInternal contentDraftManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
-
-
Method Details
-
validateContentForPageCreate
Description copied from interface:ContentDraftService.DraftValidator
Validate the publish new draft operation. If the result is valid, calls to publishNewDraft will succeed.- Specified by:
validateContentForPageCreate
in interfaceContentDraftService.DraftValidator
- Parameters:
content
- the content to publish, requires a valid content id of an existing draft- Returns:
- the result of the validation
-
validateContentForPageUpdate
public MergeValidationResult validateContentForPageUpdate(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Description copied from interface:ContentDraftService.DraftValidator
Validate the publish edit draft operation. If the result is valid, calls to publishEditDraft will succeed.- Specified by:
validateContentForPageUpdate
in interfaceContentDraftService.DraftValidator
- Parameters:
content
- the content to publishconflictPolicy
- the policy to apply if a conflict occurs between the content being updated and the existing version- Returns:
- the result of the validation
-
validateDelete
Description copied from interface:ContentDraftService.DraftValidator
Validates whether a draft can be deleted- Specified by:
validateDelete
in interfaceContentDraftService.DraftValidator
- Parameters:
draftId
- content id of the draft to delete- Returns:
- the validation result
-