Interface ContentValidator


  • public interface ContentValidator
    A validator for Content, called when Content is about to be created or modified.
    • Method Detail

      • supports

        default boolean supports​(ContentTypeName contentTypeName)
        Defines if this validator can validate the supplied content by content's type name. Default implementation returns true.
        Parameters:
        contentTypeName - content type name
        Returns:
        true if content's type name is supported, false otherwise
      • validate

        void validate​(ContentValidatorParams params,
                      ValidationErrors.Builder validationErrorsBuilder)
        Validate the supplied content by various parameters.
        Parameters:
        params - parameters containing information about the content to be validated
        validationErrorsBuilder - builder that accepts reported validation errors