| 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.spi.scripting |
This package provides support for customization of the script evaluation for
ScriptAssert
and ParameterScriptAssert constraints. |
| Modifier and Type | Field and Description |
|---|---|
static String |
HibernateValidatorConfiguration.SCRIPT_EVALUATOR_FACTORY_CLASSNAME
Property for configuring the script evaluator factory, allowing to set up which factory will be used to create
ScriptEvaluators for evaluation of script expressions in
ScriptAssert and ParameterScriptAssert
constraints. |
static String |
HibernateValidatorConfiguration.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 |
|---|---|
HibernateValidatorContext |
HibernateValidatorContext.constraintValidatorPayload(Object constraintValidatorPayload)
Define a payload passed to the constraint validators.
|
HibernateValidatorConfiguration |
HibernateValidatorConfiguration.constraintValidatorPayload(Object constraintValidatorPayload)
Allows to set a payload which will be passed to the constraint validators.
|
Set<ValueExtractor<?>> |
HibernateValidatorConfiguration.getDefaultValueExtractors()
Returns the default
ValueExtractor implementations as per the
specification. |
ScriptEvaluatorFactory |
HibernateValidatorFactory.getScriptEvaluatorFactory()
Returns the factory responsible for creating
ScriptEvaluators used to
evaluate script expressions of ScriptAssert and ParameterScriptAssert
constraints. |
Duration |
HibernateValidatorFactory.getTemporalValidationTolerance()
Returns the temporal validation tolerance i.e.
|
HibernateValidatorConfiguration |
HibernateValidatorConfiguration.scriptEvaluatorFactory(ScriptEvaluatorFactory scriptEvaluatorFactory)
Allows to specify a custom
ScriptEvaluatorFactory responsible for creating ScriptEvaluators
used to evaluate script expressions for ScriptAssert and ParameterScriptAssert constraints. |
HibernateValidatorContext |
HibernateValidatorContext.temporalValidationTolerance(Duration temporalValidationTolerance)
Define the temporal validation tolerance i.e.
|
HibernateValidatorConfiguration |
HibernateValidatorConfiguration.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.
|
| Modifier and Type | Method and Description |
|---|---|
<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 | Class and Description |
|---|---|
class |
AbstractCachingScriptEvaluatorFactory
Basic cacheable factory responsible for the creation of
ScriptEvaluators. |
class |
ScriptEngineScriptEvaluator
A wrapper around JSR 223
ScriptEngines. |
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
ScriptEvaluators 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 © 2019 JBoss by Red Hat. All rights reserved.