javax.validation.spi
Interface ConfigurationState


public interface ConfigurationState

Contract between a Configuration and a ValidatorProvider to create a ValidatorFactory. The configuration artifacts defined in the XML configuration and provided to the Configuration are merged and passed along via ConfigurationState.

Author:
Emmanuel Bernard, Hardy Ferentschik

Method Summary
 ConstraintValidatorFactory getConstraintValidatorFactory()
          ConstraintValidatorFactory implementation as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false.
 java.util.Set<java.io.InputStream> getMappingStreams()
          Returns a set of stream corresponding to: - mapping XML streams passed programmatically in Configuration - mapping XML stream located in the resources defined in 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).
 MessageInterpolator getMessageInterpolator()
          Message interpolator as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          return non type-safe properties defined via: - Configuration.addProperty(String, String) - META-INF/validation.xml provided that ignoredXmlConfiguration is false.
 TraversableResolver getTraversableResolver()
          TraversableResolver as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false.
 boolean isIgnoreXmlConfiguration()
          returns true if Configuration.ignoreXMLConfiguration() has been called In this case, the ValidatorFactory must ignore META-INF/validation.xml
 

Method Detail

isIgnoreXmlConfiguration

boolean isIgnoreXmlConfiguration()
returns true if Configuration.ignoreXMLConfiguration() has been called In this case, the ValidatorFactory must ignore META-INF/validation.xml

Returns:
true if META-INF/validation.xml should be ignored

getMessageInterpolator

MessageInterpolator getMessageInterpolator()
Message interpolator as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false. In this case the instance is created via its no-arg constructor. - null if undefined.

Returns:
message provider instance or null if not defined

getMappingStreams

java.util.Set<java.io.InputStream> getMappingStreams()
Returns a set of stream corresponding to: - mapping XML streams passed programmatically in Configuration - mapping XML stream located in the resources defined in 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).

Returns:
set of input stream

getConstraintValidatorFactory

ConstraintValidatorFactory getConstraintValidatorFactory()
ConstraintValidatorFactory implementation as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false. In this case the instance is created via its no-arg constructor. - null if undefined.

Returns:
factory instance or null if not defined

getTraversableResolver

TraversableResolver getTraversableResolver()
TraversableResolver as defined in the following decreasing priority: - set via the Configuration programmatic API - defined in META-INF/validation.xml provided that ignoredXmlConfiguration is false. In this case the instance is created via its no-arg constructor. - null if undefined.

Returns:
traversable provider instance or null if not defined

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
return non type-safe properties defined via: - Configuration.addProperty(String, String) - META-INF/validation.xml provided that ignoredXmlConfiguration is false. If a property is defined both programmatically and in XML, the value defined programmatically has priority

Returns:
Map whose key is the property key and the value the property value


Copyright © 2007-2009. All Rights Reserved.