org.jasig.portlet.newsreader.adapter
Class RomeAdapter
java.lang.Object
org.jasig.portlet.newsreader.adapter.RomeAdapter
- All Implemented Interfaces:
- INewsAdapter
public class RomeAdapter
- extends Object
- implements INewsAdapter
RomeAdapter is a NewsAdapter for standard RSS and ATOM feeds available
online via http or https.
Note: This class can process and feed supported by ROME https://rome.dev.java.net/.
- Author:
- Anthony Colebourne
|
Method Summary |
com.sun.syndication.feed.synd.SyndFeed |
getSyndFeed(NewsConfiguration config,
javax.portlet.PortletRequest request)
|
protected com.sun.syndication.feed.synd.SyndFeed |
getSyndFeed(String url,
String policyFile)
Retrieve the entire feed using HTTPClient and clean using AntiSamy,
build an SyndFeed object using ROME. |
void |
setCache(net.sf.ehcache.Cache cache)
|
void |
setPolicyFile(String policyFile)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RomeAdapter
public RomeAdapter()
getSyndFeed
public com.sun.syndication.feed.synd.SyndFeed getSyndFeed(NewsConfiguration config,
javax.portlet.PortletRequest request)
throws NewsException
- Specified by:
getSyndFeed in interface INewsAdapter
- Throws:
NewsException
getSyndFeed
protected com.sun.syndication.feed.synd.SyndFeed getSyndFeed(String url,
String policyFile)
throws NewsException
- Retrieve the entire feed using HTTPClient and clean using AntiSamy,
build an SyndFeed object using ROME.
- Parameters:
url - String of the feed to be retrievedpolicyFile - String the cleaning policy
- Returns:
- SyndFeed Feed object
- Throws:
NewsException
setCache
public void setCache(net.sf.ehcache.Cache cache)
setPolicyFile
public void setPolicyFile(String policyFile)
Copyright © 2009-2010 Jasig. All Rights Reserved.