|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjodd.vtor.ValidationContext
public class ValidationContext
Validation context is set of all checks that can be applied on one target. Checks can be added manually or by parsing the class.
| Field Summary | |
|---|---|
protected Map<String,List<Check>> |
map
|
| Constructor Summary | |
|---|---|
ValidationContext()
|
|
| Method Summary | ||
|---|---|---|
void |
add(Check check)
Adds validation checks. |
|
void |
addAll(List<Check> checkList)
Adds all checks from provided list. |
|
void |
addClassChecks(Class target)
Parses class annotations and adds all checks. |
|
protected void |
collectAnnotationChecks(List<Check> annChecks,
Class targetType,
String targetName,
Annotation[] annotations)
Collect annotations for some target. |
|
protected void |
collectFieldAnnotationChecks(List<Check> annChecks,
Field field)
Process all annotations of provided field. |
|
protected void |
copyDefaultCheckProperties(Check destCheck,
Annotation annotation)
Copies default properties from annotation to the check. |
|
protected
|
newConstraint(Class<V> constraint,
Class targetType)
Create new constraint. |
|
static ValidationContext |
resolveFor(Class<?> target)
Resolve validation context for provided target class. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,List<Check>> map
| Constructor Detail |
|---|
public ValidationContext()
| Method Detail |
|---|
public void add(Check check)
public void addAll(List<Check> checkList)
public static ValidationContext resolveFor(Class<?> target)
addClassChecks(Class)public void addClassChecks(Class target)
resolveFor(Class)
protected void collectFieldAnnotationChecks(List<Check> annChecks,
Field field)
protected void collectAnnotationChecks(List<Check> annChecks,
Class targetType,
String targetName,
Annotation[] annotations)
protected <V extends ValidationConstraint> V newConstraint(Class<V> constraint,
Class targetType)
throws Exception
Exception
protected void copyDefaultCheckProperties(Check destCheck,
Annotation annotation)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||