Class LegacyDraftValidator
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.draft.LegacyDraftValidator
-
- All Implemented Interfaces:
ContentDraftService.DraftValidator
public class LegacyDraftValidator extends Object implements ContentDraftService.DraftValidator
-
-
Constructor Summary
Constructors Constructor Description LegacyDraftValidator(ContentService contentService, DraftManager draftManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ContentDraftManagerInternal contentDraftManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MergeValidationResult
validateContentForPageCreate(Content content)
Validate the publish new draft operation.MergeValidationResult
validateContentForPageUpdate(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Validate the publish edit draft operation.ValidationResult
validateDelete(ContentId draftId)
Validates whether a draft can be deleted
-
-
-
Constructor Detail
-
LegacyDraftValidator
public LegacyDraftValidator(ContentService contentService, DraftManager draftManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ContentDraftManagerInternal contentDraftManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
-
-
Method Detail
-
validateContentForPageCreate
public MergeValidationResult validateContentForPageCreate(Content content)
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
public ValidationResult validateDelete(ContentId draftId)
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
-
-