info.magnolia.templating.renderers
Class PlainTextTemplateRenderer

java.lang.Object
  extended by info.magnolia.rendering.renderer.AbstractRenderer
      extended by info.magnolia.templating.renderers.PlainTextTemplateRenderer
All Implemented Interfaces:
Renderer, RenderingModelBasedRenderer

public class PlainTextTemplateRenderer
extends AbstractRenderer

Template renderer for plain text.


Field Summary
 
Fields inherited from class info.magnolia.rendering.renderer.AbstractRenderer
MODEL_ATTRIBUTE
 
Constructor Summary
PlainTextTemplateRenderer()
          Deprecated. since 4.5.10, use PlainTextTemplateRenderer(RenderingEngine)
PlainTextTemplateRenderer(RenderingEngine renderingEngine)
           
 
Method Summary
protected  Map newContext()
          Create a new context object which is a map.
protected  void onRender(javax.jcr.Node content, RenderableDefinition definition, RenderingContext renderingCtx, Map<String,Object> ctx, String templateScript)
          Finally execute the rendering.
protected  String resolveTemplateScript(javax.jcr.Node content, RenderableDefinition definition, RenderingModel<?> model, String actionResult)
          Hook-method to be overriden when required.
 
Methods inherited from class info.magnolia.rendering.renderer.AbstractRenderer
addContextAttribute, getAggregationStateSafely, getContextAttributes, getMainContentSafely, newModel, newModel, render, restoreContext, saveAttribute, saveContextState, setContextAttribute, setContextAttributes, setupContext, wrapNodeForModel, wrapNodeForTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextTemplateRenderer

public PlainTextTemplateRenderer()
Deprecated. since 4.5.10, use PlainTextTemplateRenderer(RenderingEngine)


PlainTextTemplateRenderer

@Inject
public PlainTextTemplateRenderer(RenderingEngine renderingEngine)
Method Detail

resolveTemplateScript

protected String resolveTemplateScript(javax.jcr.Node content,
                                       RenderableDefinition definition,
                                       RenderingModel<?> model,
                                       String actionResult)
Description copied from class: AbstractRenderer
Hook-method to be overriden when required. Default implementation ignores all arguments except definition.

Overrides:
resolveTemplateScript in class AbstractRenderer
definition - reference templateScript is retrieved from
Returns:
the templateScript to use

onRender

protected void onRender(javax.jcr.Node content,
                        RenderableDefinition definition,
                        RenderingContext renderingCtx,
                        Map<String,Object> ctx,
                        String templateScript)
                 throws RenderException
Description copied from class: AbstractRenderer
Finally execute the rendering.

Specified by:
onRender in class AbstractRenderer
Throws:
RenderException

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–2014 Magnolia International Ltd.. All rights reserved.