1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.chain.web;
17
18
19 import java.util.Map;
20 import org.apache.commons.chain.impl.ContextBase;
21
22
23 /***
24 * <p>Abstract base implementation of {@link Context} that provides web
25 * based applications that use it a "generic" view of HTTP related requests
26 * and responses, without tying the application to a particular underlying
27 * Java API (such as servlets). It is expected that a concrete subclass
28 * of {@link WebContext} for each API (such as
29 * {@link org.apache.commons.chain.web.servlet.ServletWebContext})
30 * will support adapting that particular API's implementation of request
31 * and response objects into this generic framework.</p>
32 *
33 * <p>The characteristics of a web request/response are made visible via
34 * a series of JavaBeans properties (and mapped to read-only attributes
35 * of the same name, as supported by {@link ContextBase}.</p>
36 *
37 * @author Craig R. McClanahan
38 * @version $Revision: 1.6 $ $Date: 2004/11/30 05:52:23 $
39 */
40
41 public abstract class WebContext extends ContextBase {
42
43
44
45
46
47 /***
48 * <p>Return a mutable <code>Map</code> that maps application scope
49 * attribute names to their values.</p>
50 */
51 public abstract Map getApplicationScope();
52
53
54 /***
55 * <p>Return an immutable <code>Map</code> that maps header names to
56 * the first (or only) header value (as a String). Header names must
57 * be matched in a case-insensitive manner.</p>
58 */
59 public abstract Map getHeader();
60
61
62 /***
63 * <p>Return an immutable <code>Map</code> that maps header names to
64 * the set of all values specified in the request (as a String array).
65 * Header names must be matched in a case-insensitive manner.</p>
66 */
67 public abstract Map getHeaderValues();
68
69
70 /***
71 * <p>Return an immutable <code>Map</code> that maps context application
72 * initialization parameters to their values.</p>
73 */
74 public abstract Map getInitParam();
75
76
77 /***
78 * <p>Return an immutable <code>Map</code> that maps request parameter
79 * names to the first (or only) value (as a String).</p>
80 */
81 public abstract Map getParam();
82
83
84 /***
85 * <p>Return an immutable <code>Map</code> that maps request parameter
86 * names to the set of all values (as a String array).</p>
87 */
88 public abstract Map getParamValues();
89
90
91 /***
92 * <p>Return a mutable <code>Map</code> that maps request scope
93 * attribute names to their values.</p>
94 */
95 public abstract Map getRequestScope();
96
97
98 /***
99 * <p>Return a mutable <code>Map</code> that maps session scope
100 * attribute names to their values.</p>
101 */
102 public abstract Map getSessionScope();
103
104
105 }