
G - the type object to validatepublic abstract class AbstractGwtSpecificValidator<G> extends Object implements GwtSpecificValidator<G>
GwtSpecificValidator.
All methods that do not need to be generated go here.
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGwtSpecificValidator.AttributeBuilder
Builds attributes one at a time.
|
| Constructor and Description |
|---|
AbstractGwtSpecificValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected List<Class<?>> |
addDefaultGroupWhenEmpty(List<Class<?>> groups) |
protected <V,T,A extends Annotation> |
addSingleViolation(GwtValidationContext<T> context,
Set<javax.validation.ConstraintViolation<T>> violations,
G object,
V value,
ConstraintDescriptorImpl<A> constraintDescriptor) |
static AbstractGwtSpecificValidator.AttributeBuilder |
attributeBuilder() |
protected static Class<?>[] |
groupsToClasses(Group... groups) |
<T> Set<javax.validation.ConstraintViolation<T>> |
validate(GwtValidationContext<T> context,
G object,
Class<?>... groups)
Validates all constraints on
object. |
protected <A extends Annotation,T,V> |
validate(GwtValidationContext<T> context,
Set<javax.validation.ConstraintViolation<T>> violations,
G object,
V value,
javax.validation.ConstraintValidator<A,? super V> validator,
ConstraintDescriptorImpl<A> constraintDescriptor,
Class<?>... groups)
Perform the actual validation of a single
ConstraintValidator. |
<T> Set<javax.validation.ConstraintViolation<T>> |
validateProperty(GwtValidationContext<T> context,
G object,
String propertyName,
Class<?>... groups)
Validates all constraints placed on the property of
object
named propertyName. |
<T> Set<javax.validation.ConstraintViolation<T>> |
validateValue(GwtValidationContext<T> context,
Class<G> beanType,
String propertyName,
Object value,
Class<?>... groups)
Validates all constraints placed on the property named
propertyName of the class beanType where the
property value is value. |
expandDefaultAndValidateClassGroups, expandDefaultAndValidatePropertyGroups, expandDefaultAndValidateValueGroups, getBeanMetadata, getConstraints, validateClassGroups, validatePropertyGroups, validateValueGroupspublic static AbstractGwtSpecificValidator.AttributeBuilder attributeBuilder()
public <T> Set<javax.validation.ConstraintViolation<T>> validate(GwtValidationContext<T> context, G object, Class<?>... groups)
GwtSpecificValidatorobject.validate in interface GwtSpecificValidator<G>context - The gwt validation contextobject - object to validategroups - group or list of groups targeted for validation (default to
Default)public <T> Set<javax.validation.ConstraintViolation<T>> validateProperty(GwtValidationContext<T> context, G object, String propertyName, Class<?>... groups) throws javax.validation.ValidationException
GwtSpecificValidatorobject
named propertyName.validateProperty in interface GwtSpecificValidator<G>context - The gwt validation contextobject - object to validatepropertyName - property to validate (ie field and getter constraints)groups - group or list of groups targeted for validation (default to
Default)javax.validation.ValidationException - if a non recoverable error happens during the
validation processpublic <T> Set<javax.validation.ConstraintViolation<T>> validateValue(GwtValidationContext<T> context, Class<G> beanType, String propertyName, Object value, Class<?>... groups) throws javax.validation.ValidationException
GwtSpecificValidatorpropertyName of the class beanType where the
property value is value.
ConstraintViolation objects return null for
ConstraintViolation.getRootBean() and
ConstraintViolation.getLeafBean()validateValue in interface GwtSpecificValidator<G>context - The gwt validation contextbeanType - the bean typepropertyName - property to validatevalue - property value to validategroups - group or list of groups targeted for validation (default to
Default)javax.validation.ValidationException - if a non recoverable error happens during the
validation processprotected <V,T,A extends Annotation> void addSingleViolation(GwtValidationContext<T> context, Set<javax.validation.ConstraintViolation<T>> violations, G object, V value, ConstraintDescriptorImpl<A> constraintDescriptor)
protected <A extends Annotation,T,V> boolean validate(GwtValidationContext<T> context, Set<javax.validation.ConstraintViolation<T>> violations, G object, V value, javax.validation.ConstraintValidator<A,? super V> validator, ConstraintDescriptorImpl<A> constraintDescriptor, Class<?>... groups)
ConstraintValidator.
As a side effect ConstraintViolations may be added to
violations.
Copyright © 2018. All rights reserved.