Class ValidatorEngine


  • public class ValidatorEngine
    extends java.lang.Object
    DSL Validator from a Schema. WARNING: not thread safe. (note: Schema is thread safe)
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidatorEngine​(Schema schema)
      Initialize a JSON Validation (used primarily for the DSL)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void popContext()  
      protected void pushContext​(java.lang.Object name)  
      protected void reportError​(Format propertyFormat, com.fasterxml.jackson.databind.JsonNode node, ValidationErrorMessage.Code code, java.lang.String message)  
      void validate​(com.fasterxml.jackson.databind.JsonNode document, java.lang.String root)  
      protected void validate​(Format propertyFormat, com.fasterxml.jackson.databind.JsonNode node, java.util.function.Consumer<java.lang.String> fieldReport)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ValidatorEngine

        public ValidatorEngine​(Schema schema)
        Initialize a JSON Validation (used primarily for the DSL)
        Parameters:
        schema - The Schema describing the DSL
    • Method Detail

      • validate

        public void validate​(com.fasterxml.jackson.databind.JsonNode document,
                             java.lang.String root)
                      throws java.lang.IllegalArgumentException,
                             ValidationException
        Throws:
        java.lang.IllegalArgumentException
        ValidationException
      • validate

        protected void validate​(Format propertyFormat,
                                com.fasterxml.jackson.databind.JsonNode node,
                                java.util.function.Consumer<java.lang.String> fieldReport)
      • pushContext

        protected void pushContext​(java.lang.Object name)
      • popContext

        protected void popContext()
      • reportError

        protected void reportError​(Format propertyFormat,
                                   com.fasterxml.jackson.databind.JsonNode node,
                                   ValidationErrorMessage.Code code,
                                   java.lang.String message)