info.magnolia.freemarker
Class FreemarkerConfig

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

public class FreemarkerConfig
extends java.lang.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(java.lang.String name, java.lang.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
 java.util.List<MagnoliaModelFactory> getModelFactories()
           
 freemarker.template.ObjectWrapper getObjectWrapper()
           
 java.util.Map<java.lang.String,freemarker.template.TemplateModel> getSharedVariables()
           
 freemarker.template.TemplateExceptionHandler getTemplateExceptionHandler()
           
 freemarker.cache.TemplateLoader getTemplateLoader()
           
 java.util.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 java.util.List<MagnoliaModelFactory> getModelFactories()

addModelFactory

public void addModelFactory(MagnoliaModelFactory modelFactory)

getTemplateLoaders

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

addTemplateLoader

public void addTemplateLoader(freemarker.cache.TemplateLoader templateLoader)

getSharedVariables

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

addSharedVariable

public void addSharedVariable(java.lang.String name,
                              java.lang.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-2011 Magnolia International Ltd.. All Rights Reserved.