info.magnolia.module.templatingkit.search
Class SearchResultModel
java.lang.Object
info.magnolia.rendering.model.RenderingModelImpl<RD>
info.magnolia.module.templatingkit.templates.AbstractSTKTemplateModel<info.magnolia.rendering.template.TemplateDefinition>
info.magnolia.module.templatingkit.search.SearchResultModel
- All Implemented Interfaces:
- STKRenderingModel<info.magnolia.rendering.template.TemplateDefinition>, info.magnolia.rendering.model.RenderingModel<info.magnolia.rendering.template.TemplateDefinition>
public class SearchResultModel
- extends AbstractSTKTemplateModel<info.magnolia.rendering.template.TemplateDefinition>
STK Rendable Model definition dedicated to
Display and execute Search Result Model.
- Version:
- $Id$
- Author:
- tmiyar
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 |
SearchResultModel(javax.jcr.Node content,
info.magnolia.rendering.template.TemplateDefinition definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
STKTemplatingFunctions stkFunctions,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
|
Methods inherited from class info.magnolia.rendering.model.RenderingModelImpl |
getContent, getDef, getDefinition, getNode, getParent, getRoot |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.rendering.model.RenderingModel |
getContent, getDefinition, getNode, getParent, getRoot |
repository
protected String repository
result
protected List<info.magnolia.cms.core.Content> result
count
protected int count
maxResultsPerPage
protected int maxResultsPerPage
currentPage
protected int currentPage
numPages
protected int numPages
SearchResultModel
@Inject
public SearchResultModel(javax.jcr.Node content,
info.magnolia.rendering.template.TemplateDefinition definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
STKTemplatingFunctions stkFunctions,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
getMaxResultsPerPage
protected int getMaxResultsPerPage()
execute
public String execute()
- Specified by:
execute
in interface info.magnolia.rendering.model.RenderingModel<info.magnolia.rendering.template.TemplateDefinition>
- Overrides:
execute
in class info.magnolia.rendering.model.RenderingModelImpl<info.magnolia.rendering.template.TemplateDefinition>
getOffset
protected int getOffset()
pagedQuery
protected int pagedQuery(Collection<info.magnolia.cms.core.Content> queryResult,
int offset,
int limit)
throws Exception
- Throws:
Exception
generateSimpleQuery
protected String generateSimpleQuery(String input)
getPath
public String getPath()
getQueryResult
public List<javax.jcr.Node> getQueryResult()
- FIXME usage of deprecated classes:
Content
.
To remove when SearchResultItem will be fully migrated.
getResult
public Collection<SearchResultItem> getResult()
getQueryStr
public String getQueryStr()
getCount
public int getCount()
getCurrentPage
public int getCurrentPage()
getNumPages
public int getNumPages()
getPageLink
public String getPageLink(int i)
- Deprecated. Not used anymore.
- Not used.
- Parameters:
i
-
- Returns:
getBeginIndex
public int getBeginIndex()
getEndIndex
public int getEndIndex()
getPosition
public String getPosition()
Copyright © 2008-2013 Magnolia International Ltd.. All Rights Reserved.