info.magnolia.module.templating.paragraphs
Class FreemarkerParagraphRenderer

java.lang.Object
  extended by info.magnolia.module.templating.AbstractRenderer
      extended by info.magnolia.module.templating.paragraphs.AbstractParagraphRenderer
          extended by info.magnolia.module.templating.paragraphs.FreemarkerParagraphRenderer
All Implemented Interfaces:
ParagraphRenderer, RenderingModelBasedRenderer

public class FreemarkerParagraphRenderer
extends AbstractParagraphRenderer

Renders a paragraph using freemarker. Optionally supports the execution of an action class whose constructor can either be empty or take exactly one Content parameter and one ActionBasedParagraph parameter.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
FreemarkerParagraphRenderer()
          Deprecated. since 4.5, use FreemarkerParagraphRenderer(info.magnolia.freemarker.FreemarkerHelper)
FreemarkerParagraphRenderer(FreemarkerHelper fmRenderer)
           
 
Method Summary
protected  Map newContext()
          Create a new context object which is a map.
protected  void onRender(Content content, RenderableDefinition definition, Writer out, Map ctx, String templatePath)
          Finally execute the rendering.
protected  Map saveContextState(Map ctx)
           
protected  void setupContext(Map ctx, Content content, RenderableDefinition definition, RenderingModel state, Object actionResult)
           
 
Methods inherited from class info.magnolia.module.templating.paragraphs.AbstractParagraphRenderer
render
 
Methods inherited from class info.magnolia.module.templating.AbstractRenderer
determineTemplatePath, getAggregationStateSafely, getMagnoliaTemplatingUtilities, getMainContentSafely, getPageAttributeName, newModel, render, restoreContext, saveAttribute, setContextAttribute, wrapNodeForModel, wrapNodeForTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreemarkerParagraphRenderer

public FreemarkerParagraphRenderer()
Deprecated. since 4.5, use FreemarkerParagraphRenderer(info.magnolia.freemarker.FreemarkerHelper)

Constructs a FreemarkerParagraphRenderer that uses the default (singleton) instance of FreemarkerHelper.


FreemarkerParagraphRenderer

public FreemarkerParagraphRenderer(FreemarkerHelper fmRenderer)
Method Detail

onRender

protected void onRender(Content content,
                        RenderableDefinition definition,
                        Writer out,
                        Map ctx,
                        String templatePath)
                 throws RenderException
Description copied from class: AbstractRenderer
Finally execute the rendering.

Specified by:
onRender in class AbstractRenderer
Parameters:
content - TODO
Throws:
RenderException

saveContextState

protected Map saveContextState(Map ctx)
Overrides:
saveContextState in class AbstractRenderer

setupContext

protected void setupContext(Map ctx,
                            Content content,
                            RenderableDefinition definition,
                            RenderingModel state,
                            Object actionResult)
Overrides:
setupContext in class AbstractRenderer

newContext

protected Map newContext()
Description copied from class: AbstractRenderer
Create a new context object which is a map.

Specified by:
newContext in class AbstractRenderer


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