public abstract class AbstractFreeMarkerTemplateService extends Object implements IFreeMarkerTemplateService
Constructor and Description |
---|
AbstractFreeMarkerTemplateService() |
Modifier and Type | Method and Description |
---|---|
void |
addPluginMacros(String strFileName)
Adds a macro file (like the main commons.html) brought by a plugin.
|
void |
init(String strTemplatePath)
Initializes the service with the templates's path
|
HtmlTemplate |
loadTemplate(String strTemplateData,
Locale locale,
Object rootMap)
Deprecated.
|
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 |
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 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 root@Deprecated public 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
Copyright © 2014 Mairie de Paris. All rights reserved.