Interface ContentDraftService.DraftValidator
-
- All Known Implementing Classes:
LegacyDraftValidator
- Enclosing interface:
- ContentDraftService
public static interface ContentDraftService.DraftValidatorValidate the operations for a piece of content
-
-
Method Summary
All Methods Instance Methods Abstract 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 contentId)Validates whether a draft can be deleted
-
-
-
Method Detail
-
validateContentForPageCreate
MergeValidationResult validateContentForPageCreate(Content content)
Validate the publish new draft operation. If the result is valid, calls to publishNewDraft will succeed.- Parameters:
content- the content to publish, requires a valid content id of an existing draft- Returns:
- the result of the validation
-
validateContentForPageUpdate
MergeValidationResult validateContentForPageUpdate(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Validate the publish edit draft operation. If the result is valid, calls to publishEditDraft will succeed.- 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
ValidationResult validateDelete(ContentId contentId)
Validates whether a draft can be deleted- Parameters:
contentId- content id of the draft to delete- Returns:
- the validation result
-
-