public class ConfigurationImpl extends Object implements HibernateValidatorConfiguration, ConfigurationState
Configuration
implementation.FAIL_FAST
Constructor and Description |
---|
ConfigurationImpl(BootstrapState state) |
ConfigurationImpl(ValidationProvider<?> provider) |
public ConfigurationImpl(BootstrapState state)
public ConfigurationImpl(ValidationProvider<?> provider)
public final HibernateValidatorConfiguration ignoreXmlConfiguration()
ignoreXmlConfiguration
in interface Configuration<HibernateValidatorConfiguration>
public final ConfigurationImpl messageInterpolator(MessageInterpolator interpolator)
messageInterpolator
in interface Configuration<HibernateValidatorConfiguration>
public final ConfigurationImpl traversableResolver(TraversableResolver resolver)
traversableResolver
in interface Configuration<HibernateValidatorConfiguration>
public final ConfigurationImpl constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory)
constraintValidatorFactory
in interface Configuration<HibernateValidatorConfiguration>
public final HibernateValidatorConfiguration addMapping(InputStream stream)
addMapping
in interface Configuration<HibernateValidatorConfiguration>
public final HibernateValidatorConfiguration failFast(boolean failFast)
HibernateValidatorConfiguration
failFast
in interface HibernateValidatorConfiguration
failFast
- true
to enable fail fast, false
otherwise.this
following the chaining method patternpublic final ConstraintMapping createConstraintMapping()
HibernateValidatorConfiguration
HibernateValidatorConfiguration.addMapping(ConstraintMapping)
.createConstraintMapping
in interface HibernateValidatorConfiguration
public final HibernateValidatorConfiguration addMapping(ConstraintMapping mapping)
HibernateValidatorConfiguration
ConstraintMapping
instance to the configuration. Constraints configured in mapping
will be added to the constraints configured via annotations and/or xml.addMapping
in interface HibernateValidatorConfiguration
mapping
- ConstraintMapping
instance containing programmatic configured constraintsthis
following the chaining method patternpublic final HibernateValidatorConfiguration addProperty(String name, String value)
addProperty
in interface Configuration<HibernateValidatorConfiguration>
public final ValidatorFactory buildValidatorFactory()
buildValidatorFactory
in interface Configuration<HibernateValidatorConfiguration>
public final boolean isIgnoreXmlConfiguration()
isIgnoreXmlConfiguration
in interface ConfigurationState
public final MessageInterpolator getMessageInterpolator()
getMessageInterpolator
in interface ConfigurationState
public final Set<InputStream> getMappingStreams()
getMappingStreams
in interface ConfigurationState
public final boolean getFailFast()
public final ConstraintValidatorFactory getConstraintValidatorFactory()
getConstraintValidatorFactory
in interface ConfigurationState
public final TraversableResolver getTraversableResolver()
getTraversableResolver
in interface ConfigurationState
public final Map<String,String> getProperties()
getProperties
in interface ConfigurationState
public final MessageInterpolator getDefaultMessageInterpolator()
getDefaultMessageInterpolator
in interface Configuration<HibernateValidatorConfiguration>
public final TraversableResolver getDefaultTraversableResolver()
getDefaultTraversableResolver
in interface Configuration<HibernateValidatorConfiguration>
public final ConstraintValidatorFactory getDefaultConstraintValidatorFactory()
getDefaultConstraintValidatorFactory
in interface Configuration<HibernateValidatorConfiguration>
public final ResourceBundleLocator getDefaultResourceBundleLocator()
HibernateValidatorConfiguration
Returns the ResourceBundleLocator
used by the
default message
interpolator
to load user-provided resource bundles. In conformance with
the specification this default locator retrieves the bundle
"ValidationMessages".
This locator can be used as delegate for custom locators when setting a
customized ResourceBundleMessageInterpolator
:
HibernateValidatorConfiguration configure =
Validation.byProvider(HibernateValidator.class).configure();
ResourceBundleLocator defaultResourceBundleLocator =
configure.getDefaultBundleLocator();
ResourceBundleLocator myResourceBundleLocator =
new MyResourceBundleLocator(defaultResourceBundleLocator);
configure.messageInterpolator(
new ResourceBundleMessageInterpolator(myResourceBundleLocator));
Deprecation note: The return type of this method will change to
ResourceBundleLocator
in a future release.
The return value of this method should be assigned to a variable of this type.
getDefaultResourceBundleLocator
in interface HibernateValidatorConfiguration
ResourceBundleLocator
. Never null.public final Set<ConstraintMapping> getProgrammaticMappings()
Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved