1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2.oval.interceptor;
22
23 import net.sf.oval.constraint.Length;
24 import net.sf.oval.constraint.NotEmpty;
25 import net.sf.oval.constraint.NotNull;
26 import com.opensymphony.xwork2.ActionSupport;
27
28 public class SimpleField extends ActionSupport{
29 @NotNull()
30 @NotEmpty
31 @Length(max = 3)
32 private String name;
33 private boolean validateCalled;
34 private boolean validateExecuteCalled;
35
36 public String getName() {
37 return name;
38 }
39
40 public void setName(String name) {
41 this.name = name;
42 }
43
44 public void validate() {
45 this.validateCalled = true;
46 }
47
48 public void validateExecute() {
49 this.validateExecuteCalled = true;
50 }
51
52 public boolean isValidateCalled() {
53 return validateCalled;
54 }
55
56 public boolean isValidateExecuteCalled() {
57 return validateExecuteCalled;
58 }
59 }