Class ValidatorEngine
- java.lang.Object
-
- fr.gouv.vitam.common.dsl.schema.meta.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)
-
-
-
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)
-
-