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

public abstract class TobagoResponseWriter
extends ResponseWriter

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

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)
           
 void endJavascript()
           
abstract  void flush()
           
 String getContentTypeWithCharSet()
           
abstract  String getStyleClasses()
          Deprecated. 
 void startElement(String name)
          Deprecated. Use startElement(name, null) instead.
abstract  void startElement(String name, UIComponent component)
           
 void startJavascript()
           
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()
          Deprecated. since Tobago 1.5.0
 void writeClassAttribute(Classes classes)
          Write the class attribute.
 void writeClassAttribute(String cssClass)
          Deprecated. since Tobago 1.5.0
 void writeClassAttribute(StyleClasses styleClasses)
          Deprecated. since Tobago 1.5.0
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.
 void writeStyleAttribute(String style)
          Deprecated. since 1.5.0, use writeStyleAttribute(Style) instead.
 void writeStyleAttribute(Style 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 property as text.
 
Methods inherited from class javax.faces.context.ResponseWriter
endDocument, getCharacterEncoding, getContentType, startDocument, writeText, 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

@Deprecated
public void writeClassAttribute(String cssClass)
                         throws IOException
Deprecated. since Tobago 1.5.0

Write the class attribute. The value will not escaped.

Throws:
IOException

writeClassAttribute

@Deprecated
public void writeClassAttribute(StyleClasses styleClasses)
                         throws IOException
Deprecated. since Tobago 1.5.0

Write the class attribute. The value will not escaped.

Throws:
IOException

writeClassAttribute

public void writeClassAttribute(Classes classes)
                         throws IOException
Write the class attribute. The value will not escaped.
Note: For backward compatibility the value of the Attribute Attributes.STYLE_CLASS will be inserted additionally. This function will be removed in later releases.

Parameters:
classes - The abstract representation of the css class string, normally created by the renderer.
Throws:
IOException

getStyleClasses

@Deprecated
public abstract String getStyleClasses()
Deprecated. 


writeClassAttribute

@Deprecated
public abstract void writeClassAttribute()
                                  throws IOException
Deprecated. since Tobago 1.5.0

Write the class attribute. The value will not escaped.

Throws:
IOException

writeStyleAttribute

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

Throws:
IOException

writeStyleAttribute

@Deprecated
public void writeStyleAttribute(String style)
                         throws IOException
Deprecated. since 1.5.0, use writeStyleAttribute(Style) instead.

Write the style attribute. The value will not escaped.

Throws:
IOException

writeJavascript

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

endJavascript

public void endJavascript()
                   throws IOException
Throws:
IOException

startJavascript

public void startJavascript()
                     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 property as text. The text will be escaped.

Throws:
IOException

getContentTypeWithCharSet

public String getContentTypeWithCharSet()


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