Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

freemarker.testcase.models
Class TransformModel1  view TransformModel1 download TransformModel1.java

java.lang.Object
  extended byfreemarker.testcase.models.TransformModel1
All Implemented Interfaces:
freemarker.template.TemplateModel, freemarker.template.TemplateTransformModel

public class TransformModel1
extends java.lang.Object
implements freemarker.template.TemplateTransformModel

A TemplateTransformModel that includes properties. These properties can be set at model construction time, or, for the purposes of this demonstration, can be passed in from a wrapper TemplateMethodModel.

Version:
$Id: TransformModel1.java,v 1.21 2003/01/12 23:40:25 revusky Exp $

Field Summary
private  java.lang.String m_aComment
           
private  boolean m_bAmpersands
           
private  boolean m_bQuotes
           
private  boolean m_bTags
           
private static int READER_BUFFER_SIZE
           
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
TransformModel1()
           
 
Method Summary
 java.io.Writer getWriter(java.io.Writer out, java.util.Map args)
          Returns a writer that will be used by the engine to feed the transformation input to the transform.
 void setAmpersands(boolean bAmpersands)
          Indicates whether we escape ampersands.
 void setComment(java.lang.String aComment)
          Sets a comment for this transformation.
 void setQuotes(boolean bQuotes)
          Indicates whether we escape quotes.
 void setTags(boolean bTags)
          Indicates whether we escape tags.
 void transform(java.io.Reader source, java.io.Writer output)
          Performs a transformation/filter on FreeMarker output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bAmpersands

private boolean m_bAmpersands

m_bQuotes

private boolean m_bQuotes

m_bTags

private boolean m_bTags

m_aComment

private java.lang.String m_aComment

READER_BUFFER_SIZE

private static final int READER_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

TransformModel1

public TransformModel1()
Method Detail

getWriter

public java.io.Writer getWriter(java.io.Writer out,
                                java.util.Map args)
Description copied from interface: freemarker.template.TemplateTransformModel
Returns a writer that will be used by the engine to feed the transformation input to the transform. Each call to this method must return a new instance of the writer so that the transformation is thread-safe.

Specified by:
getWriter in interface freemarker.template.TemplateTransformModel

setAmpersands

public void setAmpersands(boolean bAmpersands)
Indicates whether we escape ampersands. This property can be set either while the model is being constructed, or via a property passed in through a TemplateMethodModel.


setQuotes

public void setQuotes(boolean bQuotes)
Indicates whether we escape quotes. This property can be set either while the model is being constructed, or via a property passed in through a TemplateMethodModel.


setTags

public void setTags(boolean bTags)
Indicates whether we escape tags. This property can be set either while the model is being constructed, or via a property passed in through a TemplateMethodModel.


setComment

public void setComment(java.lang.String aComment)
Sets a comment for this transformation. This property can be set either while the model is being constructed, or via a property passed in through a TemplateMethodModel.


transform

public void transform(java.io.Reader source,
                      java.io.Writer output)
               throws java.io.IOException
Performs a transformation/filter on FreeMarker output.