1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scaffold.util;
18
19
20 import java.io.Serializable;
21 import org.apache.commons.scaffold.lang.Tokens;
22
23
24
25
26
27
28
29
30
31
32
33 public class BizResponseImpl implements Serializable,BizResponse {
34
35
36
37
38
39
40
41 private String name = null;
42
43
44
45 public String getName() {
46 return this.name;
47 }
48
49
50
51 public void setName(String name) {
52 this.name = name;
53 }
54
55
56
57
58
59 private String scope = Tokens.REQUEST;
60
61
62
63 public String getScope() {
64 return this.scope;
65 }
66
67
68
69 public void setScope(String scope) {
70 this.scope = scope;
71 }
72
73
74
75
76
77 private boolean singleForm = false;
78
79
80
81 public boolean isSingleForm() {
82 return this.singleForm;
83 }
84
85
86
87 public void setSingleForm(boolean singleForm) {
88 this.singleForm = singleForm;
89 }
90
91
92
93
94
95 private boolean exposed = true;
96
97
98
99 public boolean isExposed() {
100 return this.exposed;
101 }
102
103
104
105 public void setExposed(boolean exposed) {
106 this.exposed = exposed;
107 }
108
109
110
111
112
113 private Object data = null;
114
115
116
117 public Object getData() {
118 return this.data;
119 }
120
121
122
123 public void setData(Object data) {
124 this.data = data;
125 }
126
127
128
129 public boolean isData() {
130 return (getData()!=null);
131 }
132
133
134
135
136
137 protected boolean aggregate = false;
138
139
140
141 public boolean isAggregate() {
142 return aggregate;
143 }
144
145
146
147 public void setAggregate(boolean aggregate) {
148 this.aggregate = aggregate;
149 }
150
151
152
153
154
155 private Messages messages = new MessagesImpl();
156
157
158
159 public boolean isMessages() {
160
161 Messages messages = getMessages();
162
163 if (null==messages) return false;
164
165 return !(messages.isEmpty());
166
167 }
168
169
170
171 public void addMessage(Message message, String property) {
172 Messages messages = getMessages();
173 messages.add(property,message);
174 }
175
176
177
178 public void addMessage(Message message) {
179 addMessage(message, Messages.GLOBAL_MESSAGE_KEY);
180 }
181
182
183
184 public Messages getMessages() {
185 return this.messages;
186 }
187
188
189
190 public void setMessages(Messages messages) {
191 this.messages = messages;
192 }
193
194
195
196
197
198 private String dispatch = null;
199
200
201
202 public String getDispatch() {
203 return (this.dispatch);
204 }
205
206
207
208 public void setDispatch(String dispatch) {
209 this.dispatch = dispatch;
210 }
211
212
213
214 public boolean isDispatch() {
215 return (getDispatch()!=null);
216 }
217
218
219
220
221
222 private boolean dispatchPath = false;
223
224
225
226 public boolean isDispatchPath() {
227 return this.dispatchPath;
228 }
229
230
231
232 public void setDispatchPath(boolean dispatchPath) {
233 this.dispatchPath = dispatchPath;
234 }
235
236
237
238
239
240 protected Scroller scroller = null;
241
242
243
244 public void setScroller(Scroller scroller){
245 this.scroller = scroller;
246 }
247
248
249
250 public Scroller getScroller() {
251 return this.scroller;
252 }
253
254
255
256
257
258
259
260
261 public BizResponseImpl() {
262 super();
263 }
264
265
266
267
268
269
270
271 public BizResponseImpl(Object data) {
272
273 super();
274 setData(data);
275
276 }
277
278
279
280
281
282
283
284
285 public BizResponseImpl(Object data, boolean singleForm) {
286
287 super();
288 setData(data);
289 setSingleForm(singleForm);
290
291 }
292
293
294
295
296
297
298
299 public BizResponseImpl(String dispatch) {
300
301 super();
302 setDispatch(dispatch);
303
304 }
305
306 }