info.magnolia.module.samples.model
Class SampleComponentModel

java.lang.Object
  extended by info.magnolia.rendering.model.RenderingModelImpl<RenderableDefinition>
      extended by info.magnolia.module.samples.model.SampleComponentModel
All Implemented Interfaces:
RenderingModel<RenderableDefinition>

public class SampleComponentModel
extends RenderingModelImpl<RenderableDefinition>

This model class is defined in the component definition in the configuration (modules/samples/components/name-of-component/modelClass). To be accessed in the template file by def.method-name. Component models can also be defined in the component definitions.

Version:
$Id$

Field Summary
 
Fields inherited from class info.magnolia.rendering.model.RenderingModelImpl
content, contentMap, definition, parentModel
 
Fields inherited from interface info.magnolia.rendering.model.RenderingModel
SKIP_RENDERING
 
Constructor Summary
SampleComponentModel(javax.jcr.Node content, RenderableDefinition definition, RenderingModel<?> parent, TemplatingFunctions functions)
           
 
Method Summary
 String getQuery()
           
 List<ContentMap> getSearchResult()
           
 void setQuery(String query)
           
 
Methods inherited from class info.magnolia.rendering.model.RenderingModelImpl
execute, getContent, getDef, getDefinition, getNode, getParent, getRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleComponentModel

@Inject
public SampleComponentModel(javax.jcr.Node content,
                                   RenderableDefinition definition,
                                   RenderingModel<?> parent,
                                   TemplatingFunctions functions)
Method Detail

getQuery

public String getQuery()

setQuery

public void setQuery(String query)

getSearchResult

public List<ContentMap> getSearchResult()
                                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.