public class DefaultRenderingEngine extends Object implements RenderingEngine
RenderingEngine
.Modifier and Type | Field and Description |
---|---|
protected static Map<String,Object> |
EMPTY_CONTEXT |
Modifier | Constructor and Description |
---|---|
protected |
DefaultRenderingEngine()
Used to create an observed proxy object.
|
|
DefaultRenderingEngine(RendererRegistry rendererRegistry,
TemplateDefinitionAssignment templateDefinitionAssignment,
RenderableVariationResolver variationResolver,
javax.inject.Provider<RenderingContext> renderingContextProvider) |
Modifier and Type | Method and Description |
---|---|
Boolean |
getAutoPopulateFromRequest() |
LinkedList<AbstractRenderingListener> |
getListeners() |
protected RenderableDefinition |
getRenderableDefinitionFor(javax.jcr.Node content) |
Boolean |
getRenderEmptyAreas() |
protected Renderer |
getRendererFor(RenderableDefinition definition) |
RenderingContext |
getRenderingContext()
Returns the current
RenderingContext . |
Collection<AbstractRenderingListener.RenderingListenerReturnCode> |
initListeners(OutputProvider output,
javax.servlet.http.HttpServletResponse response)
Inits listeners.
|
void |
render(javax.jcr.Node content,
Map<String,Object> contextObjects,
OutputProvider out)
Renders the content with its assigned template and exposes the given context objects to the template script.
|
void |
render(javax.jcr.Node content,
OutputProvider out)
Renders the content with its assigned template.
|
void |
render(javax.jcr.Node content,
RenderableDefinition definition,
Map<String,Object> contextObjects,
OutputProvider out)
Uses a specific
RenderableDefinition to render the content and exposes the given context objects to the
template script. |
void |
setAutoPopulateFromRequest(Boolean autopopulateFromRequest) |
void |
setListeners(LinkedList<AbstractRenderingListener> listeners) |
void |
setRenderEmptyAreas(Boolean renderEmptyAreas) |
protected DefaultRenderingEngine()
public DefaultRenderingEngine(RendererRegistry rendererRegistry, TemplateDefinitionAssignment templateDefinitionAssignment, RenderableVariationResolver variationResolver, javax.inject.Provider<RenderingContext> renderingContextProvider)
public void render(javax.jcr.Node content, OutputProvider out) throws RenderException
RenderingEngine
TemplateDefinitionAssignment
to resolve the template assigned to the node.render
in interface RenderingEngine
content
- the node to renderout
- the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be usedRenderException
public void render(javax.jcr.Node content, Map<String,Object> contextObjects, OutputProvider out) throws RenderException
RenderingEngine
TemplateDefinitionAssignment
to resolve the template assigned
to the node.render
in interface RenderingEngine
content
- the node to rendercontextObjects
- objects to expose to the template scriptout
- the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be usedRenderException
public void render(javax.jcr.Node content, RenderableDefinition definition, Map<String,Object> contextObjects, OutputProvider out) throws RenderException
RenderingEngine
RenderableDefinition
to render the content and exposes the given context objects to the
template script.render
in interface RenderingEngine
content
- the node to rendercontextObjects
- objects to expose to the template scriptout
- the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be usedRenderException
protected RenderableDefinition getRenderableDefinitionFor(javax.jcr.Node content) throws RenderException
RenderException
protected Renderer getRendererFor(RenderableDefinition definition) throws RenderException
RenderException
public RenderingContext getRenderingContext()
RenderingEngine
RenderingContext
.
FIXME is this the right place? should we use IoCgetRenderingContext
in interface RenderingEngine
public Collection<AbstractRenderingListener.RenderingListenerReturnCode> initListeners(OutputProvider output, javax.servlet.http.HttpServletResponse response)
RenderingEngine
initListeners
in interface RenderingEngine
public Boolean getAutoPopulateFromRequest()
getAutoPopulateFromRequest
in interface RenderingEngine
public void setAutoPopulateFromRequest(Boolean autopopulateFromRequest)
public Boolean getRenderEmptyAreas()
getRenderEmptyAreas
in interface RenderingEngine
public void setRenderEmptyAreas(Boolean renderEmptyAreas)
public LinkedList<AbstractRenderingListener> getListeners()
public void setListeners(LinkedList<AbstractRenderingListener> listeners)
Copyright © 2003–2016 Magnolia International Ltd.. All rights reserved.