use of net.jforum.util.rss.TopicRSS in project jforum2 by rafaelsteil.
the class RSSAction method forumTopics.
/**
* RSS for all N first topics for some given forum
*/
public void forumTopics() {
int forumId = this.request.getIntParameter("forum_id");
if (!TopicsCommon.isTopicAccessible(forumId)) {
JForumExecutionContext.requestBasicAuthentication();
return;
}
List posts = DataAccessDriver.getInstance().newPostDAO().selectLatestByForumForRSS(forumId, SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE));
Forum forum = ForumRepository.getForum(forumId);
String[] p = { forum.getName() };
RSSAware rss = new TopicRSS(I18n.getMessage("RSS.ForumTopics.title", p), I18n.getMessage("RSS.ForumTopics.description", p), forumId, posts);
this.context.put("rssContents", rss.createRSS());
}