1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.itracker.web.forms;
20
21 import org.apache.struts.action.ActionErrors;
22 import org.apache.struts.action.ActionMapping;
23 import org.apache.struts.validator.ValidatorForm;
24 import org.itracker.model.NameValuePair;
25
26 import javax.servlet.http.HttpServletRequest;
27 import java.util.List;
28 import java.util.Map;
29 import java.util.TreeMap;
30
31
32
33
34
35
36 public class ConfigurationForm extends ValidatorForm {
37
38
39
40 private static final long serialVersionUID = 1L;
41 String action;
42 Integer id;
43 String value;
44 Integer order;
45 String key;
46 String typeKey;
47
48
49 Map<String, String> translations = new TreeMap<>();
50 private Map<NameValuePair, List<NameValuePair>> languages;
51
52
53
54
55
56
57 public ActionErrors validate(ActionMapping mapping,
58 HttpServletRequest request) {
59 ActionErrors errors = super.validate(mapping, request);
60
61 return errors;
62 }
63
64 public String getAction() {
65 return action;
66 }
67
68 public void setAction(String action) {
69 this.action = action;
70 }
71
72 public Integer getId() {
73 return id;
74 }
75
76 public void setId(Integer id) {
77 this.id = id;
78 }
79
80 public String getKey() {
81 return key;
82 }
83
84 public void setKey(String key) {
85 this.key = key;
86 }
87
88 public String getTypeKey() {
89 return typeKey;
90 }
91
92 public void setTypeKey(String typeKey) {
93 this.typeKey = typeKey;
94 }
95
96 public Integer getOrder() {
97 return order;
98 }
99
100 public void setOrder(Integer order) {
101 this.order = order;
102 }
103
104
105 public Map<String, String> getTranslations() {
106 return translations;
107 }
108
109
110 public void setTranslations(Map<String, String> translations) {
111 this.translations = translations;
112 }
113
114 public String getValue() {
115 return value;
116 }
117
118 public void setValue(String value) {
119 this.value = value;
120 }
121
122 public void setLanguages(Map<NameValuePair, List<NameValuePair>> languages) {
123 this.languages = languages;
124 }
125
126 public Map<NameValuePair, List<NameValuePair>> getLanguages() {
127 return languages;
128 }
129 }