info.magnolia.module.templating.engine
Class DefaultRenderingEngine

java.lang.Object
  extended by info.magnolia.module.templating.engine.DefaultRenderingEngine
All Implemented Interfaces:
RenderingEngine

public class DefaultRenderingEngine
extends Object
implements RenderingEngine

Default implementation which determines the definition (template/paragraph) from the content's meta data. Based on the node type (mgln:contentNode for paragraphs) a paragraph rendering or a template rendering is performed.

Version:
$Id$
Author:
pbaerfuss

Nested Class Summary
protected static class DefaultRenderingEngine.RenderingHelper
          A helper enumeration usable by subclasses.
 
Constructor Summary
DefaultRenderingEngine()
           
 
Method Summary
protected  String determineAssignedDefinitionName(Content content)
          Reads the template name from the meta data.
protected static AggregationState getAggregationStateSafely()
           
protected  void render(Content content, String definitionName, DefaultRenderingEngine.RenderingHelper helper, Writer out)
          Will update the aggregation state and perform the rendering by using the helper.
 void render(Content content, String definitionName, Writer out)
          Render the content by using the passed definition.
 void render(Content content, Writer out)
          Determines the definition to use from the passed content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRenderingEngine

public DefaultRenderingEngine()
Method Detail

render

public void render(Content content,
                   Writer out)
            throws RenderException
Description copied from interface: RenderingEngine
Determines the definition to use from the passed content.

Specified by:
render in interface RenderingEngine
Throws:
RenderException

render

public void render(Content content,
                   String definitionName,
                   Writer out)
            throws RenderException
Description copied from interface: RenderingEngine
Render the content by using the passed definition.

Specified by:
render in interface RenderingEngine
Throws:
RenderException

determineAssignedDefinitionName

protected String determineAssignedDefinitionName(Content content)
Reads the template name from the meta data.


render

protected void render(Content content,
                      String definitionName,
                      DefaultRenderingEngine.RenderingHelper helper,
                      Writer out)
               throws RenderException
Will update the aggregation state and perform the rendering by using the helper.

Throws:
RenderException

getAggregationStateSafely

protected static AggregationState getAggregationStateSafely()


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