RD
- Definition type.public abstract class AbstractFeedModel<RD extends info.magnolia.rendering.template.RenderableDefinition>
extends info.magnolia.rendering.model.RenderingModelImpl<RD>
implements info.magnolia.rendering.model.RenderingModel<RD>
Modifier and Type | Field and Description |
---|---|
protected static String |
FEEDS_NODE |
protected static org.slf4j.Logger |
log |
protected static int |
MAX_RESULTS |
static String |
ORDER_BY_PUBLICATION_DATE |
static String |
ORDER_BY_TITLE_NAME |
static String |
SORT_ASCENDING |
static String |
SORT_DESCENDING |
protected info.magnolia.templating.functions.TemplatingFunctions |
templatingFunctions |
Constructor and Description |
---|
AbstractFeedModel(javax.jcr.Node content,
RD definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions) |
Modifier and Type | Method and Description |
---|---|
Date |
convertPubDate(Object timestamp)
This can get sometimes confusing.
|
String |
getContextPath() |
String |
getFeedProperty(javax.jcr.Node parentNode,
String subNode,
String searchProperty,
String searchValue,
String resultProperty)
Find a feed node and return a property.
|
String |
getFeedTitle(String feedLink)
Retrieve the title attribute of an individual feed subscription.
|
Collection<javax.jcr.Node> |
getPlanetItems(String feedPath,
String condition,
String order,
boolean limit)
Select items from the data module for planet components.
|
protected javax.jcr.NodeIterator |
runQuery(String queryString) |
execute, getContent, getDef, getDefinition, getNode, getParent, getRoot
protected static final org.slf4j.Logger log
public static final String ORDER_BY_PUBLICATION_DATE
public static final String ORDER_BY_TITLE_NAME
public static final String SORT_ASCENDING
public static final String SORT_DESCENDING
protected static final String FEEDS_NODE
protected static final int MAX_RESULTS
protected final info.magnolia.templating.functions.TemplatingFunctions templatingFunctions
@Inject public AbstractFeedModel(javax.jcr.Node content, RD definition, info.magnolia.rendering.model.RenderingModel<?> parent, info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
public Date convertPubDate(Object timestamp)
public Collection<javax.jcr.Node> getPlanetItems(String feedPath, String condition, String order, boolean limit)
feedPath
- path where the items should be taken fromcondition
- query conditionsorder
- order of the resulting listlimit
- if set to true, the resulting list will be shortend to the maximum number of entries allowed (if specified)public String getFeedTitle(String feedLink)
feedLink
- Link to the feed.public String getFeedProperty(javax.jcr.Node parentNode, String subNode, String searchProperty, String searchValue, String resultProperty)
parentNode
- Planet feed node.subNode
- Node of the feed node where search should happen.searchProperty
- Node Property that should be searched.searchValue
- Search value.resultProperty
- Property value od found node to be returned or null.public String getContextPath()
protected javax.jcr.NodeIterator runQuery(String queryString) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2016 Magnolia International Ltd.. All rights reserved.