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

Version:
$Id$

Field Summary
protected  javax.jcr.Node content
           
protected  info.magnolia.jcr.util.ContentMap contentMap
           
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.
 info.magnolia.jcr.util.ContentMap getContent()
          Map representation of the content node tied to this model.
 RD getDef()
          Shortname for templates: model.def.
 RD getDefinition()
          The renderable (template, area or component) tied to this model.
 javax.jcr.Node getNode()
          The content node tied to this model.
 RenderingModel<?> getParent()
          The model of the parent component 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

contentMap

protected info.magnolia.jcr.util.ContentMap contentMap
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 component 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>

getNode

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

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

getContent

public info.magnolia.jcr.util.ContentMap getContent()
Description copied from interface: RenderingModel
Map representation of the content node 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 (template, area or component) 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-2013 Magnolia International Ltd.. All Rights Reserved.