1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
package org.apache.tiles.request.portlet.delegate; |
22 | |
|
23 | |
import java.util.Collection; |
24 | |
import java.util.Map; |
25 | |
import java.util.Set; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | 0 | public class StateAwareParameterMap implements Map<String, String[]> { |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
private Map<String, String[]> requestMap; |
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
private Map<String, String[]> responseMap; |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
public StateAwareParameterMap(Map<String, String[]> requestMap, |
51 | 13 | Map<String, String[]> responseMap) { |
52 | 13 | this.requestMap = requestMap; |
53 | 13 | this.responseMap = responseMap; |
54 | 13 | } |
55 | |
|
56 | |
@Override |
57 | |
public void clear() { |
58 | 1 | responseMap.clear(); |
59 | 1 | } |
60 | |
|
61 | |
@Override |
62 | |
public boolean containsKey(Object key) { |
63 | 1 | return requestMap.containsKey(key); |
64 | |
} |
65 | |
|
66 | |
@Override |
67 | |
public boolean containsValue(Object value) { |
68 | 1 | return requestMap.containsValue(value); |
69 | |
} |
70 | |
|
71 | |
@Override |
72 | |
public Set<java.util.Map.Entry<String, String[]>> entrySet() { |
73 | 1 | return requestMap.entrySet(); |
74 | |
} |
75 | |
|
76 | |
@Override |
77 | |
public String[] get(Object key) { |
78 | 1 | return requestMap.get(key); |
79 | |
} |
80 | |
|
81 | |
@Override |
82 | |
public boolean isEmpty() { |
83 | 1 | return requestMap.isEmpty(); |
84 | |
} |
85 | |
|
86 | |
@Override |
87 | |
public Set<String> keySet() { |
88 | 1 | return requestMap.keySet(); |
89 | |
} |
90 | |
|
91 | |
@Override |
92 | |
public String[] put(String key, String[] value) { |
93 | 1 | return responseMap.put(key, value); |
94 | |
} |
95 | |
|
96 | |
@Override |
97 | |
public void putAll(Map<? extends String, ? extends String[]> m) { |
98 | 1 | responseMap.putAll(m); |
99 | 1 | } |
100 | |
|
101 | |
@Override |
102 | |
public String[] remove(Object key) { |
103 | 1 | return responseMap.remove(key); |
104 | |
} |
105 | |
|
106 | |
@Override |
107 | |
public int size() { |
108 | 1 | return requestMap.size(); |
109 | |
} |
110 | |
|
111 | |
@Override |
112 | |
public Collection<String[]> values() { |
113 | 1 | return requestMap.values(); |
114 | |
} |
115 | |
} |