1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.kernel.portlet;
24  
25  import java.io.IOException;
26  import java.io.OutputStream;
27  import java.io.PrintWriter;
28  
29  import java.util.Locale;
30  
31  import javax.portlet.PortletURL;
32  import javax.portlet.RenderResponse;
33  
34  /**
35   * <a href="RenderResponseWrapper.java.html"><b><i>View Source</i></b></a>
36   *
37   * @author Brian Wing Shun Chan
38   *
39   */
40  public class RenderResponseWrapper
41      extends PortletResponseWrapper implements RenderResponse {
42  
43      public RenderResponseWrapper(RenderResponse res) {
44          super(res);
45  
46          _res = res;
47      }
48  
49      public String getContentType() {
50          return _res.getContentType();
51      }
52  
53      public PortletURL createRenderURL() {
54          return _res.createRenderURL();
55      }
56  
57      public PortletURL createActionURL() {
58          return _res.createActionURL();
59      }
60  
61      public String getNamespace() {
62          return _res.getNamespace();
63      }
64  
65      public void setTitle(String title) {
66          _res.setTitle(title);
67      }
68  
69      public void setContentType(String type) {
70          _res.setContentType(type);
71      }
72  
73      public String getCharacterEncoding() {
74          return _res.getCharacterEncoding();
75      }
76  
77      public PrintWriter getWriter() throws IOException {
78          return _res.getWriter();
79      }
80  
81      public Locale getLocale() {
82          return _res.getLocale();
83      }
84  
85      public void setBufferSize(int size) {
86          _res.setBufferSize(size);
87      }
88  
89      public int getBufferSize() {
90          return _res.getBufferSize();
91      }
92  
93      public void flushBuffer() throws IOException {
94          _res.flushBuffer();
95      }
96  
97      public void resetBuffer() {
98          _res.resetBuffer();
99      }
100 
101     public boolean isCommitted() {
102         return _res.isCommitted();
103     }
104 
105     public void reset() {
106         _res.reset();
107     }
108 
109     public OutputStream getPortletOutputStream() throws IOException {
110         return _res.getPortletOutputStream();
111     }
112 
113     private RenderResponse _res;
114 
115 }