public abstract class AbstractFreeMarkerTemplateService extends Object implements IFreeMarkerTemplateService
| Constructor and Description |
|---|
AbstractFreeMarkerTemplateService() |
| 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.
|
List<String> |
getAutoIncludes()
Get the list of auto includes files
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAbsolutePathFromRelativePath, getDefaultPatternpublic void setTemplateUpdateDelay(int nTemplateUpdateDelay)
setTemplateUpdateDelay in interface IFreeMarkerTemplateServicenTemplateUpdateDelay - the template update delaypublic void addPluginMacros(String strFileName)
addPluginMacros in interface IFreeMarkerTemplateServicestrFileName - the filenamepublic void setSharedVariable(String name, Object obj)
setSharedVariable in interface IFreeMarkerTemplateServicename - name of the shared variableobj - valuepublic void init(String strTemplatePath)
init in interface IFreeMarkerTemplateServicestrTemplatePath - The template pathpublic void init(String strTemplatePath, boolean bAcceptIncompatibleImprovements)
init in interface IFreeMarkerTemplateServicestrTemplatePath - The template pathbAcceptIncompatibleImprovements - Use Freemarker new features or stay backward compatiblepublic HtmlTemplate loadTemplate(String strPath, String strTemplate)
loadTemplate in interface IFreeMarkerTemplateServicestrPath - the root pathstrTemplate - the path of the template from the root pathpublic HtmlTemplate loadTemplate(String strPath, String strTemplate, Locale locale, Object rootMap)
loadTemplate in interface IFreeMarkerTemplateServicestrPath - the root pathstrTemplate - the path of the template from the root pathlocale - The localerootMap - the model rootpublic HtmlTemplate loadTemplate(String strTemplateData, Locale locale, Object rootMap)
loadTemplate in interface IFreeMarkerTemplateServicestrTemplateData - The template as a stringlocale - The LocalerootMap - the model rootpublic void resetConfiguration()
resetConfiguration in interface IFreeMarkerTemplateServicepublic void resetCache()
resetCache in interface IFreeMarkerTemplateServicepublic List<String> getAutoIncludes()
getAutoIncludes in interface IFreeMarkerTemplateServicepublic void addAutoInclude(String strFile)
addAutoInclude in interface IFreeMarkerTemplateServicestrFile - The file to addpublic void removeAutoInclude(String strFile)
removeAutoInclude in interface IFreeMarkerTemplateServicestrFile - The file to removeCopyright © 2020 City of Paris. All rights reserved.