001: /******************************************************************************
002: * JBoss, a division of Red Hat *
003: * Copyright 2006, Red Hat Middleware, LLC, and individual *
004: * contributors as indicated by the @authors tag. See the *
005: * copyright.txt in the distribution for a full listing of *
006: * individual contributors. *
007: * *
008: * This is free software; you can redistribute it and/or modify it *
009: * under the terms of the GNU Lesser General Public License as *
010: * published by the Free Software Foundation; either version 2.1 of *
011: * the License, or (at your option) any later version. *
012: * *
013: * This software is distributed in the hope that it will be useful, *
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
016: * Lesser General Public License for more details. *
017: * *
018: * You should have received a copy of the GNU Lesser General Public *
019: * License along with this software; if not, write to the Free *
020: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
021: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
022: ******************************************************************************/package org.jboss.portal.server.servlet;
023:
024: import javax.servlet.RequestDispatcher;
025: import javax.servlet.ServletInputStream;
026: import javax.servlet.http.Cookie;
027: import javax.servlet.http.HttpServletRequest;
028: import javax.servlet.http.HttpSession;
029: import java.io.BufferedReader;
030: import java.io.IOException;
031: import java.io.UnsupportedEncodingException;
032: import java.security.Principal;
033: import java.util.Enumeration;
034: import java.util.Locale;
035: import java.util.Map;
036:
037: /**
038: * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
039: * @version $Revision: 8784 $
040: */
041: public abstract class AbstractDelegatingRequest implements
042: HttpServletRequest {
043:
044: protected abstract HttpServletRequest getDelegate();
045:
046: public String getAuthType() {
047: return getDelegate().getAuthType();
048: }
049:
050: public Cookie[] getCookies() {
051: return getDelegate().getCookies();
052: }
053:
054: public long getDateHeader(String name) {
055: return getDelegate().getDateHeader(name);
056: }
057:
058: public String getHeader(String name) {
059: return getDelegate().getHeader(name);
060: }
061:
062: public Enumeration getHeaders(String name) {
063: return getDelegate().getHeaders(name);
064: }
065:
066: public Enumeration getHeaderNames() {
067: return getDelegate().getHeaderNames();
068: }
069:
070: public int getIntHeader(String name) {
071: return getDelegate().getIntHeader(name);
072: }
073:
074: public String getMethod() {
075: return getDelegate().getMethod();
076: }
077:
078: public String getPathInfo() {
079: return getDelegate().getPathInfo();
080: }
081:
082: public String getPathTranslated() {
083: return getDelegate().getPathTranslated();
084: }
085:
086: public String getContextPath() {
087: return getDelegate().getContextPath();
088: }
089:
090: public String getQueryString() {
091: return getDelegate().getQueryString();
092: }
093:
094: public String getRemoteUser() {
095: return getDelegate().getRemoteUser();
096: }
097:
098: public boolean isUserInRole(String name) {
099: return getDelegate().isUserInRole(name);
100: }
101:
102: public Principal getUserPrincipal() {
103: return getDelegate().getUserPrincipal();
104: }
105:
106: public String getRequestedSessionId() {
107: return getDelegate().getRequestedSessionId();
108: }
109:
110: public String getRequestURI() {
111: return getDelegate().getRequestURI();
112: }
113:
114: public StringBuffer getRequestURL() {
115: return getDelegate().getRequestURL();
116: }
117:
118: public String getServletPath() {
119: return getDelegate().getServletPath();
120: }
121:
122: public HttpSession getSession(boolean b) {
123: return getDelegate().getSession(b);
124: }
125:
126: public HttpSession getSession() {
127: return getDelegate().getSession();
128: }
129:
130: public boolean isRequestedSessionIdValid() {
131: return getDelegate().isRequestedSessionIdValid();
132: }
133:
134: public boolean isRequestedSessionIdFromCookie() {
135: return getDelegate().isRequestedSessionIdFromCookie();
136: }
137:
138: public boolean isRequestedSessionIdFromURL() {
139: return getDelegate().isRequestedSessionIdFromURL();
140: }
141:
142: public boolean isRequestedSessionIdFromUrl() {
143: return getDelegate().isRequestedSessionIdFromUrl();
144: }
145:
146: public Object getAttribute(String name) {
147: return getDelegate().getAttribute(name);
148: }
149:
150: public Enumeration getAttributeNames() {
151: return getDelegate().getAttributeNames();
152: }
153:
154: public String getCharacterEncoding() {
155: return getDelegate().getCharacterEncoding();
156: }
157:
158: public void setCharacterEncoding(String name)
159: throws UnsupportedEncodingException {
160: getDelegate().setCharacterEncoding(name);
161: }
162:
163: public int getContentLength() {
164: return getDelegate().getContentLength();
165: }
166:
167: public String getContentType() {
168: return getDelegate().getContentType();
169: }
170:
171: public ServletInputStream getInputStream() throws IOException {
172: return getDelegate().getInputStream();
173: }
174:
175: public String getParameter(String name) {
176: return getDelegate().getParameter(name);
177: }
178:
179: public Enumeration getParameterNames() {
180: return getDelegate().getParameterNames();
181: }
182:
183: public String[] getParameterValues(String name) {
184: return getDelegate().getParameterValues(name);
185: }
186:
187: public Map getParameterMap() {
188: return getDelegate().getParameterMap();
189: }
190:
191: public String getProtocol() {
192: return getDelegate().getProtocol();
193: }
194:
195: public String getScheme() {
196: return getDelegate().getScheme();
197: }
198:
199: public String getServerName() {
200: return getDelegate().getServerName();
201: }
202:
203: public int getServerPort() {
204: return getDelegate().getServerPort();
205: }
206:
207: public BufferedReader getReader() throws IOException {
208: return getDelegate().getReader();
209: }
210:
211: public String getRemoteAddr() {
212: return getDelegate().getRemoteAddr();
213: }
214:
215: public String getRemoteHost() {
216: return getDelegate().getRemoteHost();
217: }
218:
219: public void setAttribute(String name, Object object) {
220: getDelegate().setAttribute(name, object);
221: }
222:
223: public void removeAttribute(String name) {
224: getDelegate().removeAttribute(name);
225: }
226:
227: public Locale getLocale() {
228: return getDelegate().getLocale();
229: }
230:
231: public Enumeration getLocales() {
232: return getDelegate().getLocales();
233: }
234:
235: public boolean isSecure() {
236: return getDelegate().isSecure();
237: }
238:
239: public RequestDispatcher getRequestDispatcher(String name) {
240: return getDelegate().getRequestDispatcher(name);
241: }
242:
243: public String getRealPath(String name) {
244: return getDelegate().getRealPath(name);
245: }
246:
247: public int getRemotePort() {
248: return getDelegate().getRemotePort();
249: }
250:
251: public String getLocalName() {
252: return getDelegate().getLocalName();
253: }
254:
255: public String getLocalAddr() {
256: return getDelegate().getLocalAddr();
257: }
258:
259: public int getLocalPort() {
260: return getDelegate().getLocalPort();
261: }
262: }
|