public abstract class BaseJsonValidator extends Object implements JsonValidator
Modifier and Type | Field and Description |
---|---|
protected SchemaValidatorsConfig |
config
SchemaValidatorsConfig can only get and set in validationContext
|
protected boolean |
failFast |
protected static ThreadLocal<ValidatorState> |
validatorState
ThreadLocal to allow to pass state in recursive validator calls
|
AT_ROOT
Constructor and Description |
---|
BaseJsonValidator(String schemaPath,
com.fasterxml.jackson.databind.JsonNode schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType,
boolean suppressSubSchemaRetrieval,
boolean failFast) |
BaseJsonValidator(String schemaPath,
com.fasterxml.jackson.databind.JsonNode schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType,
ValidationContext validationContext) |
Modifier and Type | Method and Description |
---|---|
protected ValidationMessage |
buildValidationMessage(String at,
String... arguments) |
protected void |
debug(org.slf4j.Logger logger,
com.fasterxml.jackson.databind.JsonNode node,
com.fasterxml.jackson.databind.JsonNode rootNode,
String at) |
protected boolean |
equals(double n1,
double n2) |
protected JsonSchema |
fetchSubSchemaNode(ValidationContext validationContext) |
protected String |
getNodeFieldType() |
protected JsonSchema |
getParentSchema() |
com.fasterxml.jackson.databind.JsonNode |
getSchemaNode() |
protected String |
getSchemaPath() |
protected ValidatorTypeCode |
getValidatorType() |
protected boolean |
greaterThan(double n1,
double n2) |
protected boolean |
lessThan(double n1,
double n2) |
protected void |
parseErrorCode(String errorCodeKey) |
Set<ValidationMessage> |
validate(com.fasterxml.jackson.databind.JsonNode node)
Validate the given root JsonNode, starting at the root of the data path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
protected SchemaValidatorsConfig config
protected final boolean failFast
protected static final ThreadLocal<ValidatorState> validatorState
public BaseJsonValidator(String schemaPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType, ValidationContext validationContext)
public BaseJsonValidator(String schemaPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType, boolean suppressSubSchemaRetrieval, boolean failFast)
protected String getSchemaPath()
public com.fasterxml.jackson.databind.JsonNode getSchemaNode()
protected JsonSchema getParentSchema()
protected JsonSchema fetchSubSchemaNode(ValidationContext validationContext)
public Set<ValidationMessage> validate(com.fasterxml.jackson.databind.JsonNode node)
JsonValidator
validate
in interface JsonValidator
node
- JsonNodeprotected boolean equals(double n1, double n2)
protected boolean greaterThan(double n1, double n2)
protected boolean lessThan(double n1, double n2)
protected void parseErrorCode(String errorCodeKey)
protected ValidationMessage buildValidationMessage(String at, String... arguments)
protected void debug(org.slf4j.Logger logger, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, String at)
protected ValidatorTypeCode getValidatorType()
protected String getNodeFieldType()
Copyright © 2020. All rights reserved.