Package tvbrowser.core.filters.filtercomponents

Examples of tvbrowser.core.filters.filtercomponents.FavoritesFilterComponent


    } else if (className.endsWith(".DayFilterComponent")) {
      filterComponent = new DayFilterComponent(name, description);
    } else if (className.endsWith(".DateFilterComponent")) {
      filterComponent = new DateFilterComponent(name, description);
    } else if (className.endsWith(".FavoritesFilterComponent")) {
      filterComponent = new FavoritesFilterComponent(name, description);
    } else if (className.endsWith(".KeywordFilterComponent")) {
      filterComponent = new KeywordFilterComponent(name, description);
    } else if (className.endsWith(".MassFilterComponent")) {
      filterComponent = new MassFilterComponent(name, description);
    } else if (className.endsWith(".PluginFilterComponent")) {
      filterComponent = new PluginFilterComponent(name, description);
    } else if (className.endsWith(".PluginIconFilterComponent")) {
      filterComponent = new PluginIconFilterComponent(name, description);
    } else if (className.endsWith(".ProgramInfoFilterComponent")) {
      filterComponent = new ProgramInfoFilterComponent(name, description);
    } else if (className.endsWith(".ProgramLengthFilterComponent")) {
      filterComponent = new ProgramLengthFilterComponent(name, description);
    } else if (className.endsWith(".ProgramMarkingPriorityFilterComponent")) {
      filterComponent = new ProgramMarkingPriorityFilterComponent(name,
          description);
    } else if (className.endsWith(".ProgramRunningFilterComponent")) {
      filterComponent = new ProgramRunningFilterComponent(name, description);
    } else if (className.endsWith(".ProgramTypeFilterComponent")) {
      filterComponent = new ProgramTypeFilterComponent(name, description);
    } else if (className.endsWith(".ReminderFilterComponent")) {
      filterComponent = new ReminderFilterComponent(name, description);
    } else if (className.endsWith(".SingleTitleFilterComponent")) {
      filterComponent = new SingleTitleFilterComponent(name, description);
    } else if (className.endsWith(".TimeFilterComponent")) {
      filterComponent = new TimeFilterComponent(name, description);
    }
    else {
      try {
        PluginAccess[] plugins = PluginManagerImpl.getInstance().getActivatedPlugins();

        for(PluginAccess plugin : plugins) {
          Class<? extends PluginsFilterComponent>[] clazzes = plugin.getAvailableFilterComponentClasses();

          if(clazzes != null) {
            for(Class<? extends PluginsFilterComponent> clazz : clazzes) {
              if(clazz.getName().compareTo(className) == 0) {
                filterComponent = clazz.newInstance();
                break;
              }
            }
          }
        }

        filterComponent.setName(name);
        filterComponent.setDescription(description);
      }catch(Exception e) {
        //throw new IOException("error reading filter component: "+className+" unknown");
        mLog.warning("error reading filter component: "+className+" unknown");
        return null;
      }
    }

    if (filterComponent!=null) {
      filterComponent.read(in, version);

      /*
       * If the FilterComponent is for a Plugin we have to check
       * if it was a Plugin that is in the core now. If it is so
       * we have to change the FilterComponent to the right one.
       */
      if(filterComponent instanceof PluginFilterComponent) {
        String pluginId = ((PluginFilterComponent)filterComponent).getPluginId();

        if(pluginId.compareTo("java.reminderplugin.ReminderPlugin") == 0) {
          filterComponent = new ReminderFilterComponent(name, description);
        } else if(pluginId.compareTo("java.favoritesplugin.FavoritesPlugin") == 0) {
          filterComponent = new FavoritesFilterComponent(name, description);
        }
      }
    }
    return filterComponent;
  }
View Full Code Here


      set.add(new AgeLimitFilterComponent());
      set.add(new BeanShellFilterComponent());
      set.add(new ChannelFilterComponent());
      set.add(new DateFilterComponent());
      set.add(new DayFilterComponent());
      set.add(new FavoritesFilterComponent());
      set.add(new KeywordFilterComponent());
      set.add(new MassFilterComponent());
      set.add(new PluginFilterComponent());
      set.add(new PluginIconFilterComponent());
      set.add(new ProgramInfoFilterComponent());
View Full Code Here

TOP

Related Classes of tvbrowser.core.filters.filtercomponents.FavoritesFilterComponent

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.