public abstract class AbstractSyndFeedGenerator extends Object implements FeedGenerator
Feed
from a SyndFeed
.
The generated feed will by default be of type
RSSAggregator.DEFAULT_FEEDTYPE
. Subclasses need implement the template
methods loadFeedEntries()
and setFeedInfo(SyndFeed)
to have a Feed generated.FeedGenerator
,
SyndFeed
,
Feed
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_NAME_ABSTRACT |
static String |
PROPERTY_NAME_AUTHOR |
static String |
PROPERTY_NAME_CATEGORIES |
static String |
PROPERTY_NAME_DESCRIPTION |
static String |
PROPERTY_NAME_PUB_DATE |
static String |
PROPERTY_NAME_TITLE |
Constructor and Description |
---|
AbstractSyndFeedGenerator() |
Modifier and Type | Method and Description |
---|---|
Feed |
generate()
Generate a SyndFeed.
|
abstract List<com.rometools.rome.feed.synd.SyndEntry> |
loadFeedEntries()
Template method for subclasses to implement in order to provide the feed entries to include in the Feed to
generate.
|
protected com.rometools.rome.feed.synd.SyndFeedImpl |
newSyndFeed()
Construct a new SyndFeed instance.
|
abstract void |
setFeedInfo(com.rometools.rome.feed.synd.SyndFeed feed)
Template method for subclasses are to override in order to set appropriate Feed meta data.
|
protected String |
syndFeedToXml(com.rometools.rome.feed.synd.SyndFeed feed) |
public static final String PROPERTY_NAME_TITLE
public static final String PROPERTY_NAME_DESCRIPTION
public static final String PROPERTY_NAME_AUTHOR
public static final String PROPERTY_NAME_PUB_DATE
public static final String PROPERTY_NAME_ABSTRACT
public static final String PROPERTY_NAME_CATEGORIES
public Feed generate() throws FeedGenerationException
generate
in interface FeedGenerator
FeedGenerationException
- when an exception occurs while generating the aggregate feedprotected String syndFeedToXml(com.rometools.rome.feed.synd.SyndFeed feed) throws com.rometools.rome.io.FeedException
com.rometools.rome.io.FeedException
protected com.rometools.rome.feed.synd.SyndFeedImpl newSyndFeed()
public abstract List<com.rometools.rome.feed.synd.SyndEntry> loadFeedEntries()
public abstract void setFeedInfo(com.rometools.rome.feed.synd.SyndFeed feed)
title
, link
and description
. The given feed
will never be null.feed
- the syndication feed that is generated to set the feed meta data forCopyright © 2016 Magnolia International Ltd.. All rights reserved.