|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.ui.freemarker.FreeMarkerConfigurationFactory
org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer
org.riotfamily.common.web.view.freemarker.RiotFreeMarkerConfigurer
public class RiotFreeMarkerConfigurer
FreeMarkerConfigurer that supports some additional settings.
Field Summary |
---|
Fields inherited from class org.springframework.ui.freemarker.FreeMarkerConfigurationFactory |
---|
logger |
Constructor Summary | |
---|---|
RiotFreeMarkerConfigurer()
|
Method Summary | |
---|---|
protected void |
importMacroLibraries(freemarker.template.Configuration config)
|
protected void |
postProcessConfiguration(freemarker.template.Configuration config)
|
protected void |
postProcessTemplateLoaders(List templateLoaders)
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setExceptionHandler(freemarker.template.TemplateExceptionHandler exceptionHandler)
Sets the TemplateExceptionHandler to be used. |
void |
setExposeStaticModels(boolean exposeStaticModels)
Whether BeansWrapper.getStaticModels() should be exposed as
statics. |
void |
setFreemarkerVariables(Map variables)
Set a Map that contains well-known FreeMarker objects which will be passed to FreeMarker's Configuration.setAllSharedVariables() method. |
void |
setMacroLibraries(Properties macroLibraries)
Sets the macro libraries to be auto-imported, keyed by their namespace. |
void |
setTemplateUpdateDelay(int templateUpdateDelay)
Set the time in seconds that must elapse before checking whether there is a newer version of a template file. |
void |
setUrlEscapingCharset(String urlEscapingCharset)
Sets the URL escaping charset. |
void |
setUseComputerNumberFormat(boolean useComputerNumberFormat)
Whether the #0. |
void |
setUseTemplateCache(boolean useTemplateCache)
Sets whether the FreeMarker template cache should be used (default is true ). |
void |
setWhitespaceStripping(boolean whitespaceStripping)
Sets whether the FTL parser will try to remove superfluous white-space around certain FTL tags. |
Methods inherited from class org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer |
---|
afterPropertiesSet, getConfiguration, getTaglibFactory, setConfiguration, setServletContext |
Methods inherited from class org.springframework.ui.freemarker.FreeMarkerConfigurationFactory |
---|
createConfiguration, getAggregateTemplateLoader, getResourceLoader, getTemplateLoaderForPath, isPreferFileSystemAccess, newConfiguration, setConfigLocation, setDefaultEncoding, setFreemarkerSettings, setPostTemplateLoaders, setPreferFileSystemAccess, setPreTemplateLoaders, setResourceLoader, setTemplateLoaderPath, setTemplateLoaderPaths, setTemplateLoaders |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.context.ResourceLoaderAware |
---|
setResourceLoader |
Constructor Detail |
---|
public RiotFreeMarkerConfigurer()
Method Detail |
---|
public void setMacroLibraries(Properties macroLibraries)
public void setExceptionHandler(freemarker.template.TemplateExceptionHandler exceptionHandler)
TemplateExceptionHandler
to be used. By default an
ErrorPrintingExceptionHandler
will be used.
public void setFreemarkerVariables(Map variables)
Configuration.setAllSharedVariables()
method.
Riot overrides this setter in order to set the variables in
postProcessConfiguration(Configuration)
, after the custom
ObjectWrapper
has been set.
setFreemarkerVariables
in class FreeMarkerConfigurationFactory
Configuration.setAllSharedVariables(freemarker.template.TemplateHashModelEx)
public void setWhitespaceStripping(boolean whitespaceStripping)
public void setUrlEscapingCharset(String urlEscapingCharset)
UTF-8
.
public void setUseComputerNumberFormat(boolean useComputerNumberFormat)
#0.#
should be used as default number format.
Default is true
.
public void setExposeStaticModels(boolean exposeStaticModels)
BeansWrapper.getStaticModels()
should be exposed as
statics.
public void setUseTemplateCache(boolean useTemplateCache)
true
).
public void setTemplateUpdateDelay(int templateUpdateDelay)
5
.
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext
in interface ApplicationContextAware
protected void postProcessTemplateLoaders(List templateLoaders)
postProcessTemplateLoaders
in class FreeMarkerConfigurer
protected void postProcessConfiguration(freemarker.template.Configuration config) throws IOException, freemarker.template.TemplateException
postProcessConfiguration
in class FreeMarkerConfigurationFactory
IOException
freemarker.template.TemplateException
protected void importMacroLibraries(freemarker.template.Configuration config)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |