KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > portal > generic > context > PortletRequestImpl


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * 3. The end-user documentation included with the redistribution, if
19  * any, must include the following acknowlegement:
20  * "This product includes software developed by the
21  * Caucho Technology (http://www.caucho.com/)."
22  * Alternately, this acknowlegement may appear in the software itself,
23  * if and wherever such third-party acknowlegements normally appear.
24  *
25  * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
26  * endorse or promote products derived from this software without prior
27  * written permission. For written permission, please contact
28  * info@caucho.com.
29  *
30  * 5. Products derived from this software may not be called "Resin"
31  * nor may "Resin" appear in their names without prior written
32  * permission of Caucho Technology.
33  *
34  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
35  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
36  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37  * DISCLAIMED. IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
38  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
39  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
40  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
41  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
43  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
44  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45  *
46  * @author Sam
47  */

48
49
50 package com.caucho.portal.generic.context;
51
52 import javax.portlet.PortalContext;
53 import javax.portlet.PortletMode;
54 import javax.portlet.PortletPreferences;
55 import javax.portlet.PortletRequest;
56 import javax.portlet.PortletSession;
57 import javax.portlet.WindowState;
58 import java.util.Collections JavaDoc;
59 import java.util.Enumeration JavaDoc;
60 import java.util.Locale JavaDoc;
61 import java.util.Map JavaDoc;
62
63 class PortletRequestImpl
64   extends PortalRequestImpl
65   implements PortletRequest
66 {
67   public PortletRequestImpl(ConnectionContext context)
68   {
69     super(context);
70   }
71
72   public WindowState getWindowState()
73   {
74     return _context.getWindowState();
75   }
76   
77   public PortletMode getPortletMode()
78   {
79     return _context.getPortletMode();
80   }
81
82   public Map JavaDoc getParameterMap()
83   {
84     return _context.getRenderParameterMap();
85   }
86
87   public String JavaDoc getParameter(String JavaDoc name)
88   {
89     return _context.getRenderParameter(name);
90   }
91
92   public Enumeration JavaDoc getParameterNames()
93   {
94     return _context.getRenderParameterNames();
95   }
96
97   public String JavaDoc[] getParameterValues(String JavaDoc name)
98   {
99     return _context.getRenderParameterValues(name);
100   }
101
102   public boolean isWindowStateAllowed(WindowState state)
103   {
104     return _context.isWindowStateAllowed(state);
105   }
106
107   public boolean isPortletModeAllowed(PortletMode portletMode)
108   {
109     return _context.isPortletModeAllowed(portletMode);
110   }
111
112   public Enumeration JavaDoc getResponseContentTypes()
113   {
114     return Collections.enumeration(_context.getResponseContentTypesSet());
115   }
116
117   public String JavaDoc getResponseContentType()
118   {
119     return _context.getResponseContentType();
120   }
121
122   public Enumeration JavaDoc getLocales()
123   {
124     return Collections.enumeration(_context.getResponseLocalesSet());
125   }
126
127   public Locale JavaDoc getLocale()
128   {
129     return _context.getResponseLocale();
130   }
131
132   public PortalContext getPortalContext()
133   {
134     return _context.getPortalContext();
135   }
136
137   public PortletPreferences getPreferences()
138   {
139     return _context.getPreferences();
140   }
141
142   public String JavaDoc getContextPath()
143   {
144     return _context.getContextPath();
145   }
146
147   public String JavaDoc getServerName()
148   {
149     return _context.getServerName();
150   }
151
152   public int getServerPort()
153   {
154     return _context.getServerPort();
155   }
156
157   public String JavaDoc getScheme()
158   {
159     return _context.getScheme();
160   }
161
162   public String JavaDoc getAuthType()
163   {
164     return _context.getAuthType();
165   }
166
167   public boolean isSecure()
168   {
169     return _context.isSecure();
170   }
171
172   public String JavaDoc getRequestedSessionId()
173   {
174     return _context.getRequestedSessionId();
175   }
176
177   public boolean isRequestedSessionIdValid()
178   {
179     return _context.isRequestedSessionIdValid();
180   }
181
182   public String JavaDoc getRemoteUser()
183   {
184     return _context.getRemoteUser();
185   }
186
187   public java.security.Principal JavaDoc getUserPrincipal()
188   {
189     return _context.getUserPrincipal();
190   }
191
192   public boolean isUserInRole(String JavaDoc role)
193   {
194     return _context.isUserInRole(role);
195   }
196
197   public String JavaDoc getProperty(String JavaDoc name)
198   {
199     return _context.getProperty(name);
200   }
201
202   public Enumeration JavaDoc getProperties(String JavaDoc name)
203   {
204     return _context.getProperties(name);
205   }
206
207   public Enumeration JavaDoc getPropertyNames()
208   {
209     return _context.getPropertyNames();
210   }
211
212   public Enumeration JavaDoc getAttributeNames()
213   {
214     return _context.getAttributeNames();
215   }
216
217   public Object JavaDoc getAttribute(String JavaDoc name)
218   {
219     return _context.getAttribute(name);
220   }
221
222   public void setAttribute(String JavaDoc name, Object JavaDoc o)
223   {
224     _context.setAttribute(name, o);
225   }
226
227   public void removeAttribute(String JavaDoc name)
228   {
229     _context.removeAttribute(name);
230   }
231
232   public PortletSession getPortletSession()
233   {
234     return _context.getPortletSession();
235   }
236
237   public PortletSession getPortletSession(boolean create)
238   {
239     return _context.getPortletSession(create);
240   }
241 }
242
Popular Tags