01: package com.icesoft.faces.webapp.http.portlet;
02:
03: import javax.portlet.PortletConfig;
04: import javax.portlet.RenderRequest;
05: import javax.portlet.RenderResponse;
06:
07: /**
08: * Because we are using a RequestDispatcher to bridge portlet handling into our servlet
09: * based framework, we "lose" some of the characteristics of the Portlet API. When
10: * the dispatched call arrives at the ICEfaces MainServlet, the request and response
11: * objects are wrapped as servlet versions and no longer accessible as portlet types.
12: *
13: * What we currently do, then, is save instances of those things that the portlet
14: * developer might want to access and make them accessible on the other side of
15: * the dispatched call. This class is simply the envelope they are carried in.
16: */
17: public class PortletArtifactWrapper {
18:
19: public static final String PORTLET_ARTIFACT_KEY = "com.icesoft.faces.portlet.artifact";
20:
21: private PortletConfig portletConfig;
22: private RenderRequest request;
23: private RenderResponse response;
24:
25: public PortletArtifactWrapper(PortletConfig portletConfig,
26: RenderRequest request, RenderResponse response) {
27: this .portletConfig = portletConfig;
28: this .request = request;
29: this .response = response;
30: }
31:
32: public RenderRequest getRequest() {
33: return this .request;
34: }
35:
36: public RenderResponse getResponse() {
37: return response;
38: }
39:
40: public PortletConfig getPortletConfig() {
41: return (this.portletConfig);
42: }
43: }
|