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 Details

    • 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 publish
      conflictPolicy - 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