info.magnolia.rendering.engine
Interface RenderingEngine

All Known Implementing Classes:
DefaultRenderingEngine

public interface RenderingEngine

The RenderingEngine is the main entry point for rendering content. It's main task is to prepare for rendering by setting up the RenderingContext and then calling on a Renderer to do the actual rendering.

Version:
$Id$

Method Summary
 RenderingContext getRenderingContext()
          Returns the current RenderingContext.
 void initListeners(OutputProvider out)
          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.
 

Method Detail

render

void render(javax.jcr.Node content,
            OutputProvider out)
            throws RenderException
Renders the content with its assigned template. Uses TemplateDefinitionAssignment to resolve the template assigned to the node.

Parameters:
content - the node to render
out - the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be used
Throws:
RenderException

render

void render(javax.jcr.Node content,
            Map<String,Object> contextObjects,
            OutputProvider out)
            throws RenderException
Renders the content with its assigned template and exposes the given context objects to the template script. Uses TemplateDefinitionAssignment to resolve the template assigned to the node.

Parameters:
content - the node to render
contextObjects - objects to expose to the template script
out - the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be used
Throws:
RenderException

render

void render(javax.jcr.Node content,
            RenderableDefinition definition,
            Map<String,Object> contextObjects,
            OutputProvider out)
            throws RenderException
Uses a specific RenderableDefinition to render the content and exposes the given context objects to the template script.

Parameters:
content - the node to render
contextObjects - objects to expose to the template script
out - the OutputProvider to be used for output or null if the OutputProvider already set in RenderingContext should be used
Throws:
RenderException

getRenderingContext

RenderingContext getRenderingContext()
Returns the current RenderingContext. FIXME is this the right place? should we use IoC


initListeners

void initListeners(OutputProvider out)
Inits listeners. Should be called per request.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.