It is based on singleton model. The path gives the location of the patterns (should terminate by a file separator). The API getHTMLFile (patternName, variables) allow to get the HTML file from a pattern and a list of variables. The default implementation use the freemarker template manager. See freemarker for more information. Inside the pattern, the variables are tagged by ${}.
Definition at line 59 of file TemplateManager.java.
Public Member Functions | |
void | setTemplateRootPath (String rootPath) |
void | cacheUnavailable (CacheEvent e) |
void | elementUpdated (CacheEvent e) |
void | elementUpdateFailed (CacheEvent e) |
void | elementRemoved (CacheEvent e) |
TemplateModelRoot | getTemplateModelRoot () |
initialize template structure for this request. | |
Template | getTemplate (String relatifPath) |
return the template with specified relative name. | |
void | sendResponse (String templateName, TemplateModelRoot modelRoot, HttpServletResponse res) throws java.io.IOException, TemplateNotFoundException |
Static Public Member Functions | |
static TemplateManager | getManager () |
Protected Member Functions | |
void | init () |
init template and cache management. | |
Package Attributes | |
FileTemplateCache | templateCache = null |
|
return the template with specified relative name. The path to find the temlpate is template install directory(intalpath/cn/openmischannel/template/"+relatifName. The relatid name must not begin with file separator. The relative name must is plate-forme specific file separators. Return null if not found. Definition at line 132 of file TemplateManager.java. References org.openmobileis.common.intl.IntlResourceManager.getLocalizedFileName(), and org.openmobileis.embedded.webserver.templates.TemplateManager.templateCache. |
|
init template and cache management. cache template is use to detect cache update during synchronization Definition at line 91 of file TemplateManager.java. References org.openmobileis.embedded.webserver.templates.TemplateManager.templateCache. |