-
public interface ConfigurationState
Contract between aConfiguration
and aValidationProvider
to create aValidatorFactory
. The configuration artifacts defined in the XML configuration and provided to theConfiguration
are merged and passed along viaConfigurationState
.- Author:
- Emmanuel Bernard, Hardy Ferentschik, Gunnar Morling
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description 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.boolean
isIgnoreXmlConfiguration()
Returnstrue
ifConfiguration.ignoreXmlConfiguration()
has been called.
-
-
-
Method Detail
-
isIgnoreXmlConfiguration
boolean isIgnoreXmlConfiguration()
Returnstrue
ifConfiguration.ignoreXmlConfiguration()
has been called. In this case, theValidatorFactory
must ignoreMETA-INF/validation.xml
.- Returns:
true
ifMETA-INF/validation.xml
should be ignored
-
getMessageInterpolator
MessageInterpolator getMessageInterpolator()
Returns the message interpolator of this configuration. Message interpolator is defined in the following decreasing priority:- set via the
Configuration
programmatic API - defined in
META-INF/validation.xml
provided thatignoreXmlConfiguration
is false. In this case the instance is created via its no-arg constructor. null
if undefined.
- Returns:
- message interpolator instance or
null
if not defined
- set via the
-
getMappingStreams
Set<InputStream> getMappingStreams()
Returns a set of configuration streams. The streams are defined by:- mapping XML streams passed programmatically in
Configuration
- mapping XML streams located in the resources defined in
META-INF/validation.xml
(constraint-mapping element)
Configuration
implementation must be closed by theConfiguration
implementation after theValidatorFactory
creation (or if an exception occurs). All streams are guaranteed to adhere to the mark/reset contract (seeInputStream.markSupported()
by the Bean Validation provider.- Returns:
- set of input stream
- mapping XML streams passed programmatically in
-
getConstraintValidatorFactory
ConstraintValidatorFactory getConstraintValidatorFactory()
Returns the constraint validator factory of this configuration. TheConstraintValidatorFactory
implementation is defined in the following decreasing priority:- set via the
Configuration
programmatic API - defined in
META-INF/validation.xml
provided thatignoredXmlConfiguration
isfalse
. In this case the instance is created via its no-arg constructor. null
if undefined.
- Returns:
- factory instance or
null
if not defined
- set via the
-
getTraversableResolver
TraversableResolver getTraversableResolver()
Returns the traversable resolver for this configuration.TraversableResolver
is defined in the following decreasing priority:- set via the
Configuration
programmatic API - defined in
META-INF/validation.xml
provided thatignoredXmlConfiguration
isfalse
. In this case the instance is created via its no-arg constructor. null
if undefined.
- Returns:
- traversable resolver instance or
null
if not defined
- set via the
-
getParameterNameProvider
ParameterNameProvider getParameterNameProvider()
Returns the parameter name provider for this configuration.ParameterNameProvider
is defined in the following decreasing priority:- set via the
Configuration
programmatic API - defined in
META-INF/validation.xml
provided thatignoreXmlConfiguration
isfalse
. In this case the instance is created via its no-arg constructor. null
if undefined.
- Returns:
- parameter name provider instance or
null
if not defined - Since:
- 1.1
- set via the
-
getProperties
Map<String,String> getProperties()
Returns a map of non type-safe custom properties. Properties defined via:Configuration.addProperty(String, String)
META-INF/validation.xml
provided thatignoreXmlConfiguration
is
false
.- Returns:
Map
whose key is the property key and the value the property value
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/validation/spi/ConfigurationState.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.