public abstract class BaseGwtConfiguration extends Object implements Configuration<BaseGwtConfiguration>
Configuration
.Modifier and Type | Field and Description |
---|---|
protected javax.validation.ConstraintValidatorFactory |
constraintValidatorFactory |
protected MessageInterpolator |
messageInterpolator |
protected Map<String,String> |
properties |
protected GwtValidationProvider |
provider |
protected javax.validation.spi.BootstrapState |
state |
protected javax.validation.TraversableResolver |
traversableResolver |
Constructor and Description |
---|
BaseGwtConfiguration(GwtValidationProvider gwtValidationProvider,
javax.validation.spi.BootstrapState state) |
Modifier and Type | Method and Description |
---|---|
BaseGwtConfiguration |
addProperty(String name,
String value)
Add a provider specific property.
|
javax.validation.ValidatorFactory |
buildValidatorFactory()
Build a
ValidatorFactory implementation. |
BaseGwtConfiguration |
constraintValidatorFactory(javax.validation.ConstraintValidatorFactory constraintValidatorFactory)
ConstraintValidatorFactory is unsupported in GWT.
Constraint validators are instead created using GWT.create- with no factory. |
javax.validation.ConstraintValidatorFactory |
getDefaultConstraintValidatorFactory()
Return an implementation of the
ConstraintValidatorFactory interface
following the default ConstraintValidatorFactory defined in the
specification:
uses the public no-arg constructor of the ConstraintValidator
|
MessageInterpolator |
getDefaultMessageInterpolator()
Return an implementation of the
MessageInterpolator interface
following the default MessageInterpolator defined in the
specification:
use the ValidationMessages resource bundle to load keys
use Locale.getDefault()
|
javax.validation.TraversableResolver |
getDefaultTraversableResolver()
Return an implementation of the
TraversableResolver interface
following the default TraversableResolver defined in the
specification:
if Java Persistence is available in the runtime environment,
a property is considered reachable if Java Persistence considers
the property as loaded
if Java Persistence is not available in the runtime environment,
all properties are considered reachable
all properties are considered cascadable.
|
BaseGwtConfiguration |
ignoreXmlConfiguration()
Ignore data from the META-INF/validation.xml file if this
method is called.
|
BaseGwtConfiguration |
messageInterpolator(MessageInterpolator interpolator)
Defines the message interpolator used.
|
BaseGwtConfiguration |
traversableResolver(javax.validation.TraversableResolver resolver)
Defines the traversable resolver used.
|
addMapping
protected final GwtValidationProvider provider
protected final javax.validation.spi.BootstrapState state
protected javax.validation.ConstraintValidatorFactory constraintValidatorFactory
protected MessageInterpolator messageInterpolator
protected javax.validation.TraversableResolver traversableResolver
public BaseGwtConfiguration(GwtValidationProvider gwtValidationProvider, javax.validation.spi.BootstrapState state)
public final BaseGwtConfiguration addProperty(String name, String value)
Configuration
Configuration subclass.
ValidatorFactory factory = Validation.byProvider(ACMEPrivoder.class)
.configure()
.providerSpecificProperty(ACMEState.FAST)
.buildValidatorFactory();
This method is typically used by containers parsing META-INF/validation.xml
themselves and injecting the state to the Configuration object.
If a property with a given name is defined both via this method and in the
XML configuration, the value set programmatically has priority.
If null is passed as a value, the value defined in XML is used. If no value
is defined in XML, the property is considered unset.
addProperty
in interface Configuration<BaseGwtConfiguration>
name
- property name.value
- property value.this
following the chaining method pattern.public final javax.validation.ValidatorFactory buildValidatorFactory()
Configuration
ValidatorFactory
implementation.buildValidatorFactory
in interface Configuration<BaseGwtConfiguration>
public final BaseGwtConfiguration constraintValidatorFactory(javax.validation.ConstraintValidatorFactory constraintValidatorFactory)
ConstraintValidatorFactory
is unsupported in GWT.
Constraint validators are instead created using GWT.create- with no factory.constraintValidatorFactory
in interface Configuration<BaseGwtConfiguration>
constraintValidatorFactory
- constraint factory inmplementation.this
following the chaining method pattern.public final javax.validation.ConstraintValidatorFactory getDefaultConstraintValidatorFactory()
Configuration
ConstraintValidatorFactory
interface
following the default ConstraintValidatorFactory
defined in the
specification:
ConstraintValidator
getDefaultConstraintValidatorFactory
in interface Configuration<BaseGwtConfiguration>
public final MessageInterpolator getDefaultMessageInterpolator()
Configuration
MessageInterpolator
interface
following the default MessageInterpolator
defined in the
specification:
getDefaultMessageInterpolator
in interface Configuration<BaseGwtConfiguration>
public final javax.validation.TraversableResolver getDefaultTraversableResolver()
Configuration
TraversableResolver
interface
following the default TraversableResolver
defined in the
specification:
getDefaultTraversableResolver
in interface Configuration<BaseGwtConfiguration>
public final BaseGwtConfiguration ignoreXmlConfiguration()
Configuration
Configuration
methods.ignoreXmlConfiguration
in interface Configuration<BaseGwtConfiguration>
this
following the chaining method pattern.public final BaseGwtConfiguration messageInterpolator(MessageInterpolator interpolator)
Configuration
null
is passed, the default message interpolator is used
(defined in XML or the specification default).messageInterpolator
in interface Configuration<BaseGwtConfiguration>
interpolator
- message interpolator implementation.this
following the chaining method pattern.public final BaseGwtConfiguration traversableResolver(javax.validation.TraversableResolver resolver)
Configuration
null
is passed, the default traversable resolver is used
(defined in XML or the specification default).traversableResolver
in interface Configuration<BaseGwtConfiguration>
resolver
- traversable resolver implementation.this
following the chaining method pattern.Copyright © 2018. All rights reserved.