public final class AppTemplateService extends Object
Modifier and Type | Method and Description |
---|---|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplate(String strTemplate)
Returns a reference on a template object (load the template or get it from the cache if present.)
|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplate(String strTemplate,
Locale locale)
Returns a reference on a template object (load the template or get it from the cache if present.)
|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplate(String strTemplate,
Locale locale,
Object model)
Returns a reference on a template object (load the template or get it from the cache if present.)
|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplate(String strTemplate,
String strPath)
Returns a reference on a template object (load the template or get it from the cache if present.)
|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplate(String strTemplate,
String strPath,
Locale locale,
Object model)
Returns a reference on a template object (load the template or get it from the cache if present.)
|
static fr.paris.lutece.util.html.HtmlTemplate |
getTemplateFromStringFtl(String strFreemarkerTemplateData,
Locale locale,
Object model)
Returns a reference on a template object
Using Freemarker without cache is huge CPU consuming, , only user this method for dynamic templates |
static void |
init(String strTemplatePath)
Initializes the service with the templates's path
|
static void |
initAutoIncludes()
Initializes autoincludes for plugins.
|
static void |
resetCache()
Reset the cache
|
static void |
resetConfiguration()
Resets the configuration cache
|
public static void init(String strTemplatePath)
strTemplatePath
- The template pathpublic static void initAutoIncludes()
public static void resetCache()
public static void resetConfiguration()
public static fr.paris.lutece.util.html.HtmlTemplate getTemplate(String strTemplate)
strTemplate
- The name of the templatepublic static fr.paris.lutece.util.html.HtmlTemplate getTemplate(String strTemplate, String strPath)
strTemplate
- The name of the templatestrPath
- The specific path to load the templatepublic static fr.paris.lutece.util.html.HtmlTemplate getTemplate(String strTemplate, Locale locale)
strTemplate
- The name of the templatelocale
- The current locale to localize the templatepublic static fr.paris.lutece.util.html.HtmlTemplate getTemplate(String strTemplate, Locale locale, Object model)
strTemplate
- The name of the templatelocale
- The current locale to localize the templatemodel
- the model to use for loadingpublic static fr.paris.lutece.util.html.HtmlTemplate getTemplate(String strTemplate, String strPath, Locale locale, Object model)
strTemplate
- The name of the templatestrPath
- The specific path to load the templatelocale
- The current locale to localize the templatemodel
- the model to use for loadingpublic static fr.paris.lutece.util.html.HtmlTemplate getTemplateFromStringFtl(String strFreemarkerTemplateData, Locale locale, Object model)
strFreemarkerTemplateData
- The content of the templatelocale
- The current Locale
to localize the templatemodel
- The modelCopyright © 2020 City of Paris. All rights reserved.