info.magnolia.module.rssaggregator.templates.components
Class AbstractFeedModel<RD extends info.magnolia.rendering.template.RenderableDefinition>

java.lang.Object
  extended by info.magnolia.rendering.model.RenderingModelImpl<RD>
      extended by info.magnolia.module.rssaggregator.templates.components.AbstractFeedModel<RD>
Type Parameters:
RD -
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

Field Summary
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
           
 
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)
           
 
Method Summary
 Date convertPubDate(Object timestamp)
          This can get sometimes confusing.
 String getContextPath()
           
 
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
 

Field Detail

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

templatingFunctions

protected final info.magnolia.templating.functions.TemplatingFunctions templatingFunctions
Constructor Detail

AbstractFeedModel

@Inject
public AbstractFeedModel(javax.jcr.Node content,
                                RD definition,
                                info.magnolia.rendering.model.RenderingModel<?> parent,
                                info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
Method Detail

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

Parameters:
timestamp -
Returns:

getContextPath

public String getContextPath()


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.