Interface ContentDraftService.DraftValidator
- All Known Implementing Classes:
LegacyDraftValidator
- Enclosing interface:
- ContentDraftService
public static interface ContentDraftService.DraftValidator
Validate the operations for a piece of content
-
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 contentId) Validates whether a draft can be deleted
-
Method Details
-
validateContentForPageCreate
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
Validates whether a draft can be deleted- Parameters:
contentId
- content id of the draft to delete- Returns:
- the validation result
-