1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.portlet; |
16 |
| |
17 |
| import java.io.IOException; |
18 |
| import java.io.OutputStream; |
19 |
| import java.io.PrintWriter; |
20 |
| |
21 |
| import javax.portlet.PortletResponse; |
22 |
| |
23 |
| import org.apache.hivemind.util.Defense; |
24 |
| import org.apache.tapestry.util.ContentType; |
25 |
| import org.apache.tapestry.web.WebResponse; |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| public class PortletWebResponse implements WebResponse |
34 |
| { |
35 |
| private final PortletResponse _portletResponse; |
36 |
| |
37 |
13
| public PortletWebResponse(PortletResponse portletResponse)
|
38 |
| { |
39 |
13
| Defense.notNull(portletResponse, "portletResponse");
|
40 |
| |
41 |
13
| _portletResponse = portletResponse;
|
42 |
| } |
43 |
| |
44 |
2
| public OutputStream getOutputStream(ContentType contentType) throws IOException
|
45 |
| { |
46 |
2
| unsupported("getOutputStream");
|
47 |
| |
48 |
0
| return null;
|
49 |
| } |
50 |
| |
51 |
0
| public PrintWriter getPrintWriter(ContentType contentType) throws IOException
|
52 |
| { |
53 |
0
| unsupported("getPrintWriter");
|
54 |
| |
55 |
0
| return null;
|
56 |
| } |
57 |
| |
58 |
2
| public String encodeURL(String url)
|
59 |
| { |
60 |
2
| return _portletResponse.encodeURL(url);
|
61 |
| } |
62 |
| |
63 |
| |
64 |
1
| public void reset()
|
65 |
| { |
66 |
1
| unsupported("reset");
|
67 |
| } |
68 |
| |
69 |
| |
70 |
0
| public void setContentLength(int contentLength)
|
71 |
| { |
72 |
0
| unsupported("setContentLength");
|
73 |
| } |
74 |
| |
75 |
| |
76 |
| |
77 |
| |
78 |
| |
79 |
1
| public String getNamespace()
|
80 |
| { |
81 |
1
| return "";
|
82 |
| } |
83 |
| |
84 |
3
| protected final void unsupported(String methodName)
|
85 |
| { |
86 |
3
| throw new UnsupportedOperationException(PortletMessages.unsupportedMethod(methodName));
|
87 |
| } |
88 |
| |
89 |
| |
90 |
0
| public void setDateHeader(String string, long date)
|
91 |
| { |
92 |
0
| unsupported("setDateHeader");
|
93 |
| } |
94 |
| |
95 |
| |
96 |
0
| public void setStatus(int status)
|
97 |
| { |
98 |
0
| unsupported("setStatus");
|
99 |
| } |
100 |
| |
101 |
| } |