Package com.aelitis.azureus.core.versioncheck

Examples of com.aelitis.azureus.core.versioncheck.VersionCheckClient


        checkForUpdate(
          UpdateChecker  checker )
        {
          if ( checkForUpdateSupport( checker, null, false ) == 0 ){
           
            VersionCheckClient vc = VersionCheckClient.getSingleton();
           
            String[] rps = vc.getRecommendedPlugins();
           
            boolean  found_one = false;
           
            for (int i=0;i<rps.length;i++){
             
              String  rp_id = rps[i];
             
              if ( plugin_manager.getPluginInterfaceByID( rp_id, false ) != null ){
               
                  // already installed
               
                continue;
              }
             
              final String  config_key = "recommended.processed." + rp_id;
             
              if ( !plugin_config.getPluginBooleanParameter( config_key, false )){
               
                try{
                  final PluginInstaller installer = plugin_interface.getPluginManager().getPluginInstaller();
                 
                  StandardPlugin[]  sps = installer.getStandardPlugins();
                 
                  for (int j=0;j<sps.length;j++){
                   
                    final StandardPlugin  sp = sps[j];
                   
                    if ( sp.getId().equals( rp_id )){
                   
                      found_one = true;
                     
                      checker.getCheckInstance().addListener(
                        new UpdateCheckInstanceListener()
                        {
                          public void
                          cancelled(
                            UpdateCheckInstance    instance )
                          {                         
                          }
                         
                          public void
                          complete(
                            UpdateCheckInstance    instance )
                          {
                            if ( instance.getUpdates().length == 0 ){
                             
                              installRecommendedPlugin( installer, sp );
                             
                              plugin_config.setPluginParameter( config_key, true );
                            }
                          }
                        });
                     
                      break;
                    }
                  }
                 
                }catch( Throwable e ){
                 
                }
              }
             
              if ( found_one ){
               
                break;
              }
            }
           
            if ( !found_one ){
             
              Set<String>  auto_install = vc.getAutoInstallPluginIDs();
             
              final List<String>  to_do = new ArrayList<String>();
             
              for ( String pid: auto_install ){
               
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.versioncheck.VersionCheckClient

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.