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 java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]
arguments
protected java.lang.String
code
protected java.util.Map<java.lang.String,java.lang.Object>
details
protected JsonNodePath
evaluationPath
protected java.text.MessageFormat
format
protected JsonNodePath
instanceLocation
protected com.fasterxml.jackson.databind.JsonNode
instanceNode
protected java.lang.String
message
protected MessageFormatter
messageFormatter
protected java.lang.String
messageKey
protected java.util.function.Supplier<java.lang.String>
messageSupplier
protected java.lang.String
property
protected SchemaLocation
schemaLocation
protected com.fasterxml.jackson.databind.JsonNode
schemaNode
protected java.lang.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(java.lang.Object... arguments)
ValidationMessage
build()
S
code(java.lang.String code)
S
customMessage(java.lang.String message)
Deprecated.S
details(java.util.Map<java.lang.String,java.lang.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(java.text.MessageFormat format)
protected java.lang.Object[]
getArguments()
protected java.lang.String
getCode()
protected java.util.Map<java.lang.String,java.lang.Object>
getDetails()
protected JsonNodePath
getEvaluationPath()
protected java.text.MessageFormat
getFormat()
protected JsonNodePath
getInstanceLocation()
protected java.lang.String
getMessage()
protected java.lang.Object[]
getMessageArguments()
protected MessageFormatter
getMessageFormatter()
protected java.lang.String
getMessageKey()
protected java.util.function.Supplier<java.lang.String>
getMessageSupplier()
protected java.lang.String
getProperty()
protected SchemaLocation
getSchemaLocation()
protected java.lang.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(java.lang.String message)
Explicitly sets the message pattern to be used.S
messageFormatter(MessageFormatter messageFormatter)
S
messageKey(java.lang.String messageKey)
S
messageSupplier(java.util.function.Supplier<java.lang.String> messageSupplier)
S
property(java.lang.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(java.lang.String type)
-
-
-
Field Detail
-
type
protected java.lang.String type
-
code
protected java.lang.String code
-
evaluationPath
protected JsonNodePath evaluationPath
-
schemaLocation
protected SchemaLocation schemaLocation
-
instanceLocation
protected JsonNodePath instanceLocation
-
property
protected java.lang.String property
-
arguments
protected java.lang.Object[] arguments
-
details
protected java.util.Map<java.lang.String,java.lang.Object> details
-
format
protected java.text.MessageFormat format
-
message
protected java.lang.String message
-
messageSupplier
protected java.util.function.Supplier<java.lang.String> messageSupplier
-
messageFormatter
protected MessageFormatter messageFormatter
-
messageKey
protected java.lang.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()
-
type
public S type(java.lang.String type)
-
code
public S code(java.lang.String code)
-
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
-
property
public S property(java.lang.String property)
-
arguments
public S arguments(java.lang.Object... arguments)
-
details
public S details(java.util.Map<java.lang.String,java.lang.Object> details)
-
format
public S format(java.text.MessageFormat format)
-
customMessage
@Deprecated public S customMessage(java.lang.String message)
Deprecated.
-
message
public S message(java.lang.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
-
messageSupplier
public S messageSupplier(java.util.function.Supplier<java.lang.String> messageSupplier)
-
messageFormatter
public S messageFormatter(MessageFormatter messageFormatter)
-
messageKey
public S messageKey(java.lang.String messageKey)
-
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 java.lang.Object[] getMessageArguments()
-
getType
protected java.lang.String getType()
-
getCode
protected java.lang.String getCode()
-
getEvaluationPath
protected JsonNodePath getEvaluationPath()
-
getSchemaLocation
protected SchemaLocation getSchemaLocation()
-
getInstanceLocation
protected JsonNodePath getInstanceLocation()
-
getProperty
protected java.lang.String getProperty()
-
getArguments
protected java.lang.Object[] getArguments()
-
getDetails
protected java.util.Map<java.lang.String,java.lang.Object> getDetails()
-
getFormat
protected java.text.MessageFormat getFormat()
-
getMessage
protected java.lang.String getMessage()
-
getMessageSupplier
protected java.util.function.Supplier<java.lang.String> getMessageSupplier()
-
getMessageFormatter
protected MessageFormatter getMessageFormatter()
-
getMessageKey
protected java.lang.String getMessageKey()
-
-