Package | Description |
---|---|
org.hibernate.validator |
Bootstrap classes HibernateValidator and HibernateValidatorConfiguration which uniquely identify Hibernate Validator
and allow to configure it.
|
org.hibernate.validator.cfg.context |
Contains facet and creational context interfaces forming the API for programmatic constraint definition.
|
org.hibernate.validator.constraints.time |
Hibernate Validator
Duration constraints. |
org.hibernate.validator.constraintvalidation |
Custom Hibernate Validator specific constraint validation extension classes.
|
org.hibernate.validator.engine | |
org.hibernate.validator.messageinterpolation |
Implementations of the MessageInterpolator interface in particular ResourceBundleMessageInterpolator which can be
used by custom implementations of the interface for delegation.
|
org.hibernate.validator.metadata | |
org.hibernate.validator.resourceloading |
ResourceBundleLocator interface and its various implementations.
|
org.hibernate.validator.spi.messageinterpolation | |
org.hibernate.validator.spi.nodenameprovider | |
org.hibernate.validator.spi.properties |
This package provides support for customizing the getter detection logic.
|
org.hibernate.validator.spi.scripting |
This package provides support for customization of the script evaluation for
ScriptAssert
and ParameterScriptAssert constraints. |
Modifier and Type | Class and Description |
---|---|
class |
PredefinedScopeHibernateValidator
Implementation of
ValidationProvider limiting validation to a predefined scope. |
interface |
PredefinedScopeHibernateValidatorConfiguration
Extension of
HibernateValidatorConfiguration with additional methods dedicated to defining the predefined
scope of bean validation e.g. |
interface |
PredefinedScopeHibernateValidatorFactory
Provides Hibernate Validator extensions to
ValidatorFactory in the context of a predefined scope. |
Modifier and Type | Field and Description |
---|---|
static String |
BaseHibernateValidatorConfiguration.CONSTRAINT_EXPRESSION_LANGUAGE_FEATURE_LEVEL
Property for configuring the Expression Language feature level for constraints, allowing to define which
Expression Language features are available for message interpolation.
|
static String |
BaseHibernateValidatorConfiguration.CUSTOM_VIOLATION_EXPRESSION_LANGUAGE_FEATURE_LEVEL
Property for configuring the Expression Language feature level for custom violations, allowing to define which
Expression Language features are available for message interpolation.
|
static String |
BaseHibernateValidatorConfiguration.GETTER_PROPERTY_SELECTION_STRATEGY_CLASSNAME
Property for configuring the getter property selection strategy, allowing to set which rules will be applied
to determine if a method is a valid JavaBean getter.
|
static String |
BaseHibernateValidatorConfiguration.LOCALE_RESOLVER_CLASSNAME
Property for configuring the locale resolver, allowing to select an implementation of
LocaleResolver
which will be used for locale resolution when interpolating a message. |
static String |
BaseHibernateValidatorConfiguration.PROPERTY_NODE_NAME_PROVIDER_CLASSNAME
Property for configuring the property node name provider, allowing to select an implementation of
PropertyNodeNameProvider
which will be used for property name resolution when creating a property path. |
static String |
BaseHibernateValidatorConfiguration.SCRIPT_EVALUATOR_FACTORY_CLASSNAME
Property for configuring the script evaluator factory, allowing to set up which factory will be used to create
ScriptEvaluator s for evaluation of script expressions in
ScriptAssert and ParameterScriptAssert
constraints. |
static String |
BaseHibernateValidatorConfiguration.TEMPORAL_VALIDATION_TOLERANCE
Property for configuring temporal validation tolerance, allowing to set the acceptable margin of error when
comparing date/time in temporal constraints.
|
Modifier and Type | Method and Description |
---|---|
S |
BaseHibernateValidatorConfiguration.beanMetaDataClassNormalizer(BeanMetaDataClassNormalizer beanMetaDataClassNormalizer) |
PredefinedScopeHibernateValidatorConfiguration |
PredefinedScopeHibernateValidatorConfiguration.builtinConstraints(Set<String> constraints) |
S |
BaseHibernateValidatorConfiguration.constraintExpressionLanguageFeatureLevel(ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel)
Allows setting the Expression Language feature level for message interpolation of constraint messages.
|
HibernateValidatorContext |
HibernateValidatorContext.constraintValidatorPayload(Object constraintValidatorPayload)
Define a payload passed to the constraint validators.
|
S |
BaseHibernateValidatorConfiguration.constraintValidatorPayload(Object constraintValidatorPayload)
Allows to set a payload which will be passed to the constraint validators.
|
S |
BaseHibernateValidatorConfiguration.customViolationExpressionLanguageFeatureLevel(ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel)
Allows setting the Expression Language feature level for message interpolation of custom violation messages.
|
S |
BaseHibernateValidatorConfiguration.defaultLocale(Locale defaultLocale)
Allows setting the default locale used to interpolate the constraint violation messages.
|
Set<ValueExtractor<?>> |
BaseHibernateValidatorConfiguration.getDefaultValueExtractors()
Returns the default
ValueExtractor implementations as per the
specification. |
GetterPropertySelectionStrategy |
HibernateValidatorFactory.getGetterPropertySelectionStrategy()
Returns the getter property selection strategy defining the rules determining if a method is a getter or not.
|
PropertyNodeNameProvider |
HibernateValidatorFactory.getPropertyNodeNameProvider()
Returns the property node name provider used to resolve the name of a property node when creating the property path.
|
ScriptEvaluatorFactory |
HibernateValidatorFactory.getScriptEvaluatorFactory()
Returns the factory responsible for creating
ScriptEvaluator s used to
evaluate script expressions of ScriptAssert and ParameterScriptAssert
constraints. |
Duration |
HibernateValidatorFactory.getTemporalValidationTolerance()
Returns the temporal validation tolerance i.e.
|
S |
BaseHibernateValidatorConfiguration.getterPropertySelectionStrategy(GetterPropertySelectionStrategy getterPropertySelectionStrategy)
Allows to set a getter property selection strategy defining the rules determining if a method is a getter
or not.
|
PredefinedScopeHibernateValidatorConfiguration |
PredefinedScopeHibernateValidatorConfiguration.initializeBeanMetaData(Set<Class<?>> beanClassesToInitialize) |
PredefinedScopeHibernateValidatorConfiguration |
PredefinedScopeHibernateValidatorConfiguration.initializeLocales(Set<Locale> locales)
Deprecated.
Planned for removal, use
BaseHibernateValidatorConfiguration.locales(Set) instead. |
S |
BaseHibernateValidatorConfiguration.localeResolver(LocaleResolver localeResolver)
Allows setting a locale resolver, defining how the locale will be resolved when interpolating the message of a constraint violation.
|
default S |
BaseHibernateValidatorConfiguration.locales(Locale... locales)
Allows setting the list of the locales supported by this ValidatorFactory.
|
S |
BaseHibernateValidatorConfiguration.locales(Set<Locale> locales)
Allows setting the list of the locales supported by this ValidatorFactory.
|
S |
BaseHibernateValidatorConfiguration.propertyNodeNameProvider(PropertyNodeNameProvider propertyNodeNameProvider)
Allows to set a property node name provider, defining how the name of a property node will be resolved
when constructing a property path as the one returned by
ConstraintViolation.getPropertyPath() . |
S |
BaseHibernateValidatorConfiguration.scriptEvaluatorFactory(ScriptEvaluatorFactory scriptEvaluatorFactory)
Allows to specify a custom
ScriptEvaluatorFactory responsible for creating ScriptEvaluator s
used to evaluate script expressions for ScriptAssert and ParameterScriptAssert constraints. |
HibernateValidatorContext |
HibernateValidatorContext.temporalValidationTolerance(Duration temporalValidationTolerance)
Define the temporal validation tolerance i.e.
|
S |
BaseHibernateValidatorConfiguration.temporalValidationTolerance(Duration temporalValidationTolerance)
Allows to set the acceptable margin of error when comparing date/time in temporal constraints such as
Past /PastOrPresent and Future /FutureOrPresent . |
Modifier and Type | Interface and Description |
---|---|
static interface |
ConstraintDefinitionContext.ConstraintValidatorDefinitionContext<A extends Annotation,T>
Allows to specify a validation implementation for the given constraint and data type using a Lambda expression or
method reference.
|
static interface |
ConstraintDefinitionContext.ValidationCallable<T>
Callable implementing a validation routine.
|
interface |
ContainerElementTarget
Facet of a constraint mapping creational context which allows to select a type argument or the component type of the
(return) type of the current property, parameter or method as target for the next operations.
|
Modifier and Type | Method and Description |
---|---|
<T> ConstraintDefinitionContext.ConstraintValidatorDefinitionContext<A,T> |
ConstraintDefinitionContext.validateType(Class<T> type)
Allows to configure a validation implementation using a Lambda expression or method reference.
|
Modifier and Type | Class and Description |
---|---|
interface |
DurationMax
The annotated
Duration element must be shorter than or equal to the one constructed as a sum of
DurationMax.nanos() , DurationMax.millis() , DurationMax.seconds() ,
DurationMax.minutes() , DurationMax.hours() , DurationMax.days() . |
interface |
DurationMin
The annotated
Duration element must be longer than or equal to the one constructed as a sum of
DurationMin.nanos() , DurationMin.millis() , DurationMin.seconds() ,
DurationMin.minutes() , DurationMin.hours() , DurationMin.days() . |
Modifier and Type | Interface and Description |
---|---|
interface |
HibernateConstraintValidator<A extends Annotation,T>
Hibernate Validator specific extension to the
ConstraintValidator contract. |
interface |
HibernateConstraintValidatorInitializationContext
Provides contextual data and operations when initializing a constraint validator.
|
interface |
HibernateCrossParameterConstraintValidatorContext
A custom
ConstraintValidatorContext which provides additional functionality for cross parameter validation contexts. |
Modifier and Type | Method and Description |
---|---|
default HibernateConstraintViolationBuilder |
HibernateConstraintViolationBuilder.enableExpressionLanguage()
Enable Expression Language with the default Expression Language feature level for the constraint violation
created by this builder if the chosen
MessageInterpolator supports it. |
HibernateConstraintViolationBuilder |
HibernateConstraintViolationBuilder.enableExpressionLanguage(ExpressionLanguageFeatureLevel level)
Enable Expression Language for the constraint violation created by this builder if the chosen
MessageInterpolator supports it. |
<C> C |
HibernateConstraintValidatorContext.getConstraintValidatorPayload(Class<C> type)
Returns an instance of the specified type or
null if the current constraint validator payload isn't of
the given type. |
Duration |
HibernateConstraintValidatorInitializationContext.getTemporalValidationTolerance()
Returns the temporal validation tolerance i.e.
|
Modifier and Type | Interface and Description |
---|---|
interface |
HibernateValidatorEnhancedBean
Hibernate Validator specific marker interface.
|
Modifier and Type | Class and Description |
---|---|
class |
ExpressionLanguageFeatureLevel
Indicates the level of features enabled for the Expression Language engine.
|
Constructor and Description |
---|
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator,
Set<Locale> localesToInitialize,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles)
MessageInterpolator taking two resource bundle locators. |
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles,
boolean cacheMessages)
MessageInterpolator taking two resource bundle locators. |
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles)
MessageInterpolator taking a resource bundle locator. |
AbstractMessageInterpolator(Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles)
MessageInterpolator using the default resource bundle locators. |
ParameterMessageInterpolator(Set<Locale> locales,
Locale defaultLocale,
boolean preloadResourceBundles) |
ParameterMessageInterpolator(Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles) |
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles) |
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles,
boolean cachingEnabled) |
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles) |
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles,
boolean cachingEnabled) |
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles,
boolean cachingEnabled,
ExpressionFactory expressionFactory) |
ResourceBundleMessageInterpolator(Set<Locale> locales,
Locale defaultLocale,
LocaleResolver localeResolver,
boolean preloadResourceBundles) |
Modifier and Type | Interface and Description |
---|---|
interface |
BeanMetaDataClassNormalizer
Define how the validated class is normalized before being used as the key to get the bean metadata.
|
Constructor and Description |
---|
AggregateResourceBundleLocator(List<String> bundleNames,
boolean preloadResourceBundles,
Set<Locale> localesToInitialize)
Creates a locator that delivers a resource bundle merged from the given
list of source bundles.
|
AggregateResourceBundleLocator(List<String> bundleNames,
boolean preloadResourceBundles,
Set<Locale> localesToInitialize,
ResourceBundleLocator delegate)
Creates a locator that delivers a resource bundle merged from the given
list of source bundles.
|
AggregateResourceBundleLocator(List<String> bundleNames,
boolean preloadResourceBundles,
Set<Locale> localesToInitialize,
ResourceBundleLocator delegate,
ClassLoader classLoader)
Creates a locator that delivers a resource bundle merged from the given
list of source bundles.
|
PlatformResourceBundleLocator(String bundleName,
Set<Locale> localesToInitialize)
Creates a new
PlatformResourceBundleLocator . |
PlatformResourceBundleLocator(String bundleName,
Set<Locale> localesToInitialize,
ClassLoader classLoader)
Creates a new
PlatformResourceBundleLocator . |
PlatformResourceBundleLocator(String bundleName,
Set<Locale> localesToInitialize,
ClassLoader classLoader,
boolean aggregate)
Creates a new
PlatformResourceBundleLocator . |
Modifier and Type | Interface and Description |
---|---|
interface |
LocaleResolver
Define the strategy used to resolve the locale user for message interpolation when no locale is defined from the list
of supported locales.
|
interface |
LocaleResolverContext
Context used for locale resolution.
|
Modifier and Type | Interface and Description |
---|---|
interface |
JavaBeanProperty
Contains metadata for a JavaBean property.
|
interface |
Property
Base interface for property metadata.
|
interface |
PropertyNodeNameProvider
This interface is used to resolve the name of a property node when creating the property path.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ConstrainableExecutable
Descriptor for a method of a Java class.
|
interface |
GetterPropertySelectionStrategy
Used to define the strategy to detect the getters of a bean.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCachingScriptEvaluatorFactory
Basic cacheable factory responsible for the creation of
ScriptEvaluator s. |
class |
ScriptEngineScriptEvaluator
A wrapper around JSR 223
ScriptEngine s. |
class |
ScriptEvaluationException
Exception raised when an error occurs during the evaluation of a script.
|
interface |
ScriptEvaluator
Used to evaluate script expressions for
ScriptAssert
and ParameterScriptAssert constraints. |
interface |
ScriptEvaluatorFactory
Factory used to initialize the
ScriptEvaluator s required to evaluate script expressions defined in
ScriptAssert and ParameterScriptAssert constraints. |
class |
ScriptEvaluatorNotFoundException
Exception raised when a script evaluator cannot be found for a given language.
|
Copyright © 2007-2021 Red Hat, Inc. All Rights Reserved