1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.s1;
23
24 import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
25 import org.apache.struts.config.ExceptionConfig;
26
27 /***
28 * Wrapper for a Struts 1.x ExceptionConfig based on an XWork ExceptionMappingConfig. Using a
29 * wrapper object allows us to be explicit about what is and isn't implemented.
30 */
31 class WrapperExceptionConfig extends ExceptionConfig {
32
33 private ExceptionMappingConfig delegate;
34
35 public WrapperExceptionConfig(ExceptionMappingConfig delegate) {
36 this.delegate = delegate;
37 freeze();
38 }
39
40 public String getBundle() {
41 throw new UnsupportedOperationException("NYI");
42 }
43
44 public String getHandler() {
45 throw new UnsupportedOperationException("NYI");
46 }
47
48 public String getKey() {
49 throw new UnsupportedOperationException("NYI");
50 }
51
52 public String getPath() {
53 throw new UnsupportedOperationException("NYI");
54 }
55
56 public String getScope() {
57 throw new UnsupportedOperationException("NYI");
58 }
59
60 public String getType() {
61 return delegate.getExceptionClassName();
62 }
63
64 public String toString() {
65 return "wrapper -> " + delegate.toString();
66 }
67 }