|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bval.jsr303.ConstraintValidation<T>
public class ConstraintValidation<T extends Annotation>
Description: Adapter between Constraint (JSR303) and Validation (Core)
this instance is immutable!
| Constructor Summary | |
|---|---|
ConstraintValidation(Class<? extends ConstraintValidator<T,?>>[] validatorClasses,
ConstraintValidator<T,?> validator,
T annotation,
Class<?> owner,
AccessStrategy access,
boolean reportFromComposite)
Create a new ConstraintValidation instance. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstraintValidation(Class<? extends ConstraintValidator<T,?>>[] validatorClasses,
ConstraintValidator<T,?> validator,
T annotation,
Class<?> owner,
AccessStrategy access,
boolean reportFromComposite)
validatorClasses - validator - - the constraint validatorannotation - - the annotation of the constraintowner - - the type where the annotated element is placed (class,
interface, annotation type)access - - how to access the valuereportFromComposite - | Method Detail |
|---|
public ConstraintDescriptor<T> asSerializableDescriptor()
Serializable ConstraintDescriptor capturing a
snapshot of current state.
ConstraintDescriptorpublic boolean isReportAsSingleViolation()
isReportAsSingleViolation in interface ConstraintDescriptor<T extends Annotation>public void addComposed(ConstraintValidation<?> aConstraintValidation)
aConstraintValidation - to addpublic <L extends ValidationListener> void validate(ValidationContext<L> context)
validate in interface Validationpublic void validate(GroupValidationContext<?> context)
GroupValidationContext.
context - rootpublic void initialize()
null) with the stored
annotation.
public String toString()
toString in class Objectpublic String getMessageTemplate()
public ConstraintValidator<T,?> getValidator()
ConstraintValidator invoked by this
ConstraintValidation.
protected boolean isMemberOf(Class<?> reqGroup)
ConstraintValidation belongs to the specified
group.
reqGroup -
public Class<?> getOwner()
ConstraintValidation.
public T getAnnotation()
getAnnotation in interface ConstraintDescriptor<T extends Annotation>public AccessStrategy getAccess()
AccessStrategy used by this ConstraintValidation.
AccessStrategypublic void setAnnotation(T annotation)
annotation - public Map<String,Object> getAttributes()
getAttributes in interface ConstraintDescriptor<T extends Annotation>public Set<ConstraintDescriptor<?>> getComposingConstraints()
getComposingConstraints in interface ConstraintDescriptor<T extends Annotation>public Set<Class<?>> getGroups()
getGroups in interface ConstraintDescriptor<T extends Annotation>public Set<Class<? extends Payload>> getPayload()
getPayload in interface ConstraintDescriptor<T extends Annotation>public List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
getConstraintValidatorClasses in interface ConstraintDescriptor<T extends Annotation>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||