com.sun.portal.rssportlet
Class RssPortletHelper

java.lang.Object
  extended bycom.sun.portal.rssportlet.RssPortletHelper
All Implemented Interfaces:
RssPortletConstants

public class RssPortletHelper
extends Object
implements RssPortletConstants

This class provides helper methods use within the Rss Portlet JSPs.

This API is unstable and changing.


Field Summary
 
Fields inherited from interface com.sun.portal.rssportlet.RssPortletConstants
CACHE_TIMEOUT_PROP, DEFAULT_FEED_PROP, DISABLE_MAX_AGE_PROP, FEEDS_PROP, FILE_NOT_FOUND_ERROR_PARAM, INPUT_ADD_FEED, INPUT_DISABLE_MAX_AGE, INPUT_FEEDS, INPUT_MAX_AGE, INPUT_MAX_ENTRIES, INPUT_NEWWIN, INPUT_SELECT_FEED, INPUT_START_FEED, MALFORMED_URL_ERROR_PARAM, MAX_AGE_LT_ONE_ERROR_PARAM, MAX_AGE_NAN_ERROR_PARAM, MAX_AGE_PROP, MAX_DESCRIPTION_LENGTH_PROP, MAX_ENTRIES_LT_ONE_ERROR_PARAM, MAX_ENTRIES_NAN_ERROR_PARAM, MAX_ENTRIES_PROP, NEWWIN_PROP, START_FEED_PROP, SUBMIT_ADD, SUBMIT_EDIT, SUBMIT_GO, UNKNOWN_HOST_ERROR_PARAM
 
Method Summary
static SyndFeed getFeed(String url, PortletRequest req)
          Get the Rome SyndFeedI object for the specified URL.
static String getSelectedFeed(PortletRequest req, PortletConfig config)
          Get the selected feed URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFeed

public static SyndFeed getFeed(String url,
                               PortletRequest req)
                        throws IOException,
                               FeedException
Get the Rome SyndFeedI object for the specified URL. The object may come from a cache; the data in the feed may not be read synchronously at the time this method is called. Cache time is controlled by the portlet's initialization parameter: cacheTimeout.

Parameters:
url - The feed URL.
Returns:
a Rome SyndFeedI object encapsulating the feed specified by the URL.
Throws:
IOException
FeedException

getSelectedFeed

public static String getSelectedFeed(PortletRequest req,
                                     PortletConfig config)
Get the selected feed URL. The selected feed URL is the one that is currently displayed in the portlet's view mode (content JSP). The selected feed, if set, is stored in the portlet session. If no selected feed is set in the session, then this method returns the portlet's start feed. This causes the portlet to display the start feed when a user initially accesses the portlet. If there is no start feed set in the portlet's preferences, then the default feed property value is returned.

Parameters:
config - The portlet's PortletConfig object
Returns:
a String, the selected feed URL