public abstract class TemplateManager extends Object
Constructor and Description |
---|
TemplateManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
merge(Map<String,Object> values,
String templateName,
String layout,
String format,
Writer writer)
Merges values with templates and writes a merged template to the writer.
|
abstract void |
merge(Map<String,Object> values,
String template,
Writer writer)
Same as
merge(java.util.Map, String, String, String, java.io.Writer) , but uses default layout and default format (html). |
protected String |
sessionId()
Session ID from underlying session, or null if session does not exist.
|
abstract void |
setServletContext(javax.servlet.ServletContext ctx)
A template manager might need a context to be able to load templates from it.
|
abstract void |
setTemplateLocation(String templateLocation) |
public abstract void merge(Map<String,Object> values, String templateName, String layout, String format, Writer writer)
values
- values to be merged.templateName
- name of template in format: dir/template
without
file extension. This is to support multiple template technologies in the future.writer
- Writer to write results to.layout
- name of layout, null
if no layout is needed.public abstract void merge(Map<String,Object> values, String template, Writer writer)
merge(java.util.Map, String, String, String, java.io.Writer)
, but uses default layout and default format (html).public abstract void setServletContext(javax.servlet.ServletContext ctx)
ctx
- servlet contextpublic abstract void setTemplateLocation(String templateLocation)
templateLocation
- this can be absolute or relative.protected String sessionId()
Copyright © 2020 JavaLite. All rights reserved.