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 MergeValidationResultvalidateContentForPageCreate(Content content)Validate the publish new draft operation.MergeValidationResultvalidateContentForPageUpdate(Content content, ContentDraftService.ConflictPolicy conflictPolicy)Validate the publish edit draft operation.ValidationResultvalidateDelete(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.DraftValidatorValidate the publish new draft operation. If the result is valid, calls to publishNewDraft will succeed.- Specified by:
validateContentForPageCreatein 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.DraftValidatorValidate the publish edit draft operation. If the result is valid, calls to publishEditDraft will succeed.- Specified by:
validateContentForPageUpdatein 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.DraftValidatorValidates whether a draft can be deleted- Specified by:
validateDeletein interfaceContentDraftService.DraftValidator- Parameters:
draftId- content id of the draft to delete- Returns:
- the validation result
-
-