Examples of Podcast


Examples of cz.podcastee.domain.entities.Podcast

                podcastID = Long.parseLong(request.getParameter("podcastId"));
            } catch (NumberFormatException ex) {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
                throw ex;
            }
            Podcast podcast = null;
            try {
                podcast = podcastManager.getPodcastByID(podcastID, true);
            } catch (Throwable ex) {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
            }

            if (podcast == null) {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
                out.close();
                return;
            }
            out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            out.println("<rss  version=\"2.0\">");
            out.println("<channel>");
            out.println("<title>" + podcast.getTitle() + "</title>");
            out.println("<description>" + podcast.getDescription() + "</description>");
            out.println("<link>www.podcastee.cz</link>"); // TODO tady nevim co sem presne patri asi nic dulezityho
            out.println("<language>en-us</language>");
            out.println("<copyright>Copyright 2010</copyright>");

            //for()
            out.println("<lastBuildDate>Sat, 25 Mar 2010 11:30:00 -0500</lastBuildDate>");
            out.println("<pubDate>" + podcast.getDateOfCreation() + "</pubDate>");

            out.println("<docs>http://blogs.law.harvard.edu/tech/rss</docs>");
            out.println("<webMaster>rob@podcast411.com</webMaster>");

            for (Episode episode : podcast.getEpisodes()) {
                File episodeFile = new File(podcastsPath + "/" + episode.getFileName());
                if (!episodeFile.exists()) {
                    continue;
                }
View Full Code Here

Examples of cz.podcastee.domain.entities.Podcast

        podcastDao.persist(podcast);
        return podcast;
    }

    public Podcast savePodcast(String title, String desc, Channel channel) {
        Podcast podcast = new Podcast();
        podcast.setTitle(title);
        podcast.setDescription(desc);
        podcast.setChannel(channel);
        podcastDao.persist(podcast);
        return podcast;
    }
View Full Code Here

Examples of cz.podcastee.domain.entities.Podcast

            genres.add(new SelectItem(e.name(), e.toString()));
        }
    }

    public String createPodcast() {
        Podcast podcast = new Podcast();

        podcast.setTitle(this.title);
        podcast.setSubtitle(this.subtitle);
        podcast.setDescription(this.desc);
        podcast.setDateOfCreation(new Date());
        podcast.setGenre(GenreEnum.valueOf(selectedGenre));

        Channel ch = null;
        if (selectedChannel != -1) {
            ch = podcastManager.getChannelByID(selectedChannel);
        }
        podcast.setChannel(ch);

        podcastManager.savePodcast(podcast);

        return "success";
    }
View Full Code Here

Examples of cz.podcastee.domain.entities.Podcast

    public boolean isFavorite() {
        if (favorites == null || !loginBean.isLoggedIn()) {
            return false;
        }
        Podcast p = (Podcast) podcastsTable.getRowData();
        return favorites.contains(p);
    }
View Full Code Here

Examples of cz.podcastee.domain.entities.Podcast

    public String toggleFavorite() {
        if (favorites == null || !loginBean.isLoggedIn() || u == null) {
            return null;
        }
        Podcast p = (Podcast) podcastsTable.getRowData();
        if(u.getFavoritePodcasts().contains(p)) {
            accountManager.deleteFavorite(p, u);
        } else {
            accountManager.addFavorite(p, u);
        }
View Full Code Here

Examples of org.jampa.model.podcasts.Podcast

    if ((_podcastName != null) &&
        (!_podcastName.isEmpty())) {
     
      try {
       
        Podcast podcastItem = Controller.getInstance().getPlaylistController().getPodcastByName(_podcastName);
        IAudioItem firstAudioItem = podcastItem.getAudioItemByIndex(0);
       
        new OpenPodcastAction(podcastItem.getName()).run();
        Controller.getInstance().getPlaylistController().playFile(podcastItem, firstAudioItem);
       
      } catch (Exception e) {
        Log.getInstance(OpenAndPlayPodcastAction.class).error("Error while opening and playing podcast: " + e.getMessage());   //$NON-NLS-1$
      }
View Full Code Here

Examples of org.jampa.model.podcasts.Podcast

 
  public void run() {
    if ((_podcastName != null) &&
        (!_podcastName.isEmpty())) {
      try {
      Podcast podcast = Controller.getInstance().getPlaylistController().getPodcastByName(_podcastName);
      IAudioItem firstAudioItem = podcast.getAudioItemByIndex(0);
      Controller.getInstance().getPlaylistController().playFile(podcast, firstAudioItem);
      } catch (Exception e) {
        Log.getInstance(PlayPodcastAction.class).error("Error while playing podcast: " + e.getMessage());   //$NON-NLS-1$
      }
    }
View Full Code Here

Examples of org.jampa.model.podcasts.Podcast

        if (Controller.getInstance().getDNDController().isPodcastListViewSource()) {
          // Get the current item.
          Point pt = Display.getCurrent().map(null, viewer.getTable(), event.x, event.y);
          TableItem item = viewer.getTable().getItem(pt);
         
          Podcast sourcePodcast = (Podcast) ((IStructuredSelection) viewer.getSelection()).getFirstElement();       
         
          int toIndex;
          if (item != null) {
            Podcast podcast = Controller.getInstance().getPlaylistController().getPodcastByName(((Podcast) item.getData()).getName());
            toIndex = podcast.getPosition();
          } else {
            toIndex = -1;
          }
         
          if (toIndex != -1) {
View Full Code Here

Examples of org.jampa.model.podcasts.Podcast

      return Controller.getInstance().getPlaylistController().getPodcastList();
    }
  } 
  class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
    public Image getImage(Object obj) {
      Podcast podcast = (Podcast) obj;
     
      if (Controller.getInstance().getPlaylistController().getCurrentPlaylist() == podcast) {
        if (Controller.getInstance().getEngine().isPaused()) {
          return _podcastPauseImage;
        } else {
View Full Code Here

Examples of org.jampa.model.podcasts.Podcast

    }
   
    public String getColumnText(Object obj, int index) {
      switch(index) {
      case 0 : {
        Podcast podcast = (Podcast) obj;
        String result = podcast.getName();
       
        int unreadCount = podcast.getUnreadItemsCount();
        if (unreadCount > 0) {
          result = "(" + Integer.toString(unreadCount) + ") " + result;
        }
       
        return result;     
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.