info.magnolia.module.templating
Interface RenderingModel<RD extends RenderableDefinition>

Type Parameters:
RD - - an instance of RenderableDefinition
All Known Implementing Classes:
MgnlDeletedTemplateModel, RenderingModelImpl, SampleParagraphModel

public interface RenderingModel<RD extends RenderableDefinition>

A bean tying the current content and the rendering definition. Subclasses will provide helper methods to the template. The execute() method is executed before the rendering starts. The model is available under the name model.

Version:
$Id: RenderingModel.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
pbracher

Field Summary
static String SKIP_RENDERING
          A constant used in some special cases where rendering must be skipped, i.e.
 
Method Summary
 String execute()
          Called after all properties were set.
 Content getContent()
          The content tied to this model.
 RD getDefinition()
          The renderable (paragraph/template) tied to this model.
 RenderingModel getParent()
          The model of the parent paragraph or template.
 

Field Detail

SKIP_RENDERING

static final String SKIP_RENDERING
A constant used in some special cases where rendering must be skipped, i.e. a redirect template. It can be used by template models as a return value for the execute() method to inform AbstractRenderer that it should not render anything in that particular case.

See Also:
Constant Field Values
Method Detail

getParent

RenderingModel getParent()
The model of the parent paragraph or template.


getContent

Content getContent()
The content tied to this model.


getDefinition

RD getDefinition()
The renderable (paragraph/template) tied to this model.


execute

String execute()
Called after all properties were set. Can return a string which is passed to the method. RenderableDefinition.determineTemplatePath(String, RenderingModel)



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