Examples of Podcast


Examples of org.torrcast.model.Podcast

        case EVENT_TYPE_FEED_RETRIEVED:
            logger.info("New or updated feed retrieved: " + event.getUrlString());
            SyndFeed feed = event.getFeed();
            if (feed != null) {
                String feedUrl = event.getUrlString();
                Podcast podcast = podcastDao.getPodcast(feedUrl);

                if (podcast == null) {
                  // Podcast doesn't exist yet. Create a new one.
                    podcast = FeedUtils.createPodcast(feedUrl, feed);
                }

              Map<String, PodcastItem> items = podcast.getItems();

                List<SyndEntry> entries = feed.getEntries();
                for (SyndEntry entry : entries) {
                    String entryUri = entry.getUri();
                    if (!items.containsKey(entryUri)) {
View Full Code Here

Examples of org.torrcast.model.Podcast

        if (result.getAllErrors().size() > 0) {
            return "podcast/add";
        }

        // Everything went well. Redirect to a page showing the podcast ready for editing.
        Podcast podcast = podcastDao.getPodcast(url);
        return "redirect:/podcast/" + podcast.getId() + "/edit";
    }
View Full Code Here

Examples of org.torrcast.model.Podcast

   
    /**
     * Create a new {@link Podcast} based on a {@link SyndFeed}.
     */
    public static Podcast createPodcast(String url, SyndFeed feed) {
        Podcast podcast = new Podcast();
        podcast.setUrl(url);
        podcast.setDescription(feed.getDescription());
        podcast.setTitle(feed.getTitle());
        return podcast;
    }
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.