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
FieldsModifier and TypeFieldDescriptionprotected final freemarker.template.Configurationprotected ResourceTemplateLoaderprotected final LocaleMessagesMethodprotected final MessagesMethodstatic final Stringprotected final DocumentObjectWrapper -
Constructor Summary
ConstructorsConstructorDescriptionFreemarkerEngine(freemarker.template.Configuration cfg, ResourceLocator locator) -
Method Summary
Modifier and TypeMethodDescriptionvoidfreemarker.template.ConfigurationvoidStarts the rendering for the given document context.voidrenderInline(String inlineTemplate, Object input, Writer writer) Renders the given value as inline template.voidsetMessageBundle(ResourceBundle messages) set the resource bundle to be used with method message and lmessage.voidsetResourceLocator(ResourceLocator locator) voidsetSharedVariable(String key, Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.platform.rendering.api.RenderingEngine
render, renderInline
-
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:
setMessageBundlein interfaceRenderingEngine
-
getMessageBundle
- Specified by:
getMessageBundlein interfaceRenderingEngine
-
setResourceLocator
- Specified by:
setResourceLocatorin interfaceRenderingEngine
-
getResourceLocator
- Specified by:
getResourceLocatorin interfaceRenderingEngine
-
getLoader
-
getObjectWrapper
-
getConfiguration
public freemarker.template.Configuration getConfiguration() -
getView
- Specified by:
getViewin interfaceRenderingEngine
-
getView
- Specified by:
getViewin interfaceRenderingEngine
-
render
Description copied from interface:RenderingEngineStarts the rendering for the given document context.- Specified by:
renderin interfaceRenderingEngine- Throws:
RenderingException
-
renderInline
public void renderInline(String inlineTemplate, Object input, Writer writer) throws RenderingException Description copied from interface:RenderingEngineRenders the given value as inline template.- Specified by:
renderInlinein interfaceRenderingEngine- Throws:
RenderingException
-
flushCache
public void flushCache()- Specified by:
flushCachein interfaceRenderingEngine
-