01: /*
02: * Created on 27-Feb-2006
03: */
04: package uk.org.ponder.rsf.request;
05:
06: import java.util.Map;
07:
08: /** Interface defining (almost) all of the information required by RSF from
09: * our request provider (whether Servlet/Portlet &c). The remaining information
10: * comes though BaseURLProvider, and if in use, a session dependence through
11: * InSessionTokenRequestState.
12: * @author Antranig Basman (antranig@caret.cam.ac.uk)
13: */
14:
15: public interface EarlyRequestParser {
16: /** Identifies this request as part of a "render" cycle - for a simple HTTP
17: * servlet, corresponds to a GET, a JSR168 "render" request or a WSRP
18: * getMarkup request.
19: */
20: public static final String RENDER_REQUEST = "render";
21: /** Identifies this request as part of an "action" cycle - for a simple
22: * HTTP servlet, corresponds to a POST, a JSR168 "processAction" request
23: * or a WSRP performBlockingInteration request.
24: */
25: public static final String ACTION_REQUEST = "action";
26:
27: /** Identifies this environment as a javax.servlet Servlets environment **/
28: public static final String SERVLET_ENVIRONMENT = "servlet";
29:
30: /** Identifies this environment as a JSR 168 javax.portlet Portlets environment **/
31: public static final String PORTLET_168_ENVIRONMENT = "portlet-168";
32:
33: /** Identifies this environment as a JSR 286 javax.portlet Portlets environment **/
34: public static final String PORTLET_286_ENVIRONMENT = "portlet-286";
35:
36: /** The parameter map from the request */
37: public Map getRequestMap();
38:
39: /** The pathinfo as returned from the request. This INCLUDES an initial
40: * slash but no final slash.
41: */
42: public String getPathInfo();
43:
44: /**
45: * A factory method for a String encoding the nature of the current request
46: * cycle, either RENDER_REQUEST or ACTION_REQUEST.
47: */
48: public String getRequestType();
49:
50: /** Returns a (possibly empty) Map of parameter names to Spring MultipartFile
51: * for the current request */
52:
53: public Map getMultipartMap();
54:
55: /** Returns one of the <code>_ENVIRONMENT</code> Strings above, if the environment
56: * can be determined to be one of the known standard types, or <code>null</code> otherwise.
57: */
58: public String getEnvironmentType();
59: }
|