类 AbstractAtomFeedView
- 所有已实现的接口:
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 buildFeedEntries(java.util.Map<java.lang.String, java.lang.Object>, com.rometools.rome.feed.atom.Feed, cn.taketoday.web.RequestContext).
Thanks to Jettro Coenradie and Sergio Bossa for the original feed view prototype!
- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Juergen Hoeller
- 另请参阅:
-
字段概要
字段从类继承的字段 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 abstract List<com.rometools.rome.feed.atom.Entry>buildFeedEntries(Map<String, Object> model, RequestContext context) Subclasses must implement this method to build feed entries, given the model.protected final voidbuildFeedEntries(Map<String, Object> model, com.rometools.rome.feed.atom.Feed feed, RequestContext context) InvokesbuildFeedEntries(Map, RequestContext)to get a list of feed entries.protected com.rometools.rome.feed.atom.FeednewFeed()Create a new Feed instance to hold the entries.voidsetFeedType(String feedType) Set the Rome feed type to use.从类继承的方法 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
-
字段详细资料
-
DEFAULT_FEED_TYPE
The default feed type used.- 另请参阅:
-
feedType
-
-
构造器详细资料
-
AbstractAtomFeedView
public AbstractAtomFeedView()
-
-
方法详细资料
-
setFeedType
Set the Rome feed type to use.Defaults to Atom 1.0.
- 另请参阅:
-
WireFeed.setFeedType(String)DEFAULT_FEED_TYPE
-
newFeed
protected com.rometools.rome.feed.atom.Feed newFeed()Create a new Feed instance to hold the entries.By default returns an Atom 1.0 feed, but the subclass can specify any Feed.
- 指定者:
newFeed在类中AbstractFeedView<com.rometools.rome.feed.atom.Feed>- 返回:
- the newly created Feed instance
- 另请参阅:
-
buildFeedEntries
protected final void buildFeedEntries(Map<String, Object> model, com.rometools.rome.feed.atom.Feed feed, RequestContext context) throws ExceptionInvokesbuildFeedEntries(Map, RequestContext)to get a list of feed entries.- 指定者:
buildFeedEntries在类中AbstractFeedView<com.rometools.rome.feed.atom.Feed>- 参数:
model- the model Mapfeed- the feed to add entries tocontext- in case we need locale etc. Shouldn't look at attributes.- 抛出:
Exception- any exception that occurred during building
-
buildFeedEntries
protected abstract List<com.rometools.rome.feed.atom.Entry> buildFeedEntries(Map<String, Object> model, RequestContext context) throws ExceptionSubclasses must implement this method to build feed entries, 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 entries to be added to the feed
- 抛出:
Exception- any exception that occurred during document building- 另请参阅:
-
Entry
-