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(ClassLoader parentLoader,
File templateDirectory,
TemplateConfiguration tplConfig)
Convenience constructor to build a template engine which searches for templates into a directory
|
MarkupTemplateEngine(ClassLoader parentLoader,
TemplateConfiguration tplConfig) |
MarkupTemplateEngine(ClassLoader parentLoader,
TemplateConfiguration tplConfig,
TemplateResolver resolver) |
MarkupTemplateEngine(TemplateConfiguration tplConfig) |
Modifier and Type | Method and Description |
---|---|
Template |
createTemplate(Reader reader) |
Template |
createTemplate(Reader reader,
String sourceName) |
Template |
createTemplate(URL resource) |
Template |
createTemplateByPath(String templatePath) |
Template |
createTypeCheckedModelTemplate(Reader reader,
Map<String,String> modelTypes) |
Template |
createTypeCheckedModelTemplate(Reader reader,
String sourceName,
Map<String,String> modelTypes) |
Template |
createTypeCheckedModelTemplate(String source,
Map<String,String> modelTypes) |
Template |
createTypeCheckedModelTemplate(String source,
String sourceName,
Map<String,String> modelTypes) |
Template |
createTypeCheckedModelTemplate(URL resource,
Map<String,String> modelTypes) |
Template |
createTypeCheckedModelTemplateByPath(String templatePath,
Map<String,String> modelTypes) |
CompilerConfiguration |
getCompilerConfiguration() |
TemplateConfiguration |
getTemplateConfiguration() |
GroovyClassLoader |
getTemplateLoader() |
URL |
resolveTemplate(String templatePath) |
createTemplate, createTemplate
public MarkupTemplateEngine()
public MarkupTemplateEngine(TemplateConfiguration tplConfig)
public MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration tplConfig)
public MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration tplConfig, TemplateResolver resolver)
public MarkupTemplateEngine(ClassLoader parentLoader, File templateDirectory, TemplateConfiguration tplConfig)
templateDirectory
- directory where to find templatestplConfig
- template engine configurationpublic Template createTemplate(Reader reader) throws CompilationFailedException, ClassNotFoundException, IOException
createTemplate
in class TemplateEngine
CompilationFailedException
ClassNotFoundException
IOException
public Template createTemplate(Reader reader, String sourceName) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTemplateByPath(String templatePath) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTypeCheckedModelTemplate(String source, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTypeCheckedModelTemplate(String source, String sourceName, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTypeCheckedModelTemplate(Reader reader, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTypeCheckedModelTemplate(Reader reader, String sourceName, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTypeCheckedModelTemplateByPath(String templatePath, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public Template createTemplate(URL resource) throws CompilationFailedException, ClassNotFoundException, IOException
createTemplate
in class TemplateEngine
CompilationFailedException
ClassNotFoundException
IOException
public Template createTypeCheckedModelTemplate(URL resource, Map<String,String> modelTypes) throws CompilationFailedException, ClassNotFoundException, IOException
public GroovyClassLoader getTemplateLoader()
public CompilerConfiguration getCompilerConfiguration()
public TemplateConfiguration getTemplateConfiguration()
public URL resolveTemplate(String templatePath) throws IOException
IOException