001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.servlet;
016    
017    import java.io.IOException;
018    import java.io.PrintWriter;
019    
020    import java.util.Collection;
021    import java.util.Locale;
022    
023    import javax.servlet.ServletOutputStream;
024    import javax.servlet.http.Cookie;
025    import javax.servlet.http.HttpServletResponse;
026    
027    /**
028     * @author Shuyang Zhou
029     */
030    public class StubHttpServletResponse implements HttpServletResponse {
031    
032            @Override
033            public void addCookie(Cookie cookie) {
034                    throw new UnsupportedOperationException();
035            }
036    
037            @Override
038            public void addDateHeader(String name, long value) {
039                    throw new UnsupportedOperationException();
040            }
041    
042            @Override
043            public void addHeader(String name, String value) {
044                    throw new UnsupportedOperationException();
045            }
046    
047            @Override
048            public void addIntHeader(String name, int value) {
049                    throw new UnsupportedOperationException();
050            }
051    
052            @Override
053            public boolean containsHeader(String name) {
054                    throw new UnsupportedOperationException();
055            }
056    
057            @Override
058            public String encodeRedirectUrl(String url) {
059                    throw new UnsupportedOperationException();
060            }
061    
062            @Override
063            public String encodeRedirectURL(String url) {
064                    throw new UnsupportedOperationException();
065            }
066    
067            @Override
068            public String encodeUrl(String string) {
069                    throw new UnsupportedOperationException();
070            }
071    
072            @Override
073            public String encodeURL(String string) {
074                    throw new UnsupportedOperationException();
075            }
076    
077            @Override
078            @SuppressWarnings("unused")
079            public void flushBuffer() throws IOException {
080                    throw new UnsupportedOperationException();
081            }
082    
083            @Override
084            public int getBufferSize() {
085                    throw new UnsupportedOperationException();
086            }
087    
088            @Override
089            public String getCharacterEncoding() {
090                    throw new UnsupportedOperationException();
091            }
092    
093            @Override
094            public String getContentType() {
095                    throw new UnsupportedOperationException();
096            }
097    
098            @Override
099            public String getHeader(String name) {
100                    throw new UnsupportedOperationException();
101            }
102    
103            @Override
104            public Collection<String> getHeaderNames() {
105                    throw new UnsupportedOperationException();
106            }
107    
108            @Override
109            public Collection<String> getHeaders(String name) {
110                    throw new UnsupportedOperationException();
111            }
112    
113            @Override
114            public Locale getLocale() {
115                    throw new UnsupportedOperationException();
116            }
117    
118            @Override
119            @SuppressWarnings("unused")
120            public ServletOutputStream getOutputStream() throws IOException {
121                    throw new UnsupportedOperationException();
122            }
123    
124            @Override
125            public int getStatus() {
126                    throw new UnsupportedOperationException();
127            }
128    
129            @Override
130            @SuppressWarnings("unused")
131            public PrintWriter getWriter() throws IOException {
132                    throw new UnsupportedOperationException();
133            }
134    
135            @Override
136            public boolean isCommitted() {
137                    throw new UnsupportedOperationException();
138            }
139    
140            @Override
141            public void reset() {
142                    throw new UnsupportedOperationException();
143            }
144    
145            @Override
146            public void resetBuffer() {
147                    throw new UnsupportedOperationException();
148            }
149    
150            @Override
151            @SuppressWarnings("unused")
152            public void sendError(int status) throws IOException {
153                    throw new UnsupportedOperationException();
154            }
155    
156            @Override
157            @SuppressWarnings("unused")
158            public void sendError(int status, String message) throws IOException {
159                    throw new UnsupportedOperationException();
160            }
161    
162            @Override
163            @SuppressWarnings("unused")
164            public void sendRedirect(String location) throws IOException {
165                    throw new UnsupportedOperationException();
166            }
167    
168            @Override
169            public void setBufferSize(int bufferSzie) {
170                    throw new UnsupportedOperationException();
171            }
172    
173            @Override
174            public void setCharacterEncoding(String characterEncoding) {
175                    throw new UnsupportedOperationException();
176            }
177    
178            @Override
179            public void setContentLength(int contentLength) {
180                    throw new UnsupportedOperationException();
181            }
182    
183            @Override
184            public void setContentType(String contentType) {
185                    throw new UnsupportedOperationException();
186            }
187    
188            @Override
189            public void setDateHeader(String name, long value) {
190                    throw new UnsupportedOperationException();
191            }
192    
193            @Override
194            public void setHeader(String name, String value) {
195                    throw new UnsupportedOperationException();
196            }
197    
198            @Override
199            public void setIntHeader(String name, int value) {
200                    throw new UnsupportedOperationException();
201            }
202    
203            @Override
204            public void setLocale(Locale locale) {
205                    throw new UnsupportedOperationException();
206            }
207    
208            @Override
209            public void setStatus(int status) {
210                    throw new UnsupportedOperationException();
211            }
212    
213            @Override
214            public void setStatus(int status, String message) {
215                    throw new UnsupportedOperationException();
216            }
217    
218    }