001 // Copyright 2006 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014 package org.apache.tapestry.portlet.multipart;
015
016 import java.io.BufferedReader;
017 import java.io.IOException;
018 import java.io.InputStream;
019 import java.io.UnsupportedEncodingException;
020 import java.security.Principal;
021 import java.util.Enumeration;
022 import java.util.Locale;
023 import java.util.Map;
024
025 import javax.portlet.ActionRequest;
026 import javax.portlet.PortalContext;
027 import javax.portlet.PortletMode;
028 import javax.portlet.PortletPreferences;
029 import javax.portlet.PortletSession;
030 import javax.portlet.WindowState;
031
032 /**
033 * @author Raphael Jean
034 */
035 public class ActionRequestWrapper extends Object implements ActionRequest
036 {
037
038 private ActionRequest wrapped;
039
040 public ActionRequestWrapper(ActionRequest request)
041 {
042 wrapped = request;
043 }
044
045 public InputStream getPortletInputStream()
046 throws IOException
047 {
048 return wrapped.getPortletInputStream();
049 }
050
051 public void setCharacterEncoding(String arg0)
052 throws UnsupportedEncodingException
053 {
054 wrapped.setCharacterEncoding(arg0);
055 }
056
057 public BufferedReader getReader()
058 throws IOException
059 {
060 return wrapped.getReader();
061 }
062
063 public String getCharacterEncoding()
064 {
065 return wrapped.getCharacterEncoding();
066 }
067
068 public String getContentType()
069 {
070 return wrapped.getContentType();
071 }
072
073 public int getContentLength()
074 {
075 return wrapped.getContentLength();
076 }
077
078 public boolean isWindowStateAllowed(WindowState arg0)
079 {
080 return wrapped.isWindowStateAllowed(arg0);
081 }
082
083 public boolean isPortletModeAllowed(PortletMode arg0)
084 {
085 return wrapped.isPortletModeAllowed(arg0);
086 }
087
088 public PortletMode getPortletMode()
089 {
090 return wrapped.getPortletMode();
091 }
092
093 public WindowState getWindowState()
094 {
095 return wrapped.getWindowState();
096 }
097
098 public PortletPreferences getPreferences()
099 {
100 return wrapped.getPreferences();
101 }
102
103 public PortletSession getPortletSession()
104 {
105 return wrapped.getPortletSession();
106 }
107
108 public PortletSession getPortletSession(boolean arg0)
109 {
110 return wrapped.getPortletSession(arg0);
111 }
112
113 public String getProperty(String arg0)
114 {
115 return wrapped.getProperty(arg0);
116 }
117
118 public Enumeration getProperties(String arg0)
119 {
120 return wrapped.getProperties(arg0);
121 }
122
123 public Enumeration getPropertyNames()
124 {
125 return wrapped.getPropertyNames();
126 }
127
128 public PortalContext getPortalContext()
129 {
130 return wrapped.getPortalContext();
131 }
132
133 public String getAuthType()
134 {
135 return wrapped.getAuthType();
136 }
137
138 public String getContextPath()
139 {
140 return wrapped.getContextPath();
141 }
142
143 public String getRemoteUser()
144 {
145 return wrapped.getRemoteUser();
146 }
147
148 public Principal getUserPrincipal()
149 {
150 return wrapped.getUserPrincipal();
151 }
152
153 public boolean isUserInRole(String arg0)
154 {
155 return wrapped.isUserInRole(arg0);
156 }
157
158 public Object getAttribute(String arg0)
159 {
160 return wrapped.getAttribute(arg0);
161 }
162
163 public Enumeration getAttributeNames()
164 {
165 return wrapped.getAttributeNames();
166 }
167
168 public String getParameter(String arg0)
169 {
170 return wrapped.getParameter(arg0);
171 }
172
173 public Enumeration getParameterNames()
174 {
175 return wrapped.getParameterNames();
176 }
177
178 public String[] getParameterValues(String arg0)
179 {
180 return wrapped.getParameterValues(arg0);
181 }
182
183 public Map getParameterMap()
184 {
185 return wrapped.getParameterMap();
186 }
187
188 public boolean isSecure()
189 {
190 return wrapped.isSecure();
191 }
192
193 public void setAttribute(String arg0, Object arg1)
194 {
195 wrapped.setAttribute(arg0, arg1);
196 }
197
198 public void removeAttribute(String arg0)
199 {
200 wrapped.removeAttribute(arg0);
201 }
202
203 public String getRequestedSessionId()
204 {
205 return wrapped.getRequestedSessionId();
206 }
207
208 public boolean isRequestedSessionIdValid()
209 {
210 return wrapped.isRequestedSessionIdValid();
211 }
212
213 public String getResponseContentType()
214 {
215 return wrapped.getResponseContentType();
216 }
217
218 public Enumeration getResponseContentTypes()
219 {
220 return wrapped.getResponseContentTypes();
221 }
222
223 public Locale getLocale()
224 {
225 return wrapped.getLocale();
226 }
227
228 public Enumeration getLocales()
229 {
230 return wrapped.getLocales();
231 }
232
233 public String getScheme()
234 {
235 return wrapped.getScheme();
236 }
237
238 public String getServerName()
239 {
240 return wrapped.getServerName();
241 }
242
243 public int getServerPort()
244 {
245 return wrapped.getServerPort();
246 }
247
248 protected ActionRequest getRequest()
249 {
250 return wrapped;
251 }
252
253 }