Package tvbrowser.core.tvdataservice

Examples of tvbrowser.core.tvdataservice.TvDataServiceProxy$Comparator


          PluginProxy installedPlugin = PluginProxyManager.getInstance().getPluginForId(pluginId);
 
          if(onlyUpdates) {
            // remove all not installed plugins
            if (installedPlugin == null) {
              TvDataServiceProxy service = TvDataServiceProxyManager.getInstance().findDataServiceById(className.toLowerCase()+"."+className);
 
              if(service == null) {
                it.remove();
                continue;
              }
            }
          }
 
          if (installedPlugin!=null && ((installedPlugin.getInfo().getVersion().compareTo(item.getVersion())>0 ||
              (installedPlugin.getInfo().getVersion().compareTo(item.getVersion())==0 && (!dragNdrop || item.getVersion().isStable()))))) {
            it.remove();
            continue;
          }
 
          // remove already installed dataservices
          TvDataServiceProxy service= TvDataServiceProxyManager.getInstance().findDataServiceById(className.toLowerCase()+"."+className);
          if (service!=null && ((service.getInfo().getVersion().compareTo(item.getVersion())>0) ||
              (service.getInfo().getVersion().compareTo(item.getVersion())==0 && (!dragNdrop || item.getVersion().isStable())))) {
            it.remove();
            continue;
          }
 
          if(item.isOnlyUpdate() && installedPlugin == null && service == null) {
View Full Code Here


          for(BlockedPlugin blockedPlugin : newlyBlocked) {
            PluginProxy plugin = PluginProxyManager.getInstance().getPluginForId(blockedPlugin.getPluginId());

            if(plugin == null) {
              TvDataServiceProxy dataService = TvDataServiceProxyManager.getInstance().findDataServiceById(blockedPlugin.getPluginId());

              if(dataService != null && blockedPlugin.isBlockedVersion(dataService.getId(),dataService.getInfo().getVersion())) {
                message.append("\n").append(dataService.getInfo().getName()).append(" (").append(blockedPlugin.getBlockStart()).append(" - ").append(blockedPlugin.getBlockEnd()).append(")");
              }
            }
            else if(blockedPlugin.isBlockedVersion(plugin)){
              message.append("\n").append(plugin.getInfo().getName()).append(" (").append(blockedPlugin.getBlockStart()).append(" - ").append(blockedPlugin.getBlockEnd()).append(")");
            }
View Full Code Here

          try {
            String pluginId = "java." + pluginName.toLowerCase() + "." + pluginName;

            PluginProxy installedPlugin = PluginProxyManager.getInstance().getPluginForId(pluginId);
            TvDataServiceProxy service = TvDataServiceProxyManager.getInstance().findDataServiceById(
                pluginName.toLowerCase() + '.' + pluginName);

            Class<?> pluginClass = classLoader.loadClass(pluginName.toLowerCase() + '.' + pluginName);

            Method getVersion = pluginClass.getMethod("getVersion", new Class[0]);

            Version version1 = null;
            try {
              version1 = (Version) getVersion.invoke(pluginClass, new Object[0]);
            } catch (Throwable t1) {
              t1.printStackTrace();
            }

            if (installedPlugin != null && (installedPlugin.getInfo().getVersion().compareTo(version1) > 0 || (installedPlugin.getInfo().getVersion().compareTo(version1) == 0 && version1.isStable()))) {
              alreadyInstalled.append(installedPlugin.getInfo().getName()).append('\n');
            } else if (service != null && (service.getInfo().getVersion().compareTo(version1) > 0 || (service.getInfo().getVersion().compareTo(version1) == 0 && version1.isStable()))) {
              alreadyInstalled.append(service.getInfo().getName()).append('\n');
            } else {
              RandomAccessFile write = new RandomAccessFile(tmpFile, "rw");

              String versionString = Integer.toString(version1.getMajor()) + '.' + (version1.getMinor() / 10) + (version1.getMinor() % 10)
                  + '.' + version1.getSubMinor();
View Full Code Here

    html.append("<h1>").append(mLocalizer.msg("description", "Description")).append("</h1>");
    html.append(HTMLTextHelper.convertTextToHtml(getNotNull(mChannelGroup.getDescription()), true));

    html.append("<h1>").append(Localizer.getLocalization(Localizer.I18N_CHANNELS)).append("</h1>");
    TvDataServiceProxy proxy = ChannelGroupManager.getInstance().getTvDataService(mChannelGroup);
    if (proxy != null) {
      Channel[] ch = proxy.getAvailableChannels(mChannelGroup);

      if (ch != null) {
        StringBuilder buf = new StringBuilder();

        for (int i=0; i<ch.length-1; i++) {
View Full Code Here

        nameValue = plugin.getName();
        descValue = plugin.getButtonActionDescription().replace('\n', ' ');
        iconValue = plugin.getIcon();
      } else if (value instanceof TvDataServiceProxy) {
        TvDataServiceProxy service = (TvDataServiceProxy) value;
        nameValue = service.getInfo().getName() + " " + service.getInfo().getVersion();
        descValue = HTMLTextHelper.convertHtmlToText(service.getInfo().getDescription()).replace('\n', ' ');
      }

      if (iconValue == null) {
        iconValue = DEFAULT_ICON;
      }
View Full Code Here

        if (deleteable) {
          mDeleteablePlugin.put(plugin, pluginFile);
        }
      }
      else if (plugin instanceof devplugin.AbstractTvDataService) {
        TvDataServiceProxy proxy = new DefaultTvDataServiceProxy((devplugin.AbstractTvDataService)plugin);
        TvDataServiceProxyManager.getInstance().registerTvDataService(proxy);
        if (deleteable) {
          mDeleteablePlugin.put(proxy, pluginFile);
        }
      }
View Full Code Here

    }
    PluginProxy plugin = PluginProxyManager.getInstance().getActivatedPluginForId(id);
    if(plugin != null) {
      return plugin;
    }
    TvDataServiceProxy dataService = TvDataServiceProxyManager.getInstance().findDataServiceById(id);
   
    if(dataService != null) {
      return dataService;
    } else if (id != null){
      InternalPluginProxyIf internalPlugin = InternalPluginProxyList.getInstance().getProxyForId(id);
View Full Code Here

      = new ProgressMonitorGroup(progressBar, label, subscribedChannels.length + 1);

    // Work on the job list
    Throwable downloadException = null;
    for (int i = 0; (i < jobArr.length) && (!mStopDownloading); i++) {
      TvDataServiceProxy dataService = jobArr[i].getDataService();
      Channel[] channelArr = jobArr[i].getChannelList();
      ProgressMonitor monitor = monitorGroup.getNextProgressMonitor(channelArr.length);
      try {
        dataService.updateTvData(updateManager, channelArr, startDate,
                                 daysToDownload, monitor);
      }
      catch (Throwable thr) {
        mLog.log(Level.WARNING, "Updating the TV data for TV data service "
          + dataService.getInfo().getName() + " failed", thr);

        downloadException = thr;
      }
    }
View Full Code Here

      }
      if (job == null) {
        // There is no job fo this channel -> create one

          // check, if we can use this dataservice
          TvDataServiceProxy service = channel.getDataServiceProxy();
          boolean useService = false;
          for (TvDataServiceProxy service2 : services) {
            if (service2.getId().equals(service.getId())) {
              useService = true;
              break;
            }
          }
          if (!useService) {
View Full Code Here

   *
   * @since 2.2.1
   */
  public static Channel getChannel(String dataServiceId, String groupId,
      String country, String channelId) {
    TvDataServiceProxy dataService = null;
    if (dataServiceId != null) {
      dataService = TvDataServiceProxyManager.getInstance()
          .findDataServiceById(dataServiceId);

      if (dataService == null) {
        return null;
      }
    }

    int n = mAvailableChannels.size();

    for(int i = 0; i < n; i++) {
      Channel channel = mAvailableChannels.get(i);

      if (channel.getId().compareTo(channelId) == 0
          && ((dataServiceId != null && channel.getDataServiceProxy().getId()
              .compareTo(dataService.getId()) == 0) || dataServiceId == null)
          && ((groupId != null && channel.getGroup().getId().compareTo(groupId) == 0) || groupId == null)
          && ((country != null && channel.getCountry().compareTo(country) == 0) || country == null)) {
        return channel;
      }
    }
View Full Code Here

TOP

Related Classes of tvbrowser.core.tvdataservice.TvDataServiceProxy$Comparator

Copyright © 2018 www.massapicom. 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.