public abstract class ResourceAwareTemplateEngine
extends groovy.text.TemplateEngine
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEAN_ID |
| Constructor and Description |
|---|
ResourceAwareTemplateEngine() |
| Modifier and Type | Method and Description |
|---|---|
groovy.text.Template |
createTemplate(java.io.File file) |
abstract 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.io.Reader reader) |
groovy.text.Template |
createTemplate(org.springframework.core.io.Resource resource)
Creates the specified Template using the given Spring Resource
|
abstract groovy.text.Template |
createTemplate(org.springframework.core.io.Resource resource,
boolean cacheable)
Creates the specified Template using the given Spring Resource
|
groovy.text.Template |
createTemplate(java.lang.String templateText) |
groovy.text.Template |
createTemplate(java.net.URL url) |
abstract groovy.text.Template |
createTemplateForUri(java.lang.String[] uris) |
abstract int |
mapStackLineNumber(java.lang.String url,
int lineNumber) |
public static final java.lang.String BEAN_ID
public groovy.text.Template createTemplate(org.springframework.core.io.Resource resource)
throws java.io.IOException,
java.lang.ClassNotFoundException
resource - The Spring Resource to create the template forjava.io.IOException - Thrown when there was an error reading the Templatejava.lang.ClassNotFoundException - Thrown when there was a problem loading the Template into a classpublic abstract groovy.text.Template createTemplate(org.springframework.core.io.Resource resource,
boolean cacheable)
resource - The Spring Resource to create the template forcacheable - Whether the resource can be cachedjava.io.IOException - Thrown when there was an error reading the Templatejava.lang.ClassNotFoundException - Thrown when there was a problem loading the Template into a classpublic final groovy.text.Template createTemplate(java.io.Reader reader)
throws java.io.IOException
createTemplate in class groovy.text.TemplateEnginejava.io.IOExceptionpublic abstract groovy.text.Template createTemplate(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - The InputStreamjava.io.IOException - Thrown when an IO error occurs reading the streampublic groovy.text.Template createTemplate(java.lang.String templateText)
throws org.codehaus.groovy.control.CompilationFailedException,
java.lang.ClassNotFoundException,
java.io.IOException
createTemplate in class groovy.text.TemplateEngineorg.codehaus.groovy.control.CompilationFailedExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic groovy.text.Template createTemplate(java.io.File file)
throws org.codehaus.groovy.control.CompilationFailedException,
java.lang.ClassNotFoundException,
java.io.IOException
createTemplate in class groovy.text.TemplateEngineorg.codehaus.groovy.control.CompilationFailedExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic groovy.text.Template createTemplate(java.net.URL url)
throws org.codehaus.groovy.control.CompilationFailedException,
java.lang.ClassNotFoundException,
java.io.IOException
createTemplate in class groovy.text.TemplateEngineorg.codehaus.groovy.control.CompilationFailedExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic abstract groovy.text.Template createTemplateForUri(java.lang.String[] uris)
public abstract int mapStackLineNumber(java.lang.String url,
int lineNumber)