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 java.lang.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  java.lang.String determineAssignedDefinitionName(Content content)
          Reads the template name from the meta data.
protected static AggregationState getAggregationStateSafely()
           
protected  void render(Content content, java.lang.String definitionName, DefaultRenderingEngine.RenderingHelper helper, java.io.Writer out)
          Will update the aggregation state and perform the rendering by using the helper.
 void render(Content content, java.lang.String definitionName, java.io.Writer out)
          Render the content by using the passed definition.
 void render(Content content, java.io.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,
                   java.io.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,
                   java.lang.String definitionName,
                   java.io.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 java.lang.String determineAssignedDefinitionName(Content content)
Reads the template name from the meta data.


render

protected void render(Content content,
                      java.lang.String definitionName,
                      DefaultRenderingEngine.RenderingHelper helper,
                      java.io.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-2011 Magnolia International Ltd.. All Rights Reserved.