info.magnolia.testframework.util
Class ComponentModelForTests

java.lang.Object
  extended by info.magnolia.testframework.util.ComponentModelForTests
All Implemented Interfaces:
info.magnolia.rendering.model.RenderingModel

public class ComponentModelForTests
extends Object
implements info.magnolia.rendering.model.RenderingModel

Dummy model used in tests, exposing an execution counter and hardcoded arbitrary properties.

Version:
$Id$

Field Summary
 
Fields inherited from interface info.magnolia.rendering.model.RenderingModel
SKIP_RENDERING
 
Constructor Summary
ComponentModelForTests(javax.jcr.Node node, info.magnolia.rendering.template.RenderableDefinition renderable, info.magnolia.rendering.model.RenderingModel parent)
           
 
Method Summary
 String execute()
           
 List<String> getAllowedParagraphs(info.magnolia.cms.core.Content content)
           
 info.magnolia.jcr.util.ContentMap getContent()
           
 info.magnolia.jcr.util.ContentMap getContentMap()
           
 String getCount()
           
 info.magnolia.rendering.template.RenderableDefinition getDefinition()
           
 javax.jcr.Node getNode()
           
 info.magnolia.rendering.model.RenderingModel getParent()
           
 int getRandomInt()
           
 info.magnolia.rendering.model.RenderingModel<?> getRoot()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentModelForTests

public ComponentModelForTests(javax.jcr.Node node,
                              info.magnolia.rendering.template.RenderableDefinition renderable,
                              info.magnolia.rendering.model.RenderingModel parent)
Method Detail

getParent

public info.magnolia.rendering.model.RenderingModel getParent()
Specified by:
getParent in interface info.magnolia.rendering.model.RenderingModel

getNode

public javax.jcr.Node getNode()
Specified by:
getNode in interface info.magnolia.rendering.model.RenderingModel

getContent

public info.magnolia.jcr.util.ContentMap getContent()
Specified by:
getContent in interface info.magnolia.rendering.model.RenderingModel

getDefinition

public info.magnolia.rendering.template.RenderableDefinition getDefinition()
Specified by:
getDefinition in interface info.magnolia.rendering.model.RenderingModel

execute

public String execute()
Specified by:
execute in interface info.magnolia.rendering.model.RenderingModel

getCount

public String getCount()

getRandomInt

public int getRandomInt()

getAllowedParagraphs

public List<String> getAllowedParagraphs(info.magnolia.cms.core.Content content)

getRoot

public info.magnolia.rendering.model.RenderingModel<?> getRoot()
Specified by:
getRoot in interface info.magnolia.rendering.model.RenderingModel

getContentMap

public info.magnolia.jcr.util.ContentMap getContentMap()


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