public interface IFreeMarkerTemplateService
| Modifier and Type | Method and Description |
|---|---|
void |
addAutoInclude(String strFile)
Add an auto include file
|
void |
addPluginMacros(String strFileName)
Adds a macro file (like the main commons.html) brought by a plugin.
|
String |
getAbsolutePathFromRelativePath(String strPath)
Get the absolute path from relative path
|
List<String> |
getAutoIncludes()
Get the list of auto includes files
|
String |
getDefaultPattern(Locale locale)
Get the default date pattern
|
void |
init(String strTemplatePath)
Initializes the service with the templates's path
|
void |
init(String strTemplatePath,
boolean bAcceptIncompatibleImprovements)
Initializes the service with the templates's path
|
HtmlTemplate |
loadTemplate(String strTemplateData,
Locale locale,
Object rootMap)
Load a template from a String and process a model WARNING : This method must not be used in front office (no cache management available).
|
HtmlTemplate |
loadTemplate(String strPath,
String strTemplate)
Load a template
|
HtmlTemplate |
loadTemplate(String strPath,
String strTemplate,
Locale locale,
Object rootMap)
Load a template and process a model
|
void |
removeAutoInclude(String strFile)
Remove an auto include file
|
void |
resetCache()
Reset the cache
|
void |
resetConfiguration()
Clears the configuration cache
|
void |
setSharedVariable(String name,
Object obj)
Add a shared variable into every template
|
void |
setTemplateUpdateDelay(int nTemplateUpdateDelay)
Set the template update delay
|
String getAbsolutePathFromRelativePath(String strPath)
strPath - the pathString getDefaultPattern(Locale locale)
locale - the localevoid setTemplateUpdateDelay(int nTemplateUpdateDelay)
nTemplateUpdateDelay - the template update delayvoid addPluginMacros(String strFileName)
strFileName - the filenamevoid setSharedVariable(String name, Object obj)
name - name of the shared variableobj - valuevoid init(String strTemplatePath)
strTemplatePath - The template pathvoid init(String strTemplatePath, boolean bAcceptIncompatibleImprovements)
strTemplatePath - The template pathbAcceptIncompatibleImprovements - Use Freemarker new features or stay backward compatibleHtmlTemplate loadTemplate(String strPath, String strTemplate)
strPath - the root pathstrTemplate - the path of the template from the root pathHtmlTemplate loadTemplate(String strPath, String strTemplate, Locale locale, Object rootMap)
strPath - the root pathstrTemplate - the path of the template from the root pathlocale - The localerootMap - the model rootHtmlTemplate loadTemplate(String strTemplateData, Locale locale, Object rootMap)
strTemplateData - The template as a stringlocale - The LocalerootMap - the model rootvoid resetConfiguration()
void resetCache()
List<String> getAutoIncludes()
void addAutoInclude(String strFile)
strFile - The file to addvoid removeAutoInclude(String strFile)
strFile - The file to removeCopyright © 2020 City of Paris. All rights reserved.