|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.clearsilver.jsilver.precompiler.PrecompiledTemplateLoader
public class PrecompiledTemplateLoader
TemplateLoader that stores objects from precompiled Template classes and serves them when asked for them. If not found, it passes the request on to the delegate TemplateLoader.
Constructor Summary | |
---|---|
PrecompiledTemplateLoader(TemplateLoader nextLoader,
Map<Object,String> templateToClassNameMap,
FunctionExecutor globalFunctionExecutor,
AutoEscapeOptions autoEscapeOptions)
|
Method Summary | |
---|---|
Template |
createTemp(String name,
String content,
EscapeMode escapeMode)
We don't cache temporary templates here so we just call delegate TemplateLoader. |
Template |
load(String templateName,
ResourceLoader resourceLoader,
EscapeMode escapeMode)
Load a template from a named resource, with the provided escape mode. |
protected BaseCompiledTemplate |
loadTemplateObject(String className,
ClassLoader classLoader)
|
void |
setTemplateLoaderDelegate(TemplateLoader templateLoaderDelegate)
TemplateLoader that Templates will delegate back to for includes etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrecompiledTemplateLoader(TemplateLoader nextLoader, Map<Object,String> templateToClassNameMap, FunctionExecutor globalFunctionExecutor, AutoEscapeOptions autoEscapeOptions)
Method Detail |
---|
protected BaseCompiledTemplate loadTemplateObject(String className, ClassLoader classLoader)
public void setTemplateLoaderDelegate(TemplateLoader templateLoaderDelegate)
DelegatingTemplateLoader
setTemplateLoaderDelegate
in interface DelegatingTemplateLoader
public Template load(String templateName, ResourceLoader resourceLoader, EscapeMode escapeMode)
TemplateLoader
load
in interface TemplateLoader
templateName
- e.g. some/path/to/template.csresourceLoader
- the ResourceLoader object to use to load any files needed to satisfy this
request.escapeMode
- the type of escaping to apply to the entire template.public Template createTemp(String name, String content, EscapeMode escapeMode)
createTemp
in interface TemplateLoader
name
- A name to identify the temporary template in stack traces.content
- e.g. "Hello <cs var:name >"escapeMode
- the type of escaping to apply to the entire template.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |