1 package javax.validation;
2
3 /***
4 * Describe a constraint validation defect
5 *
6 * TODO add pointers to the metadata?
7 *
8 */
9 public interface InvalidConstraint<T> {
10 /***
11 * Error message
12 */
13 String getMessage();
14
15 /***
16 * Root bean being validated validated
17 */
18 T getRootBean();
19
20 /***
21 * Bean type being validated
22 */
23 Class getBeanClass();
24
25 /***
26 * The value failing to pass the constraint
27 */
28 Object getValue();
29
30 /***
31 * the property path to the value from <code>rootBean</code> Null if the
32 * value is the rootBean itself
33 */
34 String getPropertyPath();
35
36 /***
37 * return the list of groups that the triggered constraint applies on and
38 * witch also are within the list of groups requested for validation
39 * (directly or through a group sequence) TODO: considering removal, if you
40 * think it's important, speak up
41 */
42 String[] getGroups();
43 }