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.ServletOutputStream;
025: import javax.servlet.http.Cookie;
026: import javax.servlet.http.HttpServletResponse;
027: import java.io.IOException;
028: import java.io.PrintWriter;
029: import java.util.Locale;
030:
031: /**
032: * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
033: * @version $Revision: 8784 $
034: */
035: public abstract class AbstractDelegatingResponse implements
036: HttpServletResponse {
037:
038: protected abstract HttpServletResponse getDelegate();
039:
040: public void addCookie(Cookie cookie) {
041: getDelegate().addCookie(cookie);
042: }
043:
044: public boolean containsHeader(String name) {
045: return getDelegate().containsHeader(name);
046: }
047:
048: public String encodeURL(String name) {
049: return getDelegate().encodeURL(name);
050: }
051:
052: public String encodeRedirectURL(String name) {
053: return getDelegate().encodeRedirectURL(name);
054: }
055:
056: public String encodeUrl(String name) {
057: return getDelegate().encodeUrl(name);
058: }
059:
060: public String encodeRedirectUrl(String name) {
061: return getDelegate().encodeRedirectUrl(name);
062: }
063:
064: public void sendError(int i, String name) throws IOException {
065: getDelegate().sendError(i, name);
066: }
067:
068: public void sendError(int i) throws IOException {
069: getDelegate().sendError(i);
070: }
071:
072: public void sendRedirect(String name) throws IOException {
073: getDelegate().sendRedirect(name);
074: }
075:
076: public void setDateHeader(String name, long l) {
077: getDelegate().setDateHeader(name, l);
078: }
079:
080: public void addDateHeader(String name, long l) {
081: getDelegate().addDateHeader(name, l);
082: }
083:
084: public void setHeader(String name, String name1) {
085: getDelegate().setHeader(name, name1);
086: }
087:
088: public void addHeader(String name, String name1) {
089: getDelegate().addHeader(name, name1);
090: }
091:
092: public void setIntHeader(String name, int i) {
093: getDelegate().setIntHeader(name, i);
094: }
095:
096: public void addIntHeader(String name, int i) {
097: getDelegate().addIntHeader(name, i);
098: }
099:
100: public void setStatus(int i) {
101: getDelegate().setStatus(i);
102: }
103:
104: public void setStatus(int i, String name) {
105: getDelegate().setStatus(i, name);
106: }
107:
108: public String getCharacterEncoding() {
109: return getDelegate().getCharacterEncoding();
110: }
111:
112: public String getContentType() {
113: return getDelegate().getContentType();
114: }
115:
116: public ServletOutputStream getOutputStream() throws IOException {
117: return getDelegate().getOutputStream();
118: }
119:
120: public PrintWriter getWriter() throws IOException {
121: return getDelegate().getWriter();
122: }
123:
124: public void setCharacterEncoding(String name) {
125: getDelegate().setCharacterEncoding(name);
126: }
127:
128: public void setContentLength(int i) {
129: getDelegate().setContentLength(i);
130: }
131:
132: public void setContentType(String name) {
133: getDelegate().setContentType(name);
134: }
135:
136: public void setBufferSize(int i) {
137: getDelegate().setBufferSize(i);
138: }
139:
140: public int getBufferSize() {
141: return getDelegate().getBufferSize();
142: }
143:
144: public void flushBuffer() throws IOException {
145: getDelegate().flushBuffer();
146: }
147:
148: public void resetBuffer() {
149: getDelegate().resetBuffer();
150: }
151:
152: public boolean isCommitted() {
153: return getDelegate().isCommitted();
154: }
155:
156: public void reset() {
157: getDelegate().reset();
158: }
159:
160: public void setLocale(Locale locale) {
161: getDelegate().setLocale(locale);
162: }
163:
164: public Locale getLocale() {
165: return getDelegate().getLocale();
166: }
167: }
|