public interface ConfigurationState
Configuration
and a
ValidationProvider
to create a ValidatorFactory
.
The configuration artifacts defined in the XML configuration and provided to the
Configuration
are merged and passed along via
ConfigurationState
.
Modifier and Type | Method and Description |
---|---|
ClockProvider |
getClockProvider()
Returns the clock provider for this configuration.
|
ConstraintValidatorFactory |
getConstraintValidatorFactory()
Returns the constraint validator factory of this configuration.
|
Set<InputStream> |
getMappingStreams()
Returns a set of configuration streams.
|
MessageInterpolator |
getMessageInterpolator()
Returns the message interpolator of this configuration.
|
ParameterNameProvider |
getParameterNameProvider()
Returns the parameter name provider for this configuration.
|
Map<String,String> |
getProperties()
Returns a map of non type-safe custom properties.
|
TraversableResolver |
getTraversableResolver()
Returns the traversable resolver for this configuration.
|
Set<ValueExtractor<?>> |
getValueExtractors()
Returns a set of value extractors.
|
boolean |
isIgnoreXmlConfiguration()
Returns
true if Configuration.ignoreXmlConfiguration() has been
called. |
boolean isIgnoreXmlConfiguration()
true
if Configuration.ignoreXmlConfiguration()
has been
called.
In this case, the ValidatorFactory
must ignore
META-INF/validation.xml
.
true
if META-INF/validation.xml
should be ignoredMessageInterpolator getMessageInterpolator()
Message interpolator is defined in the following decreasing priority:
Configuration
programmatic APIMETA-INF/validation.xml
provided that
ignoreXmlConfiguration
is false. In this case the instance
is created via its no-arg constructor.null
if undefined.null
if not definedSet<InputStream> getMappingStreams()
The streams are defined by:
Configuration
META-INF/validation.xml
(constraint-mapping element)
Streams represented in the XML configuration and opened by the
Configuration
implementation must be closed by the
Configuration
implementation after the ValidatorFactory
creation (or if an exception occurs). All streams are guaranteed to
adhere to the mark/reset contract (see InputStream.markSupported()
by the Jakarta Bean Validation provider.
Set<ValueExtractor<?>> getValueExtractors()
The extractors are retrieved from the following sources in decreasing order:
Configuration
META-INF/validation.xml
provided
that ignoredXmlConfiguration
is false
META-INF/validation.xml
or loaded
through the service loader. Extractors defined in
META-INF/validation.xml
take precedence over any extractor for
the same type and type parameter loaded through the service loader.
Extractors defined in META-INF/validation.xml
or loaded through
the service loader are instantiated using their no-arg constructor.
null
ConstraintValidatorFactory getConstraintValidatorFactory()
The ConstraintValidatorFactory
implementation is defined in the following
decreasing priority:
Configuration
programmatic APIMETA-INF/validation.xml
provided that
ignoredXmlConfiguration
is false
. In this case the instance
is created via its no-arg constructor.null
if undefined.null
if not definedTraversableResolver getTraversableResolver()
TraversableResolver
is defined in the following decreasing priority:
Configuration
programmatic APIMETA-INF/validation.xml
provided that
ignoredXmlConfiguration
is false
. In this case the
instance is created via its no-arg constructor.null
if undefined.null
if not definedParameterNameProvider getParameterNameProvider()
ParameterNameProvider
is defined in the following decreasing priority:
Configuration
programmatic APIMETA-INF/validation.xml
provided that
ignoreXmlConfiguration
is false
. In this case the instance
is created via its no-arg constructor.null
if undefined.null
if not definedClockProvider getClockProvider()
ClockProvider
is defined in the following decreasing priority:
Configuration
programmatic APIMETA-INF/validation.xml
provided that
ignoreXmlConfiguration
is false
. In this case the instance
is created via its no-arg constructor.null
if undefined.null
if not definedMap<String,String> getProperties()
Properties defined via:
Configuration.addProperty(String, String)
META-INF/validation.xml
provided that
ignoreXmlConfiguration
is false
.If a property is defined both programmatically and in XML, the value defined programmatically has priority.
Map
whose key is the property key and the value
the property valueComments to: bean-validation-dev@eclipse.org.
Copyright © 2019,2020 Eclipse Foundation.
Use is subject to EFSL; this spec is based on material that is licensed under the Apache License, version 2.0.