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 | |
|
34 | |
public class PortletWebResponse implements WebResponse |
35 | |
{ |
36 | |
|
37 | |
private final PortletResponse _portletResponse; |
38 | |
|
39 | |
public PortletWebResponse(PortletResponse portletResponse) |
40 | 0 | { |
41 | 0 | Defense.notNull(portletResponse, "portletResponse"); |
42 | |
|
43 | 0 | _portletResponse = portletResponse; |
44 | 0 | } |
45 | |
|
46 | |
public OutputStream getOutputStream(ContentType contentType) |
47 | |
throws IOException |
48 | |
{ |
49 | 0 | unsupported("getOutputStream"); |
50 | |
|
51 | 0 | return null; |
52 | |
} |
53 | |
|
54 | |
public PrintWriter getPrintWriter(ContentType contentType) |
55 | |
throws IOException |
56 | |
{ |
57 | 0 | unsupported("getPrintWriter"); |
58 | |
|
59 | 0 | return null; |
60 | |
} |
61 | |
|
62 | |
public String encodeURL(String url) |
63 | |
{ |
64 | 0 | return _portletResponse.encodeURL(url); |
65 | |
} |
66 | |
|
67 | |
|
68 | |
public void reset() |
69 | |
{ |
70 | 0 | unsupported("reset"); |
71 | 0 | } |
72 | |
|
73 | |
|
74 | |
public void setContentLength(int contentLength) |
75 | |
{ |
76 | 0 | unsupported("setContentLength"); |
77 | 0 | } |
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
public String getNamespace() |
84 | |
{ |
85 | 0 | return ""; |
86 | |
} |
87 | |
|
88 | |
protected final void unsupported(String methodName) |
89 | |
{ |
90 | 0 | throw new UnsupportedOperationException(PortletMessages |
91 | |
.unsupportedMethod(methodName)); |
92 | |
} |
93 | |
|
94 | |
|
95 | |
public void setDateHeader(String string, long date) |
96 | |
{ |
97 | 0 | unsupported("setDateHeader"); |
98 | 0 | } |
99 | |
|
100 | |
|
101 | |
public void setStatus(int status) |
102 | |
{ |
103 | 0 | unsupported("setStatus"); |
104 | 0 | } |
105 | |
|
106 | |
|
107 | |
public void setHeader(String name, String value) |
108 | |
{ |
109 | 0 | unsupported("setHeader"); |
110 | 0 | } |
111 | |
|
112 | |
|
113 | |
public void setIntHeader(String name, int value) |
114 | |
{ |
115 | 0 | unsupported("setIntHeader"); |
116 | 0 | } |
117 | |
|
118 | |
|
119 | |
public void sendError(int statusCode, String message) |
120 | |
throws IOException |
121 | |
{ |
122 | 0 | unsupported("sendError"); |
123 | 0 | } |
124 | |
|
125 | |
} |