KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > webapp > http > portlet > PortletArtifactHack


1 package com.icesoft.faces.webapp.http.portlet;
2
3 import javax.portlet.PortletConfig;
4 import javax.portlet.PortletRequest;
5
6 /**
7  * WARNING! WARNING! WARNING!
8  * <p/>
9  * This class is temporary and should not be relied on as it is extremely likely
10  * not to be the final solution.
11  * <p/>
12  * Because we use a dispatcher to pass requests from the MainPortlet to the
13  * MainServlet, the resulting portlet artifacts (like request, response, etc.)
14  * are wrapped to look like servlet artifacts and certain types and APIs that
15  * are specific to portlets are not available to the developer. As a temporary
16  * solution, we provide this class stored as a request attribute that can be
17  * retrieved.
18  */

19 public class PortletArtifactHack {
20
21     public static final String JavaDoc PORTLET_HACK_KEY =
22             "com.icesoft.faces.portletHack";
23
24     private PortletConfig portletConfig;
25     private PortletRequest portletRequest;
26
27     public PortletArtifactHack(PortletConfig portletConfig,
28             PortletRequest portletRequest) {
29         this.portletConfig = portletConfig;
30         this.portletRequest = portletRequest;
31     }
32
33     public PortletRequest getPortletRequest() {
34         return (this.portletRequest);
35     }
36
37     public PortletConfig getPortletConfig() {
38         return (this.portletConfig);
39     }
40 }
41
Popular Tags