Package com.networknt.schema
Class ValidationMessage.BuilderSupport<S>
- java.lang.Object
-
- com.networknt.schema.ValidationMessage.BuilderSupport<S>
-
- Direct Known Subclasses:
MessageSourceValidationMessage.BuilderSupport
,ValidationMessage.Builder
- Enclosing class:
- ValidationMessage
public abstract static class ValidationMessage.BuilderSupport<S> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Object[]
arguments
protected String
code
protected Map<String,Object>
details
protected JsonNodePath
evaluationPath
protected MessageFormat
format
protected JsonNodePath
instanceLocation
protected com.fasterxml.jackson.databind.JsonNode
instanceNode
protected String
message
protected MessageFormatter
messageFormatter
protected String
messageKey
protected Supplier<String>
messageSupplier
protected String
property
protected SchemaLocation
schemaLocation
protected com.fasterxml.jackson.databind.JsonNode
schemaNode
protected String
type
-
Constructor Summary
Constructors Constructor Description BuilderSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description S
arguments(Object... arguments)
ValidationMessage
build()
S
code(String code)
S
customMessage(String message)
Deprecated.S
details(Map<String,Object> details)
S
evaluationPath(JsonNodePath evaluationPath)
The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.S
format(MessageFormat format)
protected Object[]
getArguments()
protected String
getCode()
protected Map<String,Object>
getDetails()
protected JsonNodePath
getEvaluationPath()
protected MessageFormat
getFormat()
protected JsonNodePath
getInstanceLocation()
protected String
getMessage()
protected Object[]
getMessageArguments()
protected MessageFormatter
getMessageFormatter()
protected String
getMessageKey()
protected Supplier<String>
getMessageSupplier()
protected String
getProperty()
protected SchemaLocation
getSchemaLocation()
protected String
getType()
S
instanceLocation(JsonNodePath instanceLocation)
The instance location is the location of the JSON value within the root instance being validated.S
instanceNode(com.fasterxml.jackson.databind.JsonNode instanceNode)
S
message(String message)
Explicitly sets the message pattern to be used.S
messageFormatter(MessageFormatter messageFormatter)
S
messageKey(String messageKey)
S
messageSupplier(Supplier<String> messageSupplier)
S
property(String property)
S
schemaLocation(SchemaLocation schemaLocation)
The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result.S
schemaNode(com.fasterxml.jackson.databind.JsonNode schemaNode)
abstract S
self()
S
type(String type)
-
-
-
Field Detail
-
type
protected String type
-
code
protected String code
-
evaluationPath
protected JsonNodePath evaluationPath
-
schemaLocation
protected SchemaLocation schemaLocation
-
instanceLocation
protected JsonNodePath instanceLocation
-
property
protected String property
-
arguments
protected Object[] arguments
-
format
protected MessageFormat format
-
message
protected String message
-
messageFormatter
protected MessageFormatter messageFormatter
-
messageKey
protected String messageKey
-
instanceNode
protected com.fasterxml.jackson.databind.JsonNode instanceNode
-
schemaNode
protected com.fasterxml.jackson.databind.JsonNode schemaNode
-
-
Method Detail
-
self
public abstract S self()
-
instanceLocation
public S instanceLocation(JsonNodePath instanceLocation)
The instance location is the location of the JSON value within the root instance being validated.- Parameters:
instanceLocation
- the instance location- Returns:
- the builder
-
schemaLocation
public S schemaLocation(SchemaLocation schemaLocation)
The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result. In contrast with the evaluation path, the schema location MUST NOT include by-reference applicators such as $ref or $dynamicRef.- Parameters:
schemaLocation
- the schema location- Returns:
- the builder
-
evaluationPath
public S evaluationPath(JsonNodePath evaluationPath)
The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.- Parameters:
evaluationPath
- the evaluation path- Returns:
- the builder
-
format
public S format(MessageFormat format)
-
customMessage
@Deprecated public S customMessage(String message)
Deprecated.
-
message
public S message(String message)
Explicitly sets the message pattern to be used.If set the message supplier and message formatter will be ignored.
- Parameters:
message
- the message pattern- Returns:
- the builder
-
messageFormatter
public S messageFormatter(MessageFormatter messageFormatter)
-
instanceNode
public S instanceNode(com.fasterxml.jackson.databind.JsonNode instanceNode)
-
schemaNode
public S schemaNode(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
build
public ValidationMessage build()
-
getMessageArguments
protected Object[] getMessageArguments()
-
getType
protected String getType()
-
getCode
protected String getCode()
-
getEvaluationPath
protected JsonNodePath getEvaluationPath()
-
getSchemaLocation
protected SchemaLocation getSchemaLocation()
-
getInstanceLocation
protected JsonNodePath getInstanceLocation()
-
getProperty
protected String getProperty()
-
getArguments
protected Object[] getArguments()
-
getFormat
protected MessageFormat getFormat()
-
getMessage
protected String getMessage()
-
getMessageFormatter
protected MessageFormatter getMessageFormatter()
-
getMessageKey
protected String getMessageKey()
-
-