|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.openmobileis.embedded.webserver.templates.TemplateManager
Title: OpenMobileIS project source
Description: Manage pattern (templates) for HTML forms used by the PDA web server
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 ${}.
Method Summary | |
void |
cacheUnavailable(org.openmobileis.embedded.webserver.templates.CacheEvent e)
|
void |
elementRemoved(org.openmobileis.embedded.webserver.templates.CacheEvent e)
|
void |
elementUpdated(org.openmobileis.embedded.webserver.templates.CacheEvent e)
|
void |
elementUpdateFailed(org.openmobileis.embedded.webserver.templates.CacheEvent e)
|
static TemplateManager |
getManager()
|
org.openmobileis.embedded.webserver.templates.Template |
getTemplate(java.lang.String relatifPath)
return the template with specified relative name. |
org.openmobileis.embedded.webserver.templates.TemplateModelRoot |
getTemplateModelRoot()
initialize template structure for this request. |
protected void |
init()
init template and cache management. cache template is use to detect cache update during synchronization |
void |
sendResponse(java.lang.String templateName,
org.openmobileis.embedded.webserver.templates.TemplateModelRoot modelRoot,
javax.servlet.http.HttpServletResponse res)
|
void |
setTemplateRootPath(java.lang.String rootPath)
|
Method Detail |
public static TemplateManager getManager()
public void setTemplateRootPath(java.lang.String rootPath)
protected void init()
public void cacheUnavailable(org.openmobileis.embedded.webserver.templates.CacheEvent e)
public void elementUpdated(org.openmobileis.embedded.webserver.templates.CacheEvent e)
public void elementUpdateFailed(org.openmobileis.embedded.webserver.templates.CacheEvent e)
public void elementRemoved(org.openmobileis.embedded.webserver.templates.CacheEvent e)
public org.openmobileis.embedded.webserver.templates.TemplateModelRoot getTemplateModelRoot()
public org.openmobileis.embedded.webserver.templates.Template getTemplate(java.lang.String relatifPath)
public void sendResponse(java.lang.String templateName, org.openmobileis.embedded.webserver.templates.TemplateModelRoot modelRoot, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, TemplateNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |