open class OptionalValidatorFactoryBean : LocalValidatorFactoryBean
LocalValidatorFactoryBean subclass that simply turns org.springframework.validation.Validator calls into no-ops in case of no Bean Validation provider being available.
This is the actual class used by Spring's MVC configuration namespace, in case of the javax.validation API being present but no explicit Validator having been configured.
Author
Juergen Hoeller
Since
4.0.1
OptionalValidatorFactoryBean()
LocalValidatorFactoryBean subclass that simply turns org.springframework.validation.Validator calls into no-ops in case of no Bean Validation provider being available. This is the actual class used by Spring's MVC configuration namespace, in case of the |
open fun afterPropertiesSet(): Unit |
open fun close(): Unit |
|
open fun destroy(): Unit |
|
open fun getConstraintValidatorFactory(): ConstraintValidatorFactory |
|
open fun getMessageInterpolator(): MessageInterpolator |
|
open fun getParameterNameProvider(): ParameterNameProvider |
|
open fun getTraversableResolver(): TraversableResolver |
|
open fun getValidationPropertyMap(): MutableMap<String, String>
Allow Map access to the bean validation properties to be passed to the validation provider, with the option to add or override specific entries. Useful for specifying entries directly, for example via "validationPropertyMap[myKey]". |
|
open fun getValidator(): Validator |
|
open fun setApplicationContext(applicationContext: ApplicationContext): Unit |
|
open fun setConstraintValidatorFactory(constraintValidatorFactory: ConstraintValidatorFactory): Unit
Specify a custom ConstraintValidatorFactory to use for this ValidatorFactory. Default is a SpringConstraintValidatorFactory, delegating to the containing ApplicationContext for creating autowired ConstraintValidator instances. |
|
open fun setMappingLocations(vararg mappingLocations: Resource): Unit
Specify resource locations to load XML constraint mapping files from, if any. |
|
open fun setMessageInterpolator(messageInterpolator: MessageInterpolator): Unit
Specify a custom MessageInterpolator to use for this ValidatorFactory and its exposed default Validator. |
|
open fun setParameterNameDiscoverer(parameterNameDiscoverer: ParameterNameDiscoverer): Unit
Set the ParameterNameDiscoverer to use for resolving method and constructor parameter names if needed for message interpolation. Default is a org.springframework.core.DefaultParameterNameDiscoverer. |
|
open fun setProviderClass(providerClass: Class<Any>): Unit
Specify the desired provider class, if any. If not specified, JSR-303's default search mechanism will be used. |
|
open fun setTraversableResolver(traversableResolver: TraversableResolver): Unit
Specify a custom TraversableResolver to use for this ValidatorFactory and its exposed default Validator. |
|
open fun setValidationMessageSource(messageSource: MessageSource): Unit
Specify a custom Spring MessageSource for resolving validation messages, instead of relying on JSR-303's default "ValidationMessages.properties" bundle in the classpath. This may refer to a Spring context's shared "messageSource" bean, or to some special MessageSource setup for validation purposes only. NOTE: This feature requires Hibernate Validator 4.3 or higher on the classpath. You may nevertheless use a different validation provider but Hibernate Validator's ResourceBundleMessageInterpolator class must be accessible during configuration. Specify either this property or |
|
open fun setValidationProperties(jpaProperties: Properties): Unit
Specify bean validation properties to be passed to the validation provider. Can be populated with a String "value" (parsed via PropertiesEditor) or a "props" element in XML bean definitions. |
|
open fun setValidationPropertyMap(validationProperties: MutableMap<String, String>): Unit
Specify bean validation properties to be passed to the validation provider as a Map. Can be populated with a "map" or "props" element in XML bean definitions. |
|
open fun setValidationProviderResolver(validationProviderResolver: ValidationProviderResolver): Unit
Specify a JSR-303 ValidationProviderResolver for bootstrapping the provider of choice, as an alternative to |
|
open fun <T : Any> unwrap(type: Class<T>): T |
|
open fun usingContext(): ValidatorContext |