info.magnolia.rendering.model
Class RenderingModelImpl<RD extends RenderableDefinition>

java.lang.Object
  extended by info.magnolia.rendering.model.RenderingModelImpl<RD>
Type Parameters:
RD - - an instance of RenderableDefinition
All Implemented Interfaces:
RenderingModel<RD>

public class RenderingModelImpl<RD extends RenderableDefinition>
extends Object
implements RenderingModel<RD>

The default concrete rendering definition used for templates and paragraphs.

Version:
$Id$

Field Summary
protected  javax.jcr.Node content
           
protected  RD definition
           
protected  RenderingModel<?> parentModel
           
 
Fields inherited from interface info.magnolia.rendering.model.RenderingModel
SKIP_RENDERING
 
Constructor Summary
RenderingModelImpl(javax.jcr.Node content, RD definition, RenderingModel<?> parent)
           
 
Method Summary
 String execute()
          Called after all properties were set.
 javax.jcr.Node getContent()
          The content node tied to this model.
 info.magnolia.jcr.util.ContentMap getContentMap()
          The content node tied to this model exposed as a ContentMap.
 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()
          The top root model of the rendering process.
 
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 javax.jcr.Node content

definition

protected final RD extends RenderableDefinition definition
Constructor Detail

RenderingModelImpl

public RenderingModelImpl(javax.jcr.Node 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()
Description copied from interface: RenderingModel
The top root model of the rendering process. In for example the scope of rendering a page this would be the pages model.

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

getContent

public javax.jcr.Node getContent()
Description copied from interface: RenderingModel
The content node tied to this model.

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

getContentMap

public info.magnolia.jcr.util.ContentMap getContentMap()
Description copied from interface: RenderingModel
The content node tied to this model exposed as a ContentMap.

Specified by:
getContentMap in interface RenderingModel<RD extends RenderableDefinition>
Returns:

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 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.