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, wait
getAbsolutePathFromRelativePath, getDefaultPattern
public void setTemplateUpdateDelay(int nTemplateUpdateDelay)
setTemplateUpdateDelay
in interface IFreeMarkerTemplateService
nTemplateUpdateDelay
- the template update delaypublic void addPluginMacros(String strFileName)
addPluginMacros
in interface IFreeMarkerTemplateService
strFileName
- the filenamepublic void setSharedVariable(String name, Object obj)
setSharedVariable
in interface IFreeMarkerTemplateService
name
- name of the shared variableobj
- valuepublic void init(String strTemplatePath)
init
in interface IFreeMarkerTemplateService
strTemplatePath
- The template pathpublic void init(String strTemplatePath, boolean bAcceptIncompatibleImprovements)
init
in interface IFreeMarkerTemplateService
strTemplatePath
- The template pathbAcceptIncompatibleImprovements
- Use Freemarker new features or stay backward compatiblepublic HtmlTemplate loadTemplate(String strPath, String strTemplate)
loadTemplate
in interface IFreeMarkerTemplateService
strPath
- 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 IFreeMarkerTemplateService
strPath
- 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 IFreeMarkerTemplateService
strTemplateData
- The template as a stringlocale
- The Locale
rootMap
- the model rootpublic void resetConfiguration()
resetConfiguration
in interface IFreeMarkerTemplateService
public void resetCache()
resetCache
in interface IFreeMarkerTemplateService
public List<String> getAutoIncludes()
getAutoIncludes
in interface IFreeMarkerTemplateService
public void addAutoInclude(String strFile)
addAutoInclude
in interface IFreeMarkerTemplateService
strFile
- The file to addpublic void removeAutoInclude(String strFile)
removeAutoInclude
in interface IFreeMarkerTemplateService
strFile
- The file to removeCopyright © 2020 City of Paris. All rights reserved.