public class MustacheResourceTemplateLoader extends Object implements com.samskivert.mustache.Mustache.TemplateLoader, ResourceLoaderAware
Mustache.TemplateLoader
is needed in the Mustache.Compiler
when you want to render
partials (i.e. tiles-like features).Mustache
,
Resource
Constructor and Description |
---|
MustacheResourceTemplateLoader() |
MustacheResourceTemplateLoader(String prefix,
String suffix) |
Modifier and Type | Method and Description |
---|---|
Reader |
getTemplate(String name)
Returns a reader for the template with the supplied name.
|
void |
setCharset(String charSet)
Set the charset.
|
void |
setResourceLoader(ResourceLoader resourceLoader)
Set the resource loader.
|
public void setCharset(String charSet)
charSet
- the charsetpublic void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader
in interface ResourceLoaderAware
resourceLoader
- the resource loaderpublic Reader getTemplate(String name) throws Exception
com.samskivert.mustache.Mustache.TemplateLoader
getTemplate
in interface com.samskivert.mustache.Mustache.TemplateLoader
Exception
- if the template could not be loaded for any reason.