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 org.apache.struts.action.ActionForward;
21 import com.opensymphony.xwork2.config.entities.ResultConfig;
22
23 /***
24 * Wrapper for a Struts 1.x ActionForward based on an XWork ResultConfig. Using a wrapper object
25 * allows us to be explicit about what is and isn't implemented.
26 */
27 class WrapperActionForward extends ActionForward {
28
29 private ResultConfig delegate;
30
31 public WrapperActionForward(ResultConfig delegate) {
32 super(delegate.getName());
33 this.delegate = delegate;
34 freeze();
35 }
36
37 public String getName() {
38 return delegate.getName();
39 }
40
41 public String getPath() {
42 throw new UnsupportedOperationException("NYI");
43 }
44
45 public String getModule() {
46 throw new UnsupportedOperationException("NYI");
47 }
48
49 public boolean getRedirect() {
50 throw new UnsupportedOperationException("NYI");
51 }
52
53 public String toString() {
54 return "wrapper -> " + delegate.toString();
55 }
56 }