Groovy Documentation

org.codehaus.groovy.grails.support
[Java] Class ResourceAwareTemplateEngine

java.lang.Object
  groovy.text.TemplateEngine
      org.codehaus.groovy.grails.support.ResourceAwareTemplateEngine

public abstract class ResourceAwareTemplateEngine
extends groovy.text.TemplateEngine

An abstract TemplateEngine that extends the default Groovy TemplateEngine (

Authors:
Graeme Rocher
See Also:
groovy.text.TemplateEngine
Since:
0.4

Created: Feb 22, 2007 Time: 6:37:08 PM


Method Summary
groovy.text.Template createTemplate(Resource resource)

Creates the specified Template using the given Spring Resource

groovy.text.Template createTemplate(Resource resource, boolean cacheable)

Creates the specified Template using the given Spring Resource

groovy.text.Template createTemplate(java.io.Reader reader)

groovy.text.Template createTemplate(java.io.InputStream inputStream)

Unlike groovy.text.TemplateEngine, implementors need to provide an implementation that operates with an InputStream

groovy.text.Template createTemplate(java.lang.String templateText)

groovy.text.Template createTemplate(java.io.File file)

groovy.text.Template createTemplate(java.net.URL url)

 
Methods inherited from class groovy.text.TemplateEngine
groovy.text.TemplateEngine#createTemplate(java.io.Reader), groovy.text.TemplateEngine#createTemplate(java.lang.String), groovy.text.TemplateEngine#createTemplate(java.io.File), groovy.text.TemplateEngine#createTemplate(java.net.URL), groovy.text.TemplateEngine#wait(), groovy.text.TemplateEngine#wait(long), groovy.text.TemplateEngine#wait(long, int), groovy.text.TemplateEngine#equals(java.lang.Object), groovy.text.TemplateEngine#toString(), groovy.text.TemplateEngine#hashCode(), groovy.text.TemplateEngine#getClass(), groovy.text.TemplateEngine#notify(), groovy.text.TemplateEngine#notifyAll()
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

createTemplate

public groovy.text.Template createTemplate(Resource resource)
Creates the specified Template using the given Spring Resource
throws:
IOException Thrown when there was an error reading the Template
throws:
ClassNotFoundException Thrown when there was a problem loading the Template into a class
Parameters:
resource - The Spring Resource to create the template for
Returns:
A Template instance


createTemplate

public groovy.text.Template createTemplate(Resource resource, boolean cacheable)
Creates the specified Template using the given Spring Resource
throws:
IOException Thrown when there was an error reading the Template
throws:
ClassNotFoundException Thrown when there was a problem loading the Template into a class
Parameters:
resource - The Spring Resource to create the template for
cacheable - Whether the resource can be cached
Returns:
A Template instance


createTemplate

public final groovy.text.Template createTemplate(java.io.Reader reader)


createTemplate

public groovy.text.Template createTemplate(java.io.InputStream inputStream)
Unlike groovy.text.TemplateEngine, implementors need to provide an implementation that operates with an InputStream
throws:
IOException Thrown when an IO error occurs reading the stream
Parameters:
inputStream - The InputStream
Returns:
A Template instance


createTemplate

@Override
public groovy.text.Template createTemplate(java.lang.String templateText)


createTemplate

@Override
public groovy.text.Template createTemplate(java.io.File file)


createTemplate

@Override
public groovy.text.Template createTemplate(java.net.URL url)


 

Groovy Documentation