| org.sakaiproject.news.api.NewsService
All known Subclasses: org.sakaiproject.news.impl.BasicNewsService,
NewsService | public interface NewsService extends EntityProducer(Code) | |
NewsService is the interface for retrieving and caching news items from a rss news feed.
|
Field Summary | |
final public static String | REFERENCE_ROOT This string starts the references to resources in this service. | final public static String | SERVICE_NAME This string can be used to find the service in the service manager. |
Method Summary | |
public NewsChannel | getChannel(String source) Retrieves a NewsChannel object indexed by a URL.
Parameters: source - The url for the channel. | public List | getChannels() Retrieves a list of rss feeds that are being used. | public List | getNewsitems(String channel) Retrieves a list of items from an rss feed.
Parameters: channel - The url for the feed. | public List | getNewsitems(String channel, Filter filter) Retrieves a list of items from an rss feed.
Parameters: channel - The url for the feed. Parameters: filter - A filtering object to accept NewsItems, or null if no filtering is desired. | public boolean | isUpdateAvailable(String channel) Checks whether an update is available for the rss news feed.
Parameters: feed - The url for the feed. | public void | removeChannel(String channel) Retrieves a list of rss feeds that are being used.
A list of NewsChannel objects (possibly empty). |
REFERENCE_ROOT | final public static String REFERENCE_ROOT(Code) | | This string starts the references to resources in this service.
|
SERVICE_NAME | final public static String SERVICE_NAME(Code) | | This string can be used to find the service in the service manager.
|
getChannels | public List getChannels()(Code) | | Retrieves a list of rss feeds that are being used.
A list of NewsChannel objects (possibly empty). |
getNewsitems | public List getNewsitems(String channel, Filter filter) throws NewsConnectionException, NewsFormatException(Code) | | Retrieves a list of items from an rss feed.
Parameters: channel - The url for the feed. Parameters: filter - A filtering object to accept NewsItems, or null if no filtering is desired. A list of NewsItem objects retrieved from the feed. ?if param feed is not a valid url. |
isUpdateAvailable | public boolean isUpdateAvailable(String channel)(Code) | | Checks whether an update is available for the rss news feed.
Parameters: feed - The url for the feed. true if update is available, false otherwise ?if param feed is not a valid url. |
removeChannel | public void removeChannel(String channel)(Code) | | Retrieves a list of rss feeds that are being used.
A list of NewsChannel objects (possibly empty). ?if param channel is not a valid url. |
|
|