public class ValidationContext<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ValidationContext.ValidationContextBuilder
Builder for creating
ValidationContext s suited for the different kinds of validation. |
public static ValidationContext.ValidationContextBuilder getValidationContext(ConstraintValidatorManager constraintValidatorManager, MessageInterpolator messageInterpolator, ConstraintValidatorFactory constraintValidatorFactory, TraversableResolver traversableResolver, TimeProvider timeProvider, List<ValidatedValueUnwrapper<?>> validatedValueUnwrappers, TypeResolutionHelper typeResolutionHelper, boolean failFast)
public T getRootBean()
public ExecutableElement getExecutable()
public TraversableResolver getTraversableResolver()
public boolean isFailFastModeEnabled()
public ConstraintValidatorManager getConstraintValidatorManager()
public List<String> getParameterNames()
ParameterNameProvider
.null
otherwise.public TimeProvider getTimeProvider()
public Set<ConstraintViolation<T>> createConstraintViolations(ValueContext<?,?> localContext, ConstraintValidatorContextImpl constraintValidatorContext)
public ConstraintValidatorFactory getConstraintValidatorFactory()
public boolean isBeanAlreadyValidated(Object value, Class<?> group, PathImpl path)
public void markCurrentBeanAsProcessed(ValueContext<?,?> valueContext)
public void addConstraintFailures(Set<ConstraintViolation<T>> failingConstraintViolations)
public Set<ConstraintViolation<T>> getFailingConstraints()
public ConstraintViolation<T> createConstraintViolation(ValueContext<?,?> localContext, ConstraintViolationCreationContext constraintViolationCreationContext, ConstraintDescriptor<?> descriptor)
public boolean hasMetaConstraintBeenProcessed(Object bean, Path path, MetaConstraint<?> metaConstraint)
public void markConstraintProcessed(Object bean, Path path, MetaConstraint<?> metaConstraint)
public ValidatedValueUnwrapper<?> getValidatedValueUnwrapper(Type type)
If required this could be enhanced to search for the most-specific handler and raise an exception in case more than one matching handler is found (or a scheme of prioritizing handlers to process several handlers in order.
type
- the type to be handlednull
if no matching handler was foundCopyright © 2017 JBoss by Red Hat. All rights reserved.