fr.paris.lutece.portal.service.template
Class FreeMarkerTemplateService

java.lang.Object
  extended by fr.paris.lutece.portal.service.template.FreeMarkerTemplateService

public final class FreeMarkerTemplateService
extends java.lang.Object

Template service based on the Freemarker template engine


Method Summary
static void init(java.lang.String strTemplatePath)
          Initializes the service with the templates's path
static HtmlTemplate loadTemplate(java.lang.String strTemplateData, java.util.Locale locale, java.lang.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).
static HtmlTemplate loadTemplate(java.lang.String strPath, java.lang.String strTemplate)
          Load a template
static HtmlTemplate loadTemplate(java.lang.String strPath, java.lang.String strTemplate, java.util.Locale locale, java.lang.Object rootMap)
          Load a template and process a model
static void resetCache()
          Reset the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static void init(java.lang.String strTemplatePath)
Initializes the service with the templates's path

Parameters:
strTemplatePath - The template path

loadTemplate

public static HtmlTemplate loadTemplate(java.lang.String strPath,
                                        java.lang.String strTemplate)
Load a template

Parameters:
strPath - the root path
strTemplate - the path of the template from the root path
Returns:
the html template

loadTemplate

public static HtmlTemplate loadTemplate(java.lang.String strPath,
                                        java.lang.String strTemplate,
                                        java.util.Locale locale,
                                        java.lang.Object rootMap)
Load a template and process a model

Parameters:
strPath - the root path
strTemplate - the path of the template from the root path
locale - The locale
rootMap - the model root
Returns:
the processed html template

loadTemplate

public static HtmlTemplate loadTemplate(java.lang.String strTemplateData,
                                        java.util.Locale locale,
                                        java.lang.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).

Parameters:
strTemplateData - The template as a string
locale - The Locale
rootMap - the model root
Returns:
the processed html template

resetCache

public static void resetCache()
Reset the cache



Copyright © 2009 Mairie de Paris. All Rights Reserved.