-
public interface ValidationProvider<T extends Configuration<T>>
Contract between the validation bootstrap mechanism and the provider engine. Implementations must have a public no-arg constructor. The construction of a provider should be as "lightweight" as possible.T
represents the provider specific Configuration subclass which typically host provider's additional configuration methods.- Author:
- Emmanuel Bernard, Hardy Ferentschik
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description ValidatorFactory
buildValidatorFactory(ConfigurationState configurationState)
Build aValidatorFactory
using the current provider implementation.Configuration<?>
createGenericConfiguration(BootstrapState state)
Returns aConfiguration
instance.T
createSpecializedConfiguration(BootstrapState state)
-
-
-
Method Detail
-
createSpecializedConfiguration
T createSpecializedConfiguration(BootstrapState state)
Returns aConfiguration
instance implementingT
, theConfiguration
sub-interface. The returnedConfiguration
instance must use the current provider (this
) to build theValidatorFactory
instance.- Parameters:
state
- bootstrap state- Returns:
- specific
Configuration
implementation
-
createGenericConfiguration
Configuration<?> createGenericConfiguration(BootstrapState state)
Returns aConfiguration
instance. This instance is not bound to use the current provider. The choice of provider follows the algorithm described inConfiguration
TheValidationProviderResolver
used byConfiguration
is provided bystate
. If null, the defaultValidationProviderResolver
is used.- Parameters:
state
- bootstrap state- Returns:
- non specialized Configuration implementation
-
buildValidatorFactory
ValidatorFactory buildValidatorFactory(ConfigurationState configurationState)
Build aValidatorFactory
using the current provider implementation. TheValidatorFactory
is assembled and follows the configuration passed viaConfigurationState
. The returnedValidatorFactory
is properly initialized and ready for use.- Parameters:
configurationState
- the configuration descriptor- Returns:
- the instantiated
ValidatorFactory
- Throws:
ValidationException
- if theValidatorFactory
cannot be built
-
-
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/ValidationProvider.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.