info.magnolia.freemarker
Class FreemarkerConfig
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreemarkerConfig
public FreemarkerConfig()
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–2014 Magnolia International Ltd.. All rights reserved.