public class MarkupTemplateEngine extends TemplateEngine
StreamingMarkupBuilder
to generate XML/XHTML.Modifier and Type | Class and Description |
---|---|
static class |
MarkupTemplateEngine.CachingTemplateResolver
A template resolver which avoids calling
ClassLoader.getResource(String) if a template path already has
been queried before. |
static class |
MarkupTemplateEngine.DefaultTemplateResolver |
static class |
MarkupTemplateEngine.TemplateResource |
Constructor and Description |
---|
MarkupTemplateEngine() |
MarkupTemplateEngine(java.lang.ClassLoader parentLoader,
java.io.File templateDirectory,
TemplateConfiguration tplConfig)
Convenience constructor to build a template engine which searches for templates into a directory
|
MarkupTemplateEngine(java.lang.ClassLoader parentLoader,
TemplateConfiguration tplConfig) |
MarkupTemplateEngine(java.lang.ClassLoader parentLoader,
TemplateConfiguration tplConfig,
TemplateResolver resolver) |
MarkupTemplateEngine(TemplateConfiguration tplConfig) |
Modifier and Type | Method and Description |
---|---|
Template |
createTemplate(java.io.Reader reader) |
Template |
createTemplate(java.io.Reader reader,
java.lang.String sourceName) |
Template |
createTemplate(java.net.URL resource) |
Template |
createTemplateByPath(java.lang.String templatePath) |
Template |
createTypeCheckedModelTemplate(java.io.Reader reader,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
Template |
createTypeCheckedModelTemplate(java.io.Reader reader,
java.lang.String sourceName,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
Template |
createTypeCheckedModelTemplate(java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
Template |
createTypeCheckedModelTemplate(java.lang.String source,
java.lang.String sourceName,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
Template |
createTypeCheckedModelTemplate(java.net.URL resource,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
Template |
createTypeCheckedModelTemplateByPath(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.String> modelTypes) |
CompilerConfiguration |
getCompilerConfiguration() |
TemplateConfiguration |
getTemplateConfiguration() |
GroovyClassLoader |
getTemplateLoader() |
java.net.URL |
resolveTemplate(java.lang.String templatePath) |
createTemplate, createTemplate
public MarkupTemplateEngine()
public MarkupTemplateEngine(TemplateConfiguration tplConfig)
public MarkupTemplateEngine(java.lang.ClassLoader parentLoader, TemplateConfiguration tplConfig)
public MarkupTemplateEngine(java.lang.ClassLoader parentLoader, TemplateConfiguration tplConfig, TemplateResolver resolver)
public MarkupTemplateEngine(java.lang.ClassLoader parentLoader, java.io.File templateDirectory, TemplateConfiguration tplConfig)
templateDirectory
- directory where to find templatestplConfig
- template engine configurationpublic Template createTemplate(java.io.Reader reader) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
createTemplate
in class TemplateEngine
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTemplate(java.io.Reader reader, java.lang.String sourceName) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTemplateByPath(java.lang.String templatePath) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplate(java.lang.String source, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplate(java.lang.String source, java.lang.String sourceName, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplate(java.io.Reader reader, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplate(java.io.Reader reader, java.lang.String sourceName, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplateByPath(java.lang.String templatePath, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTemplate(java.net.URL resource) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
createTemplate
in class TemplateEngine
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public Template createTypeCheckedModelTemplate(java.net.URL resource, java.util.Map<java.lang.String,java.lang.String> modelTypes) throws CompilationFailedException, java.lang.ClassNotFoundException, java.io.IOException
CompilationFailedException
java.lang.ClassNotFoundException
java.io.IOException
public GroovyClassLoader getTemplateLoader()
public CompilerConfiguration getCompilerConfiguration()
public TemplateConfiguration getTemplateConfiguration()
public java.net.URL resolveTemplate(java.lang.String templatePath) throws java.io.IOException
java.io.IOException