1 package org.nuiton.validator.bean;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import org.nuiton.validator.NuitonValidatorScope;
25
26 import java.util.EventObject;
27
28
29
30
31
32
33
34 public abstract class AbstractValidatorEvent<V> extends EventObject {
35
36 private static final long serialVersionUID = 1L;
37
38
39 protected String field;
40
41
42 protected NuitonValidatorScope scope;
43
44 protected String[] messagestoAdd;
45
46 protected String[] messagestoDelete;
47
48 public abstract Object getBean();
49
50 public AbstractValidatorEvent(V source,
51 String field,
52 NuitonValidatorScope scope,
53 String[] messagestoAdd,
54 String[] messagestoDelete) {
55 super(source);
56 this.field = field;
57 this.scope = scope;
58 this.messagestoAdd = messagestoAdd;
59 this.messagestoDelete = messagestoDelete;
60 }
61
62 @Override
63 public V getSource() {
64 return (V) super.getSource();
65 }
66
67 public String[] getMessagesToAdd() {
68 return messagestoAdd;
69 }
70
71 public String[] getMessagesToDelete() {
72 return messagestoDelete;
73 }
74
75 public NuitonValidatorScope getScope() {
76 return scope;
77 }
78
79 public String getField() {
80 return field;
81 }
82
83 }