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