info.magnolia.freemarker
Class FreemarkerConfig

java.lang.Object
  extended by info.magnolia.freemarker.FreemarkerConfig

public class FreemarkerConfig
extends Object

Observed bean holding Freemarker configuration. Not to be confused with Freemarker's own Configuration. This only exposes the few properties that Magnolia allows to configure and is able to handle properly. It also provides a few additional methods used internally.

See Also:
FreemarkerHelper, MagnoliaObjectWrapper, MagnoliaModelFactory

Constructor Summary
FreemarkerConfig()
           
 
Method Summary
 void addModelFactory(MagnoliaModelFactory modelFactory)
           
 void addSharedVariable(String name, Object value)
           
 void addTemplateLoader(freemarker.cache.TemplateLoader templateLoader)
           
static FreemarkerConfig getInstance()
          Deprecated. since 4.3 should not be needed - components using this can keep their instance
 List<MagnoliaModelFactory> getModelFactories()
           
 freemarker.template.ObjectWrapper getObjectWrapper()
           
 Map<String,freemarker.template.TemplateModel> getSharedVariables()
           
 freemarker.template.TemplateExceptionHandler getTemplateExceptionHandler()
           
 freemarker.cache.TemplateLoader getTemplateLoader()
           
 List<freemarker.cache.TemplateLoader> getTemplateLoaders()
           
protected  freemarker.template.ObjectWrapper newObjectWrapper()
           
 void setTemplateExceptionHandler(freemarker.template.TemplateExceptionHandler templateExceptionHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreemarkerConfig

public FreemarkerConfig()
Method Detail

getInstance

public static FreemarkerConfig getInstance()
Deprecated. since 4.3 should not be needed - components using this can keep their instance


getObjectWrapper

public freemarker.template.ObjectWrapper getObjectWrapper()

newObjectWrapper

protected freemarker.template.ObjectWrapper newObjectWrapper()

getTemplateLoader

public freemarker.cache.TemplateLoader getTemplateLoader()

getModelFactories

public List<MagnoliaModelFactory> getModelFactories()

addModelFactory

public void addModelFactory(MagnoliaModelFactory modelFactory)

getTemplateLoaders

public List<freemarker.cache.TemplateLoader> getTemplateLoaders()

addTemplateLoader

public void addTemplateLoader(freemarker.cache.TemplateLoader templateLoader)

getSharedVariables

public Map<String,freemarker.template.TemplateModel> getSharedVariables()

addSharedVariable

public void addSharedVariable(String name,
                              Object value)
                       throws freemarker.template.TemplateModelException
Throws:
freemarker.template.TemplateModelException

getTemplateExceptionHandler

public freemarker.template.TemplateExceptionHandler getTemplateExceptionHandler()

setTemplateExceptionHandler

public void setTemplateExceptionHandler(freemarker.template.TemplateExceptionHandler templateExceptionHandler)


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.