1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.config;
22
23
24
25
26
27
28
29
30
31
32
33 public class ControllerConfig extends BaseConfig {
34
35
36
37
38
39 protected int bufferSize = 4096;
40
41
42
43
44
45 protected String contentType = "text/html";
46
47
48
49
50 protected String catalog = "struts";
51
52
53
54
55 protected String command = "servlet-standard";
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85 protected String forwardPattern = null;
86
87
88
89
90
91
92
93
94
95
96 protected boolean inputForward = false;
97
98
99
100
101
102 protected boolean locale = true;
103
104
105
106
107 protected String maxFileSize = "250M";
108
109
110
111
112 protected String memFileSize = "256K";
113
114
115
116
117
118 protected String multipartClass =
119 "org.apache.struts.upload.CommonsMultipartRequestHandler";
120
121
122
123
124 protected boolean nocache = false;
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155 protected String pagePattern = null;
156
157
158
159
160
161 protected String processorClass =
162 "org.apache.struts.chain.ComposableRequestProcessor";
163
164
165
166
167 protected String tempDir = null;
168
169 public int getBufferSize() {
170 return (this.bufferSize);
171 }
172
173 public void setBufferSize(int bufferSize) {
174 if (configured) {
175 throw new IllegalStateException("Configuration is frozen");
176 }
177
178 this.bufferSize = bufferSize;
179 }
180
181 public String getContentType() {
182 return (this.contentType);
183 }
184
185 public void setContentType(String contentType) {
186 if (configured) {
187 throw new IllegalStateException("Configuration is frozen");
188 }
189
190 this.contentType = contentType;
191 }
192
193 public String getCatalog() {
194 return (this.catalog);
195 }
196
197 public void setCatalog(String catalog) {
198 if (configured) {
199 throw new IllegalStateException("Configuration is frozen");
200 }
201
202 this.catalog = catalog;
203 }
204
205 public String getCommand() {
206 return (this.command);
207 }
208
209 public void setCommand(String command) {
210 if (configured) {
211 throw new IllegalStateException("Configuration is frozen");
212 }
213
214 this.command = command;
215 }
216
217 public String getForwardPattern() {
218 return (this.forwardPattern);
219 }
220
221 public void setForwardPattern(String forwardPattern) {
222 this.forwardPattern = forwardPattern;
223 }
224
225 public boolean getInputForward() {
226 return (this.inputForward);
227 }
228
229 public void setInputForward(boolean inputForward) {
230 this.inputForward = inputForward;
231 }
232
233 public boolean getLocale() {
234 return (this.locale);
235 }
236
237 public void setLocale(boolean locale) {
238 if (configured) {
239 throw new IllegalStateException("Configuration is frozen");
240 }
241
242 this.locale = locale;
243 }
244
245 public String getMaxFileSize() {
246 return (this.maxFileSize);
247 }
248
249 public void setMaxFileSize(String maxFileSize) {
250 if (configured) {
251 throw new IllegalStateException("Configuration is frozen");
252 }
253
254 this.maxFileSize = maxFileSize;
255 }
256
257 public String getMemFileSize() {
258 return (this.memFileSize);
259 }
260
261 public void setMemFileSize(String memFileSize) {
262 if (configured) {
263 throw new IllegalStateException("Configuration is frozen");
264 }
265
266 this.memFileSize = memFileSize;
267 }
268
269 public String getMultipartClass() {
270 return (this.multipartClass);
271 }
272
273 public void setMultipartClass(String multipartClass) {
274 if (configured) {
275 throw new IllegalStateException("Configuration is frozen");
276 }
277
278 this.multipartClass = multipartClass;
279 }
280
281 public boolean getNocache() {
282 return (this.nocache);
283 }
284
285 public void setNocache(boolean nocache) {
286 if (configured) {
287 throw new IllegalStateException("Configuration is frozen");
288 }
289
290 this.nocache = nocache;
291 }
292
293 public String getPagePattern() {
294 return (this.pagePattern);
295 }
296
297 public void setPagePattern(String pagePattern) {
298 this.pagePattern = pagePattern;
299 }
300
301 public String getProcessorClass() {
302 return (this.processorClass);
303 }
304
305 public void setProcessorClass(String processorClass) {
306 if (configured) {
307 throw new IllegalStateException("Configuration is frozen");
308 }
309
310 this.processorClass = processorClass;
311 }
312
313 public String getTempDir() {
314 return (this.tempDir);
315 }
316
317 public void setTempDir(String tempDir) {
318 if (configured) {
319 throw new IllegalStateException("Configuration is frozen");
320 }
321
322 this.tempDir = tempDir;
323 }
324
325
326
327
328
329
330 public String toString() {
331 StringBuffer sb = new StringBuffer("ControllerConfig[");
332
333 sb.append("bufferSize=");
334 sb.append(this.bufferSize);
335
336 if (this.contentType != null) {
337 sb.append(",contentType=");
338 sb.append(this.contentType);
339 }
340
341 if (this.forwardPattern != null) {
342 sb.append(",forwardPattern=");
343 sb.append(this.forwardPattern);
344 }
345
346 sb.append(",inputForward=");
347 sb.append(this.inputForward);
348 sb.append(",locale=");
349 sb.append(this.locale);
350
351 if (this.maxFileSize != null) {
352 sb.append(",maxFileSize=");
353 sb.append(this.maxFileSize);
354 }
355
356 if (this.memFileSize != null) {
357 sb.append(",memFileSize=");
358 sb.append(this.memFileSize);
359 }
360
361 sb.append(",multipartClass=");
362 sb.append(this.multipartClass);
363 sb.append(",nocache=");
364 sb.append(this.nocache);
365
366 if (this.pagePattern != null) {
367 sb.append(",pagePattern=");
368 sb.append(this.pagePattern);
369 }
370
371 sb.append(",processorClass=");
372 sb.append(this.processorClass);
373
374 if (this.tempDir != null) {
375 sb.append(",tempDir=");
376 sb.append(this.tempDir);
377 }
378
379 sb.append("]");
380
381 return (sb.toString());
382 }
383 }