类 AbstractRssFeedView
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.beans.factory.BeanNameAware,cn.taketoday.context.ApplicationContextAware,View
NOTE: this is based on the com.rometools
variant of ROME, version 1.5. Please upgrade your build dependency.
Application-specific view classes will extend this class.
The view will be held in the subclass itself, not in a template.
Main entry points are the AbstractFeedView.buildFeedMetadata(java.util.Map<java.lang.String, java.lang.Object>, T, cn.taketoday.web.RequestContext) and buildFeedItems(java.util.Map<java.lang.String, java.lang.Object>, cn.taketoday.web.RequestContext).
Thanks to Jettro Coenradie and Sergio Bossa for the original feed view prototype!
-
字段概要
从类继承的字段 cn.taketoday.web.view.AbstractView
DEFAULT_CONTENT_TYPE从类继承的字段 cn.taketoday.context.support.ApplicationObjectSupport
applicationContext, log, messageSourceAccessor从接口继承的字段 cn.taketoday.web.view.View
RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected final voidbuildFeedEntries(Map<String, Object> model, com.rometools.rome.feed.rss.Channel channel, RequestContext context) InvokesbuildFeedItems(Map, RequestContext)to get a list of feed items.protected abstract List<com.rometools.rome.feed.rss.Item>buildFeedItems(Map<String, Object> model, RequestContext context) Subclasses must implement this method to build feed items, given the model.protected com.rometools.rome.feed.rss.ChannelnewFeed()Create a new Channel instance to hold the entries.从类继承的方法 cn.taketoday.web.view.feed.AbstractFeedView
buildFeedMetadata, renderMergedOutputModel从类继承的方法 cn.taketoday.web.view.AbstractView
addStaticAttribute, createMergedOutputModel, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestContextToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposeOutputRedirectModel, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponse从类继承的方法 cn.taketoday.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext, unwrapContext, unwrapFactory
-
构造器详细资料
-
AbstractRssFeedView
public AbstractRssFeedView()
-
-
方法详细资料
-
newFeed
protected com.rometools.rome.feed.rss.Channel newFeed()Create a new Channel instance to hold the entries.By default returns an RSS 2.0 channel, but the subclass can specify any channel.
- 指定者:
newFeed在类中AbstractFeedView<com.rometools.rome.feed.rss.Channel>- 返回:
- the newly created Feed instance
-
buildFeedEntries
protected final void buildFeedEntries(Map<String, Object> model, com.rometools.rome.feed.rss.Channel channel, RequestContext context) throws ExceptionInvokesbuildFeedItems(Map, RequestContext)to get a list of feed items.- 指定者:
buildFeedEntries在类中AbstractFeedView<com.rometools.rome.feed.rss.Channel>- 参数:
model- the model Mapchannel- the feed to add entries tocontext- in case we need locale etc. Shouldn't look at attributes.- 抛出:
Exception- any exception that occurred during building
-
buildFeedItems
protected abstract List<com.rometools.rome.feed.rss.Item> buildFeedItems(Map<String, Object> model, RequestContext context) throws ExceptionSubclasses must implement this method to build feed items, given the model.Note that the passed-in HTTP response is just supposed to be used for setting cookies or other HTTP headers. The built feed itself will automatically get written to the response after this method returns.
- 参数:
model- the model Mapcontext- in case we need locale etc. Shouldn't look at attributes.- 返回:
- the feed items to be added to the feed
- 抛出:
Exception- any exception that occurred during document building- 另请参阅:
-
Item
-