Class FreemarkerEngine
java.lang.Object
org.nuxeo.ecm.platform.rendering.fm.FreemarkerEngine
- All Implemented Interfaces:
RenderingEngine
- Direct Known Subclasses:
FreemarkerRender
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected final freemarker.template.Configuration
protected ResourceTemplateLoader
protected final LocaleMessagesMethod
protected final MessagesMethod
static final String
protected final DocumentObjectWrapper
-
Constructor Summary
ConstructorDescriptionFreemarkerEngine
(freemarker.template.Configuration cfg, ResourceLocator locator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
freemarker.template.Configuration
void
Starts the rendering for the given document context.void
setMessageBundle
(ResourceBundle messages) set the resource bundle to be used with method message and lmessage.void
setResourceLocator
(ResourceLocator locator) void
setSharedVariable
(String key, Object value)
-
Field Details
-
RENDERING_ENGINE_KEY
- See Also:
-
cfg
protected final freemarker.template.Configuration cfg -
wrapper
-
messages
-
localeMessages
-
loader
-
-
Constructor Details
-
FreemarkerEngine
public FreemarkerEngine() -
FreemarkerEngine
-
-
Method Details
-
setMessageBundle
set the resource bundle to be used with method message and lmessage. If the resourcebundle is not of the type ResourceComposite, lmessage will create a default ResourceComposite.- Specified by:
setMessageBundle
in interfaceRenderingEngine
-
getMessageBundle
- Specified by:
getMessageBundle
in interfaceRenderingEngine
-
setResourceLocator
- Specified by:
setResourceLocator
in interfaceRenderingEngine
-
getResourceLocator
- Specified by:
getResourceLocator
in interfaceRenderingEngine
-
getLoader
-
getObjectWrapper
-
getConfiguration
public freemarker.template.Configuration getConfiguration() -
getView
- Specified by:
getView
in interfaceRenderingEngine
-
getView
- Specified by:
getView
in interfaceRenderingEngine
-
render
Description copied from interface:RenderingEngine
Starts the rendering for the given document context.- Specified by:
render
in interfaceRenderingEngine
- Throws:
RenderingException
-
flushCache
public void flushCache()- Specified by:
flushCache
in interfaceRenderingEngine
-