public abstract class BaseJsonValidator extends Object implements JsonValidator
| 限定符和类型 | 字段和说明 |
|---|---|
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| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, waitvalidateprotected 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)
JsonValidatorvalidate 在接口中 JsonValidatornode - 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 © 2023. All rights reserved.