1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.internal.webapp;
21
22 import org.apache.myfaces.tobago.component.Attributes;
23 import org.apache.myfaces.tobago.internal.util.Deprecation;
24 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
25 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
26
27 import javax.faces.component.UIComponent;
28 import javax.faces.context.ResponseWriter;
29 import java.io.IOException;
30 import java.io.Writer;
31
32 public class TobagoResponseWriterWrapper extends TobagoResponseWriter {
33
34 private ResponseWriter responseWriter;
35
36 public TobagoResponseWriterWrapper(ResponseWriter responseWriter) {
37 this.responseWriter = responseWriter;
38 }
39
40 public void startElement(String name, UIComponent component) throws IOException {
41 responseWriter.startElement(name, component);
42 }
43
44 public void endElement(String name) throws IOException {
45 responseWriter.endElement(name);
46 }
47
48
49 public void write(String string) throws IOException {
50 responseWriter.write(string);
51 }
52
53 public void writeComment(Object comment) throws IOException {
54 responseWriter.writeComment(comment);
55 }
56
57 public ResponseWriter cloneWithWriter(Writer writer) {
58 return responseWriter.cloneWithWriter(writer);
59 }
60
61 @Deprecated
62 public void writeAttribute(String name, Object value, String property) throws IOException {
63 responseWriter.writeAttribute(name, value, property);
64 }
65
66 @Deprecated
67 public void writeText(Object text, String property) throws IOException {
68 responseWriter.writeText(text, property);
69 }
70
71 public void flush() throws IOException {
72 responseWriter.flush();
73 }
74
75 public void writeAttribute(String name, String value, boolean escape) throws IOException {
76 responseWriter.writeAttribute(name, value, null);
77 }
78
79 @Override
80 @Deprecated
81 public String getStyleClasses() {
82 return null;
83 }
84
85
86
87
88 @Deprecated
89 public void writeClassAttribute() throws IOException {
90 Deprecation.LOG.warn("Please use writeClassAttribute(org.apache.myfaces.tobago.renderkit.css.Classes)");
91 responseWriter.writeAttribute(HtmlAttributes.CLASS, null, Attributes.STYLE_CLASS);
92 }
93
94 public String getContentType() {
95 return responseWriter.getContentType();
96 }
97
98 public String getCharacterEncoding() {
99 return responseWriter.getCharacterEncoding();
100 }
101
102 public void startDocument() throws IOException {
103 responseWriter.startDocument();
104 }
105
106 public void endDocument() throws IOException {
107 responseWriter.endDocument();
108 }
109
110 public void writeURIAttribute(String name, Object value, String property) throws IOException {
111 responseWriter.writeURIAttribute(name, value, property);
112 }
113
114 public void writeText(char[] text, int off, int len) throws IOException {
115 responseWriter.writeText(text, off, len);
116 }
117
118 public void write(char[] chars, int i, int i1) throws IOException {
119 responseWriter.write(chars, i, i1);
120 }
121
122 public void close() throws IOException {
123 responseWriter.close();
124 }
125 }