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 public class ControllerConfig extends BaseConfig {
31 private static final long serialVersionUID = 7704474362520651283L;
32
33
34
35
36
37
38 protected int bufferSize = 4096;
39
40
41
42
43 protected String contentType = "text/html";
44
45
46
47
48 protected String catalog = "struts";
49
50
51
52
53 protected String command = "servlet-standard";
54
55
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 protected String forwardPattern = null;
84
85
86
87
88
89
90
91
92
93
94 protected boolean inputForward = false;
95
96
97
98
99 protected boolean locale = true;
100
101
102
103
104 protected String maxSize = "256M";
105
106
107
108
109 protected String maxFileSize = "250M";
110
111
112
113
114 protected String maxStringLen = "4K";
115
116
117
118
119
120 protected long fileCountMax = -1;
121
122
123
124
125 protected String memFileSize = "256K";
126
127
128
129
130
131 protected String multipartClass =
132 "org.apache.struts.upload.CommonsMultipartRequestHandler";
133
134
135
136
137 protected boolean nocache = false;
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168 protected String pagePattern = null;
169
170
171
172
173
174 protected String processorClass =
175 "org.apache.struts.chain.ComposableRequestProcessor";
176
177
178
179
180 protected String tempDir = null;
181
182 public int getBufferSize() {
183 return (this.bufferSize);
184 }
185
186 public void setBufferSize(int bufferSize) {
187 if (configured) {
188 throw new IllegalStateException("Configuration is frozen");
189 }
190
191 this.bufferSize = bufferSize;
192 }
193
194 public String getContentType() {
195 return (this.contentType);
196 }
197
198 public void setContentType(String contentType) {
199 if (configured) {
200 throw new IllegalStateException("Configuration is frozen");
201 }
202
203 this.contentType = contentType;
204 }
205
206 public String getCatalog() {
207 return (this.catalog);
208 }
209
210 public void setCatalog(String catalog) {
211 if (configured) {
212 throw new IllegalStateException("Configuration is frozen");
213 }
214
215 this.catalog = catalog;
216 }
217
218 public String getCommand() {
219 return (this.command);
220 }
221
222 public void setCommand(String command) {
223 if (configured) {
224 throw new IllegalStateException("Configuration is frozen");
225 }
226
227 this.command = command;
228 }
229
230 public String getForwardPattern() {
231 return (this.forwardPattern);
232 }
233
234 public void setForwardPattern(String forwardPattern) {
235 this.forwardPattern = forwardPattern;
236 }
237
238 public boolean getInputForward() {
239 return (this.inputForward);
240 }
241
242 public void setInputForward(boolean inputForward) {
243 this.inputForward = inputForward;
244 }
245
246 public boolean getLocale() {
247 return (this.locale);
248 }
249
250 public void setLocale(boolean locale) {
251 if (configured) {
252 throw new IllegalStateException("Configuration is frozen");
253 }
254
255 this.locale = locale;
256 }
257
258 public String getMaxSize() {
259 return (this.maxSize);
260 }
261
262 public void setMaxSize(String maxSize) {
263 if (configured) {
264 throw new IllegalStateException("Configuration is frozen");
265 }
266
267 this.maxSize = maxSize;
268 }
269
270 public String getMaxFileSize() {
271 return (this.maxFileSize);
272 }
273
274 public void setMaxFileSize(String maxFileSize) {
275 if (configured) {
276 throw new IllegalStateException("Configuration is frozen");
277 }
278
279 this.maxFileSize = maxFileSize;
280 }
281
282 public String getMaxStringLen() {
283 return (this.maxStringLen);
284 }
285
286 public void setMaxStringLen(String maxStringLen) {
287 if (configured) {
288 throw new IllegalStateException("Configuration is frozen");
289 }
290
291 this.maxStringLen = maxStringLen;
292 }
293
294 public long getFileCountMax() {
295 return (this.fileCountMax);
296 }
297
298 public void setFileCountMax(long fileCountMax) {
299 if (configured) {
300 throw new IllegalStateException("Configuration is frozen");
301 }
302
303 this.fileCountMax = fileCountMax;
304 }
305
306 public String getMemFileSize() {
307 return (this.memFileSize);
308 }
309
310 public void setMemFileSize(String memFileSize) {
311 if (configured) {
312 throw new IllegalStateException("Configuration is frozen");
313 }
314
315 this.memFileSize = memFileSize;
316 }
317
318 public String getMultipartClass() {
319 return (this.multipartClass);
320 }
321
322 public void setMultipartClass(String multipartClass) {
323 if (configured) {
324 throw new IllegalStateException("Configuration is frozen");
325 }
326
327 this.multipartClass = multipartClass;
328 }
329
330 public boolean getNocache() {
331 return (this.nocache);
332 }
333
334 public void setNocache(boolean nocache) {
335 if (configured) {
336 throw new IllegalStateException("Configuration is frozen");
337 }
338
339 this.nocache = nocache;
340 }
341
342 public String getPagePattern() {
343 return (this.pagePattern);
344 }
345
346 public void setPagePattern(String pagePattern) {
347 this.pagePattern = pagePattern;
348 }
349
350 public String getProcessorClass() {
351 return (this.processorClass);
352 }
353
354 public void setProcessorClass(String processorClass) {
355 if (configured) {
356 throw new IllegalStateException("Configuration is frozen");
357 }
358
359 this.processorClass = processorClass;
360 }
361
362 public String getTempDir() {
363 return (this.tempDir);
364 }
365
366 public void setTempDir(String tempDir) {
367 if (configured) {
368 throw new IllegalStateException("Configuration is frozen");
369 }
370
371 this.tempDir = tempDir;
372 }
373
374
375
376
377
378
379 public String toString() {
380 StringBuilder sb = new StringBuilder("ControllerConfig[");
381
382 sb.append("bufferSize=");
383 sb.append(this.bufferSize);
384
385 if (this.contentType != null) {
386 sb.append(",contentType=");
387 sb.append(this.contentType);
388 }
389
390 if (this.forwardPattern != null) {
391 sb.append(",forwardPattern=");
392 sb.append(this.forwardPattern);
393 }
394
395 sb.append(",inputForward=");
396 sb.append(this.inputForward);
397 sb.append(",locale=");
398 sb.append(this.locale);
399
400 if (this.maxFileSize != null) {
401 sb.append(",maxFileSize=");
402 sb.append(this.maxFileSize);
403 }
404
405 sb.append("fileCountMax=");
406 sb.append(this.fileCountMax);
407
408 if (this.memFileSize != null) {
409 sb.append(",memFileSize=");
410 sb.append(this.memFileSize);
411 }
412
413 sb.append(",multipartClass=");
414 sb.append(this.multipartClass);
415 sb.append(",nocache=");
416 sb.append(this.nocache);
417
418 if (this.pagePattern != null) {
419 sb.append(",pagePattern=");
420 sb.append(this.pagePattern);
421 }
422
423 sb.append(",processorClass=");
424 sb.append(this.processorClass);
425
426 if (this.tempDir != null) {
427 sb.append(",tempDir=");
428 sb.append(this.tempDir);
429 }
430
431 sb.append("]");
432
433 return (sb.toString());
434 }
435 }