org.apache.myfaces.tobago.webapp
Class TobagoResponseWriter

java.lang.Object
  extended by java.io.Writer
      extended by javax.faces.context.ResponseWriter
          extended by org.apache.myfaces.tobago.webapp.TobagoResponseWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
TobagoResponseWriterImpl, TobagoResponseWriterWrapper

public abstract class TobagoResponseWriter
extends ResponseWriter

This provides an alternative ResponseWriter interfaces, which allows optimizations. E. g. some attributes needed to to be escaped.

User: lofwyr Date: 08.05.2007 13:51:43


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
TobagoResponseWriter()
           
 
Method Summary
abstract  ResponseWriter cloneWithWriter(Writer writer)
           
abstract  void endElement(String name)
           
abstract  void flush()
           
 String getContentTypeWithCharSet()
           
 void startElement(String name)
          Deprecated. Use startElement(name, null) instead.
abstract  void startElement(String name, UIComponent component)
           
abstract  void write(String string)
           
 void writeAttribute(String name, boolean on)
          Writes a boolean attribute.
 void writeAttribute(String name, int number)
          Writes a integer attribute.
abstract  void writeAttribute(String name, Object value, String property)
          Deprecated. Should not directly called via this interface. There is be a special method which might be better.
abstract  void writeAttribute(String name, String string, boolean escape)
          Writes a string attribute.
 void writeAttributeFromComponent(String name, String property)
          Writes a propery as attribute.
abstract  void writeClassAttribute()
          Write the class attribute.
 void writeClassAttribute(String cssClass)
          Write the class attribute.
 void writeClassAttribute(StyleClasses styleClasses)
          Write the class attribute.
abstract  void writeComment(Object comment)
           
 void writeIdAttribute(String id)
          Write the id attribute.
 void writeJavascript(String script)
           
 void writeNameAttribute(String name)
          Write the name attribute.
abstract  void writeStyleAttribute()
          Write the style attribute.
 void writeStyleAttribute(HtmlStyleMap style)
          Write the style attribute.
 void writeStyleAttribute(String style)
          Write the style attribute.
abstract  void writeText(Object text, String property)
          Deprecated. Should not directly called via this interface. There is be a special method which might be better.
 void writeText(String text)
          Write text content.
 void writeTextFromComponent(String property)
          Writes a propery as text.
 
Methods inherited from class javax.faces.context.ResponseWriter
endDocument, getCharacterEncoding, getContentType, startDocument, writeText, writeURIAttribute
 
Methods inherited from class java.io.Writer
append, append, append, close, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TobagoResponseWriter

public TobagoResponseWriter()
Method Detail

startElement

public abstract void startElement(String name,
                                  UIComponent component)
                           throws IOException
Specified by:
startElement in class ResponseWriter
Throws:
IOException

startElement

@Deprecated
public void startElement(String name)
                  throws IOException
Deprecated. Use startElement(name, null) instead.

Throws:
IOException

endElement

public abstract void endElement(String name)
                         throws IOException
Specified by:
endElement in class ResponseWriter
Throws:
IOException

write

public abstract void write(String string)
                    throws IOException
Overrides:
write in class Writer
Throws:
IOException

writeComment

public abstract void writeComment(Object comment)
                           throws IOException
Specified by:
writeComment in class ResponseWriter
Throws:
IOException

cloneWithWriter

public abstract ResponseWriter cloneWithWriter(Writer writer)
Specified by:
cloneWithWriter in class ResponseWriter

writeAttribute

@Deprecated
public abstract void writeAttribute(String name,
                                               Object value,
                                               String property)
                             throws IOException
Deprecated. Should not directly called via this interface. There is be a special method which might be better.

Specified by:
writeAttribute in class ResponseWriter
Throws:
IOException

writeText

@Deprecated
public abstract void writeText(Object text,
                                          String property)
                        throws IOException
Deprecated. Should not directly called via this interface. There is be a special method which might be better.

Specified by:
writeText in class ResponseWriter
Throws:
IOException

flush

public abstract void flush()
                    throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class ResponseWriter
Throws:
IOException

writeAttribute

public abstract void writeAttribute(String name,
                                    String string,
                                    boolean escape)
                             throws IOException
Writes a string attribute. The renderer may set escape=false to switch of escaping of the string, if it is not necessary.

Throws:
IOException

writeAttribute

public void writeAttribute(String name,
                           boolean on)
                    throws IOException
Writes a boolean attribute. The value will not escaped.

Throws:
IOException

writeAttribute

public void writeAttribute(String name,
                           int number)
                    throws IOException
Writes a integer attribute. The value will not escaped.

Throws:
IOException

writeAttributeFromComponent

public void writeAttributeFromComponent(String name,
                                        String property)
                                 throws IOException
Writes a propery as attribute. The value will be escaped.

Throws:
IOException

writeIdAttribute

public void writeIdAttribute(String id)
                      throws IOException
Write the id attribute. The value will not escaped.

Throws:
IOException

writeNameAttribute

public void writeNameAttribute(String name)
                        throws IOException
Write the name attribute. The value will not escaped.

Throws:
IOException

writeClassAttribute

public void writeClassAttribute(String cssClass)
                         throws IOException
Write the class attribute. The value will not escaped.

Throws:
IOException

writeClassAttribute

public void writeClassAttribute(StyleClasses styleClasses)
                         throws IOException
Write the class attribute. The value will not escaped.

Throws:
IOException

writeClassAttribute

public abstract void writeClassAttribute()
                                  throws IOException
Write the class attribute. The value will not escaped.

Throws:
IOException

writeStyleAttribute

public void writeStyleAttribute(HtmlStyleMap style)
                         throws IOException
Write the style attribute. The value will not escaped.

Throws:
IOException

writeStyleAttribute

public void writeStyleAttribute(String style)
                         throws IOException
Write the style attribute. The value will not escaped.

Throws:
IOException

writeStyleAttribute

public abstract void writeStyleAttribute()
                                  throws IOException
Write the style attribute. The value will not escaped.

Throws:
IOException

writeJavascript

public void writeJavascript(String script)
                     throws IOException
Throws:
IOException

writeText

public void writeText(String text)
               throws IOException
Write text content. The text will be escaped.

Throws:
IOException

writeTextFromComponent

public void writeTextFromComponent(String property)
                            throws IOException
Writes a propery as text. The text will be escaped.

Throws:
IOException

getContentTypeWithCharSet

public String getContentTypeWithCharSet()


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.