info.magnolia.module.rssaggregator.generator
Class PlanetFeedGenerator

java.lang.Object
  extended by info.magnolia.module.rssaggregator.generator.AbstractSyndFeedGenerator
      extended by info.magnolia.module.rssaggregator.generator.PlanetFeedGenerator
All Implemented Interfaces:
FeedGenerator, Cloneable

public class PlanetFeedGenerator
extends AbstractSyndFeedGenerator
implements Cloneable

Generates a SyndFeed based on aggregate planet feeds defined via the RSS Aggregator Module.

Author:
lfischer

Constructor Summary
PlanetFeedGenerator()
           
 
Method Summary
 Object clone()
           
 Feed generate()
          Generate a SyndFeed.
protected  String getFeedType()
          Determine the feed type.
 List<com.sun.syndication.feed.synd.SyndEntry> loadFeedEntries()
          Template method for subclasses to implement in order to provide the feed entries to include in the Feed to generate.
 void setFeedInfo(com.sun.syndication.feed.synd.SyndFeed feed)
          Template method for subclasses are to override in order to set appropriate Feed meta data.
 void setFeedPath(String feedPath)
           
 
Methods inherited from class info.magnolia.module.rssaggregator.generator.AbstractSyndFeedGenerator
newSyndFeed, syndFeedToXml
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanetFeedGenerator

public PlanetFeedGenerator()
Method Detail

setFeedPath

public void setFeedPath(String feedPath)

generate

public Feed generate()
              throws FeedGenerationException
Description copied from class: AbstractSyndFeedGenerator
Generate a SyndFeed.

Specified by:
generate in interface FeedGenerator
Overrides:
generate in class AbstractSyndFeedGenerator
Returns:
the generated SyndFeed
Throws:
FeedGenerationException - when an exception occurs while generating the aggregate feed

loadFeedEntries

public List<com.sun.syndication.feed.synd.SyndEntry> loadFeedEntries()
Description copied from class: AbstractSyndFeedGenerator
Template method for subclasses to implement in order to provide the feed entries to include in the Feed to generate.

Specified by:
loadFeedEntries in class AbstractSyndFeedGenerator
Returns:
the feed entries to include in the Feed to generate

setFeedInfo

public void setFeedInfo(com.sun.syndication.feed.synd.SyndFeed feed)
Description copied from class: AbstractSyndFeedGenerator
Template method for subclasses are to override in order to set appropriate Feed meta data. Typical use cases would be to set the title , link and description. The given feed will never be null.

Specified by:
setFeedInfo in class AbstractSyndFeedGenerator
Parameters:
feed - the syndication feed that is generated to set the feed meta data for

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getFeedType

protected String getFeedType()
Determine the feed type.

Returns:
ATOM or RSS feed type


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