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.chain.contexts;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26
27
28 /**
29 * <p> Implement <code>ActionContext</code> with empty maps for
30 * <code>applicationScope</code>, <code>sessionScope</code>,
31 * <code>requestScope</code>, and <code>parameterMap</code> properties. </p>
32 */
33 public class MockActionContext extends ActionContextBase {
34 private Map applicationScope = new HashMap();
35 private Map requestScope = new HashMap();
36 private Map sessionScope = new HashMap();
37 private Map parameterMap = new HashMap();
38
39 public Map getApplicationScope() {
40 return applicationScope;
41 }
42
43 public void setApplicationScope(Map applicationScope) {
44 this.applicationScope = applicationScope;
45 }
46
47 public Map getParameterMap() {
48 return parameterMap;
49 }
50
51 public void setParameterMap(Map parameterMap) {
52 this.parameterMap = parameterMap;
53 }
54
55 public Map getRequestScope() {
56 return requestScope;
57 }
58
59 public void setRequestScope(Map requestScope) {
60 this.requestScope = requestScope;
61 }
62
63 public Map getSessionScope() {
64 return sessionScope;
65 }
66
67 public void setSessionScope(Map sessionScope) {
68 this.sessionScope = sessionScope;
69 }
70 }