Examples of SyndFeedImpl


Examples of com.sun.syndication.feed.synd.SyndFeedImpl

        }
        return description;
    }

    protected SyndFeed createFeed(QueueBrowser browser, HttpServletRequest request) throws JMSException {
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(feedType);

        String title = browser.getQueue().toString();
        String selector = browser.getMessageSelector();
        if (selector != null) {
            title += " with selector: " + selector;
        }
        feed.setTitle(title);
        feed.setLink(request.getRequestURI());
        feed.setDescription(getDescription());
        return feed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

        {
            log.debug( "No updates found, feed not generated." );
            return null;
        }
       
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle( title );       
        feed.setDescription( description );
        feed.setLanguage( DEFAULT_LANGUAGE );
        feed.setPublishedDate( dataEntries.get( dataEntries.size() - 1 ).getPublishedDate() );
        feed.setFeedType( DEFAULT_FEEDTYPE );
        feed.setEntries( getEntries( dataEntries ) );

        log.debug( "Finished generating the feed \'{}\'.", title );
       
        return feed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

public class FeedReader extends ScriptableObject {

    private SyndFeed feed;

    public void jsConstructor() {
        feed = new SyndFeedImpl();
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    private SyndFeed feed;

    private static Log log = LogFactory.getLog(Feed.class);

    public Scriptable jsConstructor() {
        feed = new SyndFeedImpl();
        feed.setFeedType("rss_2.0");
        return this;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    public Scriptable jsGet_XML() throws CarbonException {

        Context cx = Context.getCurrentContext();

        //Creating a bogus feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(this.getType());
        feed.setTitle("placeHolderTitle");
        feed.setDescription("placeHoldeDescription");
        feed.setLink("http://place.holder.link");
        List entries = feed.getEntries();
        entries.add(entry);
        feed.setEntries(entries);

        SyndFeedOutput output = new SyndFeedOutput();
        try {
            String xmlRep = output.outputString(feed);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

     */
    public SyndFeedRepresentation(String feedType, List<?> entries,
            CharacterSet characterSet) {
        super(getMediaType(feedType));
        setCharacterSet(characterSet);
        this.feed = new SyndFeedImpl();
        this.feed.setFeedType(feedType);
        this.feed.setEntries(entries);
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

     *
     * @return An RSS feed containing all the blog posts.
     */
    public SyndFeed getFeed() {
        // Create SCA Tours blog RSS feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle(FEED_TITLE);
        feed.setDescription(FEED_DESCRIPTION);
        feed.setAuthor(FEED_AUTHOR);

        // Get all blog posts and convert to RSS entries
        final List<BlogPost> blogEntries = getAllBlogPosts();
        for (BlogPost blogEntry : blogEntries) {
            SyndEntry entry = new SyndEntryImpl();
            entry.setUri(nextBlogID());
            entry.setAuthor(blogEntry.getAuthor());
            entry.setTitle(blogEntry.getTitle());

            SyndContent content = new SyndContentImpl();
            content.setType("text");
            content.setValue(blogEntry.getContent());

            entry.setPublishedDate(blogEntry.getUpdated());
            entry.setLink(blogEntry.getLink());

            feed.getEntries().add(entry);
        }

        return feed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

                }
                org.apache.tuscany.sca.data.collection.Entry<Object, Object>[] collection =
                    (org.apache.tuscany.sca.data.collection.Entry<Object, Object>[])responseMessage.getBody();
                if (collection != null) {
                    // Create the feed
                    feed = new SyndFeedImpl();
                    feed.setTitle("Feed");
                    feed.setDescription("Feed description");
                   
                    for (org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry: collection) {
                        SyndEntry feedEntry = createFeedEntry(entry);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

* @version 3.0
*/
public class FeedServiceImpl implements FeedService {

    public SyndFeed getFeed(String feedType) throws ParseException {
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(feedType);
        feed.setTitle(title);
        feed.setLink(link);
        feed.setDescription(description);
        feed.setEntries(getEntries());
        return feed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

   *
   * @throws Exception
   */
  private SyndFeed getFeed(HttpServletRequest request) throws Exception {
    List<RecentChange> changes = getChanges(request);
    SyndFeed feed = new SyndFeedImpl();
    feed.setEncoding(FEED_ENCODING);
    feed.setTitle(Environment.getValue(Environment.PROP_RSS_TITLE));
    StringBuffer requestURL = request.getRequestURL();
    String feedURL = feedUrlPrefix + requestURL.substring(0, requestURL.length() - WikiUtil.getTopicFromURI(request).length());
    feed.setLink(feedURL);
    feed.setDescription("List of the last " + changes.size() + " changed wiki pages.");
    boolean includeMinorEdits = ServletRequestUtils.getBooleanParameter(request, MINOR_EDITS,
        defaultIncludeMinorEdits);
    boolean linkToVersion = ServletRequestUtils.getBooleanParameter(request, LINK_TO_VERSION, defaultLinkToVersion);
    feed.setEntries(getFeedEntries(changes, includeMinorEdits, linkToVersion, feedURL));
    return feed;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.