org.jasig.portlet.newsreader.adapter
Class RomeAdapter

java.lang.Object
  extended by org.jasig.portlet.newsreader.adapter.AbstractNewsAdapter
      extended by org.jasig.portlet.newsreader.adapter.RomeAdapter
All Implemented Interfaces:
INewsAdapter

public class RomeAdapter
extends AbstractNewsAdapter

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

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
RomeAdapter()
           
 
Method Summary
 NewsFeed getSyndFeed(NewsConfiguration config, javax.portlet.PortletRequest request)
           
protected  NewsFeed getSyndFeed(String url, String titlePolicy, String descriptionPolicy)
          Retrieve the entire feed using HTTPClient and clean using AntiSamy, build an SyndFeed object using ROME.
 void setCache(net.sf.ehcache.Cache cache)
           
 void setProcessor(RomeNewsProcessorImpl processor)
           
 void setProxyHost(String proxyHost)
           
 void setProxyPort(String proxyPort)
           
 
Methods inherited from class org.jasig.portlet.newsreader.adapter.AbstractNewsAdapter
getClassName, getDescriptionKey, getNameKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

RomeAdapter

public RomeAdapter()
Method Detail

setProxyHost

public void setProxyHost(String proxyHost)

setProxyPort

public void setProxyPort(String proxyPort)

setProcessor

public void setProcessor(RomeNewsProcessorImpl processor)

getSyndFeed

public NewsFeed getSyndFeed(NewsConfiguration config,
                            javax.portlet.PortletRequest request)
                     throws NewsException
Throws:
NewsException

getSyndFeed

protected NewsFeed getSyndFeed(String url,
                               String titlePolicy,
                               String descriptionPolicy)
                        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 retrieved
policyFile - String the cleaning policy
Returns:
SyndFeed Feed object
Throws:
NewsException

setCache

public void setCache(net.sf.ehcache.Cache cache)


Copyright © 2009-2013 Jasig. All Rights Reserved.