类 AbstractAtomFeedView

java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.view.AbstractView
cn.taketoday.web.view.feed.AbstractFeedView<com.rometools.rome.feed.atom.Feed>
cn.taketoday.web.view.feed.AbstractAtomFeedView
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.beans.factory.BeanNameAware, cn.taketoday.context.ApplicationContextAware, View

public abstract class AbstractAtomFeedView extends AbstractFeedView<com.rometools.rome.feed.atom.Feed>
Abstract superclass for Atom Feed views, using the ROME package.

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
另请参阅:
  • 字段详细资料

    • DEFAULT_FEED_TYPE

      public static final String DEFAULT_FEED_TYPE
      The default feed type used.
      另请参阅:
    • feedType

      private String feedType
  • 构造器详细资料

    • AbstractAtomFeedView

      public AbstractAtomFeedView()
  • 方法详细资料

    • setFeedType

      public void setFeedType(String feedType)
      Set the Rome feed type to use.

      Defaults to Atom 1.0.

      另请参阅:
    • 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 Exception
      Invokes buildFeedEntries(Map, RequestContext) to get a list of feed entries.
      指定者:
      buildFeedEntries 在类中 AbstractFeedView<com.rometools.rome.feed.atom.Feed>
      参数:
      model - the model Map
      feed - the feed to add entries to
      context - 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 Exception
      Subclasses 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 Map
      context - 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