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

Quick Search    Search Deep

com.xpn.xwiki.render.groovy
Class GroovyTemplateEngine.SimpleTemplate  view GroovyTemplateEngine.SimpleTemplate download GroovyTemplateEngine.SimpleTemplate.java

java.lang.Object
  extended bycom.xpn.xwiki.render.groovy.GroovyTemplateEngine.SimpleTemplate
Enclosing class:
GroovyTemplateEngine

private static class GroovyTemplateEngine.SimpleTemplate
extends java.lang.Object


Field Summary
private  Binding binding
           
private  java.util.Map map
           
private  Script script
           
 
Constructor Summary
private GroovyTemplateEngine.SimpleTemplate()
           
 
Method Summary
private  void endScript(java.io.StringWriter sw)
           
private  void groovyExpression(java.io.Reader reader, java.io.StringWriter sw)
          Closes the currently open write and writes out the following text as a GString expression until it reaches an end %>.
private  void groovySection(java.io.Reader reader, java.io.StringWriter sw)
          Closes the currently open write and writes the following text as normal Groovy script code until it reaches an end %>.
 Writable make()
           
 Writable make(java.util.Map map)
           
private  java.lang.String parse(java.io.Reader reader)
          Parse the text document looking for <% or <%= and then call out to the appropriate handler, otherwise copy the text directly into the script while escaping quotes.
 void setBinding(java.util.Map map)
          Set the binding for the template.
private  void startScript(java.io.StringWriter sw)
           
 java.lang.String toString()
          Convert the template and binding into a result String.
 java.io.Writer writeTo(java.io.Writer writer)
          Write the template document with the set binding applied to the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

script

private Script script

binding

private Binding binding

map

private java.util.Map map
Constructor Detail

GroovyTemplateEngine.SimpleTemplate

private GroovyTemplateEngine.SimpleTemplate()
Method Detail

setBinding

public void setBinding(java.util.Map map)
Set the binding for the template. Keys will be converted to Strings.


writeTo

public java.io.Writer writeTo(java.io.Writer writer)
                       throws java.io.IOException
Write the template document with the set binding applied to the writer.


toString

public java.lang.String toString()
Convert the template and binding into a result String.


parse

private java.lang.String parse(java.io.Reader reader)
                        throws java.io.IOException
Parse the text document looking for <% or <%= and then call out to the appropriate handler, otherwise copy the text directly into the script while escaping quotes.


startScript

private void startScript(java.io.StringWriter sw)

endScript

private void endScript(java.io.StringWriter sw)

groovyExpression

private void groovyExpression(java.io.Reader reader,
                              java.io.StringWriter sw)
                       throws java.io.IOException
Closes the currently open write and writes out the following text as a GString expression until it reaches an end %>.


groovySection

private void groovySection(java.io.Reader reader,
                           java.io.StringWriter sw)
                    throws java.io.IOException
Closes the currently open write and writes the following text as normal Groovy script code until it reaches an end %>.


make

public Writable make()

make

public Writable make(java.util.Map map)