info.magnolia.module.rssaggregator.templates.components
Class AbstractFeedModel<RD extends info.magnolia.rendering.template.RenderableDefinition>
java.lang.Object
info.magnolia.rendering.model.RenderingModelImpl<RD>
info.magnolia.module.rssaggregator.templates.components.AbstractFeedModel<RD>
- Type Parameters:
RD
- Definition type.
- All Implemented Interfaces:
- info.magnolia.rendering.model.RenderingModel<RD>
- Direct Known Subclasses:
- CombinedFeedModel, FeedListModel, FeedStatisticsModel, FeedSubscriptionsModel, PlanetFeedModel
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>
Base class for rendering models.
- Version:
- $Id:$
- Author:
- had
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 |
AbstractFeedModel(javax.jcr.Node content,
RD definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
|
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 |
Methods inherited from interface info.magnolia.rendering.model.RenderingModel |
execute, getContent, getDefinition, getNode, getParent, getRoot |
log
protected static final org.slf4j.Logger log
ORDER_BY_PUBLICATION_DATE
public static final String ORDER_BY_PUBLICATION_DATE
- See Also:
- Constant Field Values
ORDER_BY_TITLE_NAME
public static final String ORDER_BY_TITLE_NAME
- See Also:
- Constant Field Values
SORT_ASCENDING
public static final String SORT_ASCENDING
- See Also:
- Constant Field Values
SORT_DESCENDING
public static final String SORT_DESCENDING
- See Also:
- Constant Field Values
AGGREGATOR_NODE
protected static final String AGGREGATOR_NODE
- See Also:
- Constant Field Values
DATA_WORKSPACE
protected static final String DATA_WORKSPACE
- See Also:
- Constant Field Values
FEEDS_NODE
protected static final String FEEDS_NODE
- See Also:
- Constant Field Values
MAX_RESULTS
protected static final int MAX_RESULTS
- See Also:
- Constant Field Values
templatingFunctions
protected final info.magnolia.templating.functions.TemplatingFunctions templatingFunctions
AbstractFeedModel
@Inject
public AbstractFeedModel(javax.jcr.Node content,
RD definition,
info.magnolia.rendering.model.RenderingModel<?> parent,
info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
convertPubDate
public Date convertPubDate(Object timestamp)
- This can get sometimes confusing. Freemarker will not create date from the java long time stamp format so we need to convert it to date first.
Depending on circumstances (whether coming from node or from node wrapper) the time stamp will be passed in as a String or as a Long object
getPlanetItems
public Collection<javax.jcr.Node> getPlanetItems(String feedPath,
String condition,
String order,
boolean limit)
- Select items from the data module for planet components.
- Parameters:
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)
getFeedTitle
public String getFeedTitle(String feedLink)
- Retrieve the title attribute of an individual feed subscription.
- Parameters:
feedLink
- Link to the feed.
- Returns:
- Assigned title of a feed if defined in the dialog or null.
getFeedProperty
public String getFeedProperty(javax.jcr.Node parentNode,
String subNode,
String searchProperty,
String searchValue,
String resultProperty)
- Find a feed node and return a property.
- Parameters:
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.
getContextPath
public String getContextPath()
runQuery
protected javax.jcr.NodeIterator runQuery(String queryString)
throws javax.jcr.LoginException,
javax.jcr.RepositoryException
- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.