Package org.springsource.ide.eclipse.commons.frameworks.core.downloadmanager

Examples of org.springsource.ide.eclipse.commons.frameworks.core.downloadmanager.DownloadManager


      return bootVersion;
    }
  }
 
  private DirectedGraph createGraph() throws Exception {
    DownloadManager downloader = downloader();
    final DirectedGraph[] result = new DirectedGraph[]{null};
    downloader.doWithDownload(new TypeGraphFile(bootVersion, downloader), new DownloadRequestor() {
      @Override
      public void exec(File downloadedFile) throws Exception {
        result[0] = parseFrom(downloadedFile);
      }
    });
View Full Code Here


  /**
   * Factory method to create a DownloadManager for a given content type name
   */
  public static DownloadManager downloadManagerFor(String contentTypeName) throws IOException {
    return new DownloadManager(new AuthenticatedDownloader(),
        new File(
            WizardPlugin.getDefault().getStateLocation().toFile(),
            "guides"
        )
    );
View Full Code Here

    try {
      Assert.isLegal(!byClass.containsKey(klass), "A content provider for "+klass+" is already registered");

      ContentType<T> ctype = new ContentType<T>(klass, description);
      types.add(ctype);
      DownloadManager downloader = downloadManagerFor(klass);
      byClass.put(klass, new TypedContentManager<T>(downloader, provider));
    } catch (Throwable e) {
      WizardPlugin.log(e);
    }
  }
View Full Code Here

  /**
   * Factory method to create a DownloadManager for a given content type name
   */
  public DownloadManager downloadManagerFor(Class<?> contentType) throws IllegalStateException, IOException {
    return new DownloadManager(new AuthenticatedDownloader(),
        new File(
            WizardPlugin.getDefault().getStateLocation().toFile(),
            contentType.getSimpleName()
        )
    ).clearCache();
View Full Code Here

  private IWorkingSet[] workingSets = new IWorkingSet[0];
  private RadioGroups radioGroups = new RadioGroups();

  public void performFinish(IProgressMonitor mon) throws InvocationTargetException, InterruptedException {
    mon.beginTask("Importing "+baseUrl.getValue(), 4);
    DownloadManager downloader = null;
    try {
      downloader = new DownloadManager().allowUIThread(allowUIThread);

      DownloadableItem zip = new DownloadableItem(newURL(downloadUrl .getValue()), downloader);
      String projectNameValue = projectName.getValue();
      CodeSet cs = CodeSet.fromZip(projectNameValue, zip, new Path("/"));

      IRunnableWithProgress oper = getImportStrategy().createOperation(ImportUtils.importConfig(
          new Path(location.getValue()),
          projectNameValue,
          cs
      ));
      oper.run(new SubProgressMonitor(mon, 3));

      IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectNameValue);
      addToWorkingSets(project, new SubProgressMonitor(mon, 1));

    } catch (IOException e) {
      throw new InvocationTargetException(e);
    } finally {
      if (downloader!=null) {
        downloader.dispose();
      }
      mon.done();
    }
  }
View Full Code Here

 
  private List<IBootInstall> installs = null;
  private IBootInstall defaultInstall;
 
  private BootInstallManager() throws Exception {
    downloader = new DownloadManager(null, determineCacheDir());
    installs = new ArrayList<IBootInstall>();
    read();
    if (installs.isEmpty()) {
      setDefaultInstall(newInstall(StsProperties.getInstance().get("spring.boot.install.url"), null));
    }
View Full Code Here

          } catch (Throwable e) {
            BootActivator.log(e);
          }
        }
      }
      downloader = new DownloadManager(null, cacheFolder);
      downloader.setTries(RETRIES);
      downloader.setRetryInterval(RETRY_INTERVAL);
    }
    return downloader;
  }
View Full Code Here

TOP

Related Classes of org.springsource.ide.eclipse.commons.frameworks.core.downloadmanager.DownloadManager

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.