1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.model;
17
18
19
20
21
22
23 public class ValidationError {
24 private Class clazz;
25 private String propertyName;
26 private String message;
27
28 public ValidationError(Class clazz, String message) {
29 this.clazz = clazz;
30 this.message = message;
31 }
32
33 public ValidationError(Class clazz, String propertyName, String message) {
34 this.clazz = clazz;
35 this.propertyName = propertyName;
36 this.message = message;
37 }
38
39 public Class getClazz() {
40 return clazz;
41 }
42
43 public String getPropertyName() {
44 return propertyName;
45 }
46
47 public String getMessage() {
48 return message;
49 }
50
51 @Override
52 public String toString() {
53 return getClass().getSimpleName()
54 + " (Class: " + getClazz().getSimpleName()
55 + ", propertyName: " + getPropertyName() + "): "
56 + message;
57 }
58 }