info.magnolia.module.templating
Class RenderingModelImpl<RD extends RenderableDefinition>

java.lang.Object
  extended by info.magnolia.module.templating.RenderingModelImpl<RD>
Type Parameters:
RD - - an instance of RenderableDefinition
All Implemented Interfaces:
RenderingModel<RD>
Direct Known Subclasses:
MgnlDeletedTemplateModel, SampleParagraphModel

public class RenderingModelImpl<RD extends RenderableDefinition>
extends java.lang.Object
implements RenderingModel<RD>

The default concrete rendering definition used for templates and paragraphs.

Version:
$Id: RenderingModelImpl.java 41303 2011-01-17 14:07:59Z fgrilli $
Author:
pbracher

Field Summary
protected  Content content
           
protected  RD definition
           
protected  RenderingModel parentModel
           
 
Fields inherited from interface info.magnolia.module.templating.RenderingModel
SKIP_RENDERING
 
Constructor Summary
RenderingModelImpl(Content content, RD definition, RenderingModel parent)
           
 
Method Summary
 java.lang.String execute()
          Called after all properties were set.
 Content getContent()
          The content tied to this model.
 RD getDef()
          Shortname for templates: model.def.
 RD getDefinition()
          The renderable (paragraph/template) tied to this model.
 RenderingModel getParent()
          The model of the parent paragraph or template.
 RenderingModel getRoot()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentModel

protected RenderingModel parentModel

content

protected final Content content

definition

protected final RD extends RenderableDefinition definition
Constructor Detail

RenderingModelImpl

public RenderingModelImpl(Content content,
                          RD definition,
                          RenderingModel parent)
Method Detail

getParent

public RenderingModel getParent()
Description copied from interface: RenderingModel
The model of the parent paragraph or template.

Specified by:
getParent in interface RenderingModel<RD extends RenderableDefinition>

getRoot

public RenderingModel getRoot()

getContent

public Content getContent()
Description copied from interface: RenderingModel
The content tied to this model.

Specified by:
getContent in interface RenderingModel<RD extends RenderableDefinition>

getDef

public RD getDef()
Shortname for templates: model.def.


getDefinition

public RD getDefinition()
Description copied from interface: RenderingModel
The renderable (paragraph/template) tied to this model.

Specified by:
getDefinition in interface RenderingModel<RD extends RenderableDefinition>

execute

public java.lang.String execute()
Description copied from interface: RenderingModel
Called after all properties were set. Can return a string which is passed to the method. RenderableDefinition.determineTemplatePath(String, RenderingModel)

Specified by:
execute in interface RenderingModel<RD extends RenderableDefinition>


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