public SyndFeed getFeeds(String sfeeds, boolean ignoreInvalidFeeds, boolean force, XWikiContext context) throws IOException { String[] feeds; if (sfeeds.indexOf("\n") != -1) { feeds = sfeeds.split("\n"); } else { feeds = sfeeds.split("\\|"); } List<SyndEntry> entries = new ArrayList<SyndEntry>(); SyndFeed outputFeed = new SyndFeedImpl(); if (context.getDoc() != null) { outputFeed.setTitle(context.getDoc().getFullName()); outputFeed.setUri(context.getWiki().getURL(context.getDoc().getFullName(), "view", context)); outputFeed.setAuthor(context.getDoc().getAuthor()); } else { outputFeed.setTitle("XWiki Feeds"); outputFeed.setAuthor("XWiki Team"); } for (int i = 0; i < feeds.length; i++) { SyndFeed feed = getFeed(feeds[i], ignoreInvalidFeeds, force, context); if (feed != null) { entries.addAll(feed.getEntries()); } } SyndEntryComparator comp = new SyndEntryComparator(); Collections.sort(entries, comp); outputFeed.setEntries(entries); return outputFeed; }
private SyndFeed getSyndFeed() { // Create i18n bean I18NBean i18nbean = getI18NBean(); SyndFeed feed = new SyndFeedImpl(); feed.setTitle(i18nbean.getText("bookmark.rss.title")); feed.setLink(settingsManager.getGlobalSettings().getBaseUrl()); feed.setUri(settingsManager.getGlobalSettings().getBaseUrl()); feed.setDescription(i18nbean.getText("bookmark.rss.description")); return feed; }
feed.setLink(objectURL); feed.setPublishedDate(new Date()); feed.setUri(objectURL);
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());
syndFeed.setUri(aFeed.getId());