Class ValidationMessageHandler

  • Direct Known Subclasses:
    BaseJsonValidator

    public abstract class ValidationMessageHandler
    extends Object
    Validation message handler.
    • Constructor Detail

      • ValidationMessageHandler

        protected ValidationMessageHandler​(ErrorMessageType errorMessageType,
                                           String errorMessageKeyword,
                                           MessageSource messageSource,
                                           Keyword keyword,
                                           JsonSchema parentSchema,
                                           SchemaLocation schemaLocation,
                                           JsonNodePath evaluationPath,
                                           JsonSchema evaluationParentSchema,
                                           Map<String,​String> errorMessage)
        Constructor to create a copy using fields.
        Parameters:
        errorMessageType - the error message type
        errorMessageKeyword - the error message keyword
        messageSource - the message source
        keyword - the keyword
        parentSchema - the parent schema
        schemaLocation - the schema location
        evaluationPath - the evaluation path
        evaluationParentSchema - the evaluation parent schema
        errorMessage - the error message
    • Method Detail

      • getErrorMessage

        protected Map<String,​String> getErrorMessage​(String errorMessageKeyword,
                                                           com.fasterxml.jackson.databind.JsonNode schemaNode,
                                                           String keyword)
        Gets the custom error message to use.
        Parameters:
        errorMessageKeyword - the error message keyword
        schemaNode - the schema node
        keyword - the keyword
        Returns:
        the custom error message
      • getMessageNode

        protected com.fasterxml.jackson.databind.JsonNode getMessageNode​(String errorMessageKeyword,
                                                                         com.fasterxml.jackson.databind.JsonNode schemaNode,
                                                                         JsonSchema parentSchema,
                                                                         String pname)
      • getErrorCodeKey

        protected String getErrorCodeKey​(String keyword)