01: package uk.org.ponder.rsf.request;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05:
06: /** A default concrete implementation of EarlyRequestParser that is a simple
07: * repository for set values.
08: * @author Raymond Chan (raymond@caret.cam.ac.uk)
09: *
10: */
11: public class DynamicStreamEarlyRequestParser implements
12: EarlyRequestParser {
13:
14: private String pathInfo;
15:
16: private Map requestMap = null;
17:
18: public void setRequestMap(Map requestMap) {
19: this .requestMap = requestMap;
20: }
21:
22: /*
23: * A parameter map from which request parameters can be read. RSF expects
24: * this to be the standard map of String to String[].
25: */
26: public Map getRequestMap() {
27: return requestMap;
28: }
29:
30: /*
31: * This INCLUDES an initial slash but no final slash,
32: * e.g. "/thingy/foobar"
33: */
34: public void setPathInfo(String pathInfo) {
35: this .pathInfo = pathInfo;
36: }
37:
38: /*
39: * This INCLUDES an initial slash but no final slash,
40: * e.g. "/thingy/foobar"
41: */
42: public String getPathInfo() {
43: return pathInfo;
44: }
45:
46: /*
47: * A factory method for a String encoding the nature of the current request
48: * cycle, either ViewParameters.RENDER_REQUEST
49: * or ViewParameters.ACTION_REQUEST.
50: *
51: * We always handle Render Requests at the moment (i.e. pass to IKAT);
52: * this implies that if an HTTP Request is used to generate this, it
53: * should be a GET request, NOT a POST.
54: */
55: public String getRequestType() {
56: return EarlyRequestParser.RENDER_REQUEST;
57: }
58:
59: public Map getMultipartMap() {
60: return new HashMap();
61: }
62:
63: public String getEnvironmentType() {
64: return null;
65: }
66:
67: }
|