Examples of VuzeFileComponent


Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

             
              VuzeFileComponent[] comps = vf.getComponents();
             
              for (int j=0;j<comps.length;j++){
               
                VuzeFileComponent comp = comps[j];
               
                if ( comp.getType() == VuzeFileComponent.COMP_TYPE_PLUGIN ){
                 
                  try{
                    Map  content = comp.getContent();
                   
                    String  id     = new String((byte[])content.get( "id" ), "UTF-8" );
                    String  version = new String((byte[])content.get( "version" ), "UTF-8" );
                    String  suffix  = ((Long)content.get( "is_jar" )).longValue()==1?"jar":"zip";
                   
                    byte[]  plugin_file = (byte[])content.get( "file" );
                   
                    File temp_dir = AETemporaryFileHandler.createTempDir();
                   
                    File temp_file = new File( temp_dir, id + "_" + version + "." + suffix );
                   
                    FileUtil.copyFile( new ByteArrayInputStream( plugin_file ), temp_file );

                    FilePluginInstaller installer = installFromFile( temp_file );

                    addFileInstallOperation( installer );
                   
                    comp.setProcessed();
                   
                  }catch( Throwable e ){
                   
                    Debug.printStackTrace(e);
                  }
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

               
                VuzeFileComponent[] comps = vf.getComponents();
               
                for (int i=0;i<comps.length;i++){
                 
                  VuzeFileComponent comp = comps[i];
                 
                  if ( comp.getType() == VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE ){
                   
                    Engine engine = (Engine)comp.getData( Engine.VUZE_FILE_COMPONENT_ENGINE_KEY );
                   
                    if ( engine != null ){
                     
                      Map params = new HashMap();
                      params.put( "id", new Long( engine.getId()));
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

           
            VuzeFileComponent[] comps = vf.getComponents();
           
            for (int j=0;j<comps.length;j++){
             
              VuzeFileComponent comp = comps[j];
             
              int  comp_type = comp.getType();
             
              if ( comp_type == VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE ){
               
                try{
                  Engine e =
                    getSingleton().importEngine(
                      comp.getContent(),
                      (expected_types & VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE) == 0 );
                 
                  comp.setProcessed();
                 
                  if ( e != null ){
                   
                    comp.setData( Engine.VUZE_FILE_COMPONENT_ENGINE_KEY, e );
                  }
                }catch( Throwable e ){
                 
                  Debug.printStackTrace(e);
                }
              }else if ( comp_type == VuzeFileComponent.COMP_TYPE_METASEARCH_OPERATION ){
               
                getSingleton().addOperation( comp.getContent());
               
                comp.setProcessed();
              }
            }
          }
        }
      })
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

                   
                    VuzeFileComponent[] comps = vf.getComponents();
                   
                    for (int j=0;j<comps.length;j++){
                     
                      VuzeFileComponent comp = comps[j];
                     
                      if ( comp.getType() == VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE ){
                       
                        try{
                          Engine e =
                            getSingleton().importEngine( comp.getContent(), false );
                         
                          log( "    updated " + e.getName());
                         
                          e.setSelectionState( Engine.SEL_STATE_MANUAL_SELECTED );
                         
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

  {
    VuzeFileComponent[] comps = vf.getComponents();
   
    for (int j=0;j<comps.length;j++){
     
      VuzeFileComponent comp = comps[j];
     
      int  comp_type = comp.getType();
     
      if ( comp_type == VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE ){
       
        try{
          EngineImpl engine = (EngineImpl)meta_search.importFromBEncodedMap( comp.getContent());
         
          long  id = engine.getId();
         
          Engine existing = meta_search.getEngine( id );
         
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

   
    VuzeFileComponent[] comps = vf.getComponents();
   
    for (int j=0;j<comps.length;j++){
     
      VuzeFileComponent comp = comps[j];
     
      if ( comp.getType() == VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE ){
       
        try{
          result.add( importEngine( comp.getContent(), false ));
                     
        }catch( Throwable e ){
         
          Debug.printStackTrace(e);
        }
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

           
            VuzeFileComponent[] comps = vf.getComponents();
           
            for (int j=0;j<comps.length;j++){
             
              VuzeFileComponent comp = comps[j];
             
              int  type = comp.getType();
             
              if ( type == VuzeFileComponent.COMP_TYPE_DEVICE ){
               
                try{
                  ((DeviceManagerImpl)getSingleton()).importVuzeFile(
                      comp.getContent(),
                      ( expected_types &
                        ( VuzeFileComponent.COMP_TYPE_DEVICE )) == 0 );
                 
                  comp.setProcessed();
                 
                }catch( Throwable e ){
                 
                  Debug.printStackTrace(e);
                }
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

             
              VuzeFileComponent[] comps = vf.getComponents();
             
              for (int j=0;j<comps.length;j++){
               
                VuzeFileComponent comp = comps[j];
               
                if ( comp.getType() == VuzeFileComponent.COMP_TYPE_CUSTOMIZATION ){
                 
                  try{
                    Map map = comp.getContent();
                   
                    ((CustomizationManagerImpl)getSingleton()).importCustomization( map );
                   
                    comp.setProcessed();
                   
                  }catch( Throwable e ){
                   
                    Debug.printStackTrace(e);
                  }
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

           
            VuzeFileComponent[] comps = vf.getComponents();
           
            for (int j=0;j<comps.length;j++){
             
              VuzeFileComponent comp = comps[j];
             
              if ( comp.getType() == VuzeFileComponent.COMP_TYPE_CONTENT_NETWORK ){
               
                try{               
                  ((ContentNetworkManagerImpl)getSingleton()).importNetwork( comp.getContent());
               
                  comp.setProcessed();
                 
                }catch( Throwable e ){
                 
                  log( "Failed to import from vuze file", e );
             
View Full Code Here

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileComponent

               
                VuzeFileComponent[] comps = vf.getComponents();
               
                for (int j=0;j<comps.length;j++){
                 
                  VuzeFileComponent comp = comps[j];
                 
                  int type = comp.getType();
                 
                  if ( type == VuzeFileComponent.COMP_TYPE_CONTENT_NETWORK ){
                   
                    try{
                        // change here as we always add all networks upfront so
                        // we always set the customisation flag regardless of
                        // whether existing or not
                     
                      ContentNetwork imported = importNetwork( comp.getContent());
                     
                      imported.setPersistentProperty( ContentNetwork.PP_IS_CUSTOMIZATION, true );
                     
                      comp.setProcessed();
                     
                    }catch( Throwable e ){
                     
                      log( "Failed to import customisation network", e );
                    }
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.