Package org.fenixedu.cms.rss
Class RSSService
- java.lang.Object
-
- org.fenixedu.cms.rss.RSSService
-
public class RSSService extends Object
Service that generates an RSS Feed from either aSite(in which case the feed info is that of the site, and all the site's posts) or aCategory(in which case the feed info is that of the category, and all the category's posts). The generated RSS is compliant with the RSS 2.0 specification, implementing many of the optional feed elements.- Author:
- João Carvalho (joao.pedro.carvalho@tecnico.ulisboa.pt)
-
-
Constructor Summary
Constructors Constructor Description RSSService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgenerateRSSForCategory(Category category, Locale locale)Returns the RSS 2.0 feed for the givenCategory, containing all the category's posts as items.static StringgenerateRSSForSite(Site site, Locale locale)Returns the RSS 2.0 feed for the givenSite, containing all the site's posts as items.
-
-
-
Method Detail
-
generateRSSForSite
public static String generateRSSForSite(Site site, Locale locale) throws XMLStreamException
Returns the RSS 2.0 feed for the givenSite, containing all the site's posts as items.- Parameters:
site- The site to generate the feed for.locale- The locale in which to generate the feed.- Returns:
- The XML of the feed
- Throws:
XMLStreamException- If an exception occurs while generating the feed
-
generateRSSForCategory
public static String generateRSSForCategory(Category category, Locale locale) throws XMLStreamException
Returns the RSS 2.0 feed for the givenCategory, containing all the category's posts as items.- Parameters:
category- The category to generate the feed for.locale- The locale in which to generate the feed.- Returns:
- The XML of the feed
- Throws:
XMLStreamException- If an exception occurs while generating the feed
-
-