Examples of SyndFeedImpl


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

        String customerID = uri.substring(uri.lastIndexOf('/')+1);
        double balance = accountService.getAccountReport(customerID);
        String value = Double.toString(balance);
       
        // Create a new Feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle("Account Report Feed");
        feed.setDescription("A sample Account Report feed");
        feed.setAuthor("anonymous");
        feed.setLink(uri);
       
        SyndEntry entry = new SyndEntryImpl();
        entry.setAuthor("anonymous");
        SyndContent content = new SyndContentImpl();
        content.setValue(value);
        entry.setDescription(content);
        feed.getEntries().add(entry);

        return feed;
    }
View Full Code Here

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

    @SuppressWarnings("unchecked")
    public SyndFeed get(String uri) {
       
        // Create a new Feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle(feedTitle);
        feed.setDescription(feedDescription);
        feed.setAuthor(feedAuthor);
        feed.setLink(uri);

        // Aggregate entries from feed1 and feed2
        List<SyndEntry> entries = new ArrayList<SyndEntry>();
        entries.addAll(feed1.get(null).getEntries());
        entries.addAll(feed2.get(null).getEntries());

        // Sort entries by published date
        if (sort != null)
            feed.setEntries(sort.sort(entries));
        else
            feed.setEntries(entries);
        return feed;
    }
View Full Code Here

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

     * @return the structure containing alerts
     */   
    public SyndFeed get(String uri) {
       
        // Create a new Feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle("Apache Tuscant Feed Aggregator");
        feed.setDescription("A sample showing an SCA application to aggregate various types of feeds");
        feed.setAuthor("Apache Tuscany");
        feed.setLink(uri);
        // Aggregate entries from feed1 and feed2
        List<SyndEntry> entries = new ArrayList<SyndEntry>();
       
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                SyndEntry entry = new SyndEntryImpl();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.setLink(alert.getAddress());
                entry.setPublishedDate(dateFormatter.parse(alert.getDate()));
                       
                entries.add(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
       
        feed.setEntries(entries);
        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");
                   
                    for (org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry: collection) {
                        SyndEntry feedEntry = createFeedEntry(entry);
                        feed.getEntries().add(feedEntry);
View Full Code Here

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

     * @return the structure containing alerts
     */   
    public Feed getFeed() {
       
        // Create a new Feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setTitle("Apache Tuscant Feed Aggregator");
        feed.setDescription("A sample showing an SCA application to aggregate various types of feeds");
        feed.setAuthor("Apache Tuscany");
        feed.setLink("http://incubator.apache.org/tuscany");
        // Aggregate entries from feed1 and feed2
        List<SyndEntry> entries = new ArrayList<SyndEntry>();
       
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                SyndEntry entry = new SyndEntryImpl();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.setLink(alert.getAddress());
                entry.setPublishedDate(dateFormatter.parse(alert.getDate()));
                       
                entries.add(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
       
        feed.setEntries(entries);
       
        return (Feed)feed.createWireFeed("atom_1.0");
    }
View Full Code Here

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

        }
        return createFeed();
    }

    protected SyndFeed createFeed() {
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(feedType);

        feed.setTitle(getTitle());
        feed.setLink(getLink());
        feed.setDescription(getFeedDescription());
        return feed;
    }
View Full Code Here

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

     * Poll for updates
     */
    public void poll() {
        List list = getLastesEntries();
        if (list != null && !list.isEmpty()) {
            SyndFeed feed = new SyndFeedImpl();
            feed.setFeedType(outputType);
            feed.setTitle("Aggregated Feed");
            feed.setDescription("Anonymous Aggregated Feed");
            feed.setAuthor("servicemix");
            feed.setLink("http://www.servicemix.org");
            feed.setEntries(list);
            // send on to the nmr ...
            SyndFeedOutput output = new SyndFeedOutput();
            try {
                Source source = new DOMSource(output.outputW3CDom(feed));
                InOnly exchange = getExchangeFactory().createInOnlyExchange();
View Full Code Here

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

                if (feed != null) {

                    // Convert to an RSS feed
                    response.setContentType("application/rss+xml; charset=utf-8");
                    feed.setFeedType("atom_1.0");
                    SyndFeed syndFeed = new SyndFeedImpl(feed);
                    syndFeed.setFeedType(requestFeedType);
                    SyndFeedOutput syndOutput = new SyndFeedOutput();
                    try {
                        OutputStream output = response.getOutputStream();
                        syndOutput.output(syndFeed, new PrintWriter(output));
                    } catch (FeedException e) {
View Full Code Here

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

        if (content == null) {
            return ServiceUtil.returnError("Not able to generate RSS feed for content: " + contentId);
        }

        // create the feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(feedType);
        feed.setLink(mainLink);

        feed.setTitle(content.getString("contentName"));
        feed.setDescription(content.getString("description"));
        feed.setEntries(generateEntryList(dispatcher, delegator, contentId, entryLink, locale, userLogin));

        Map resp = ServiceUtil.returnSuccess();
        resp.put("wireFeed", feed.createWireFeed());
        return resp;
    }
View Full Code Here

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
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.