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 57 of file Freemarkerv1TemplateDelegate.java.
Public Member Functions | |
void | init () |
init template and cache management. | |
TemplateModelRoot | getTemplateModelRoot () |
initialize template structure for this request. | |
Template | getTemplate (String relatifPath) |
return the template with specified relative name. | |
String | getDefaultTemplateContentType () |
return the default Content-Type of the template HTTP response | |
void | setDefaultTemplateContentType (String defaultTemplateContentType) |
Default content type of the response. |
void org.openmobileis.embedded.webserver.templates.Freemarkerv1TemplateDelegate.init | ( | ) |
init template and cache management.
cache template is use to detect cache update during synchronization
Implements org.openmobileis.embedded.webserver.templates.TemplateManagerDelegate.
Definition at line 73 of file Freemarkerv1TemplateDelegate.java.
References org.openmobileis.common.util.collection.Array.add().
Template org.openmobileis.embedded.webserver.templates.Freemarkerv1TemplateDelegate.getTemplate | ( | String | relatifPath | ) |
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 116 of file Freemarkerv1TemplateDelegate.java.
References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.common.util.collection.Array.size.
String org.openmobileis.embedded.webserver.templates.Freemarkerv1TemplateDelegate.getDefaultTemplateContentType | ( | ) |
return the default Content-Type of the template HTTP response
Implements org.openmobileis.embedded.webserver.templates.TemplateManagerDelegate.
Definition at line 163 of file Freemarkerv1TemplateDelegate.java.
void org.openmobileis.embedded.webserver.templates.Freemarkerv1TemplateDelegate.setDefaultTemplateContentType | ( | String | defaultTemplateContentType | ) |
Default content type of the response.
If not set it's html/text. Use to force the default Content-Type header of template HTTP response. "text/html; charset=ISO-8859-1" for example.
encoding |
Implements org.openmobileis.embedded.webserver.templates.TemplateManagerDelegate.
Definition at line 167 of file Freemarkerv1TemplateDelegate.java.