Package org.eclipse.equinox.internal.p2.metadata

Examples of org.eclipse.equinox.internal.p2.metadata.RequiredCapability


    SubMonitor progress = SubMonitor.convert(monitor, (fileCnt > 0) ? fileCnt : 500);
    String archivePath = getArchivePath();
    BufferedInputStream bin = new BufferedInputStream(in);
    try {
      TarInputStream zin = new TarInputStream(bin);
      TarEntry entry = zin.getNextEntry();
      while (entry != null) {
        String name = entry.getName();
        progress.subTask(NLS.bind(Messages.InstallableRuntime2_TaskUncompressing, name));
        if (archivePath != null && name.startsWith(archivePath)) {
          name = name.substring(archivePath.length());
          if (name.length() > 1)
            name = name.substring(1);
        }
       
        if (name != null && name.length() > 0) {
          if (entry.getFileType() == TarEntry.DIRECTORY)
            path.append(name).toFile().mkdirs();
          else {
            File dir = path.append(name).removeLastSegments(1).toFile();
            if (!dir.exists())
              dir.mkdirs();
           
            FileOutputStream fout = new FileOutputStream(path.append(name).toFile());
            copyWithSize(zin, fout, progress.newChild(1), (int)entry.getSize());
            fout.close();
            if (fileCnt <= 0)
              progress.setWorkRemaining(500);
          }
        }
View Full Code Here


    int fileCnt = getFileCount();
    SubMonitor progress = SubMonitor.convert(monitor, (fileCnt > 0) ? fileCnt : 500);
    String archivePath = getArchivePath();
    BufferedInputStream bin = new BufferedInputStream(in);
    try {
      TarInputStream zin = new TarInputStream(bin);
      TarEntry entry = zin.getNextEntry();
      while (entry != null) {
        String name = entry.getName();
        progress.subTask(NLS.bind(Messages.InstallableRuntime2_TaskUncompressing, name));
        if (archivePath != null && name.startsWith(archivePath)) {
          name = name.substring(archivePath.length());
          if (name.length() > 1)
            name = name.substring(1);
        }
       
        if (name != null && name.length() > 0) {
          if (entry.getFileType() == TarEntry.DIRECTORY)
            path.append(name).toFile().mkdirs();
          else {
            File dir = path.append(name).removeLastSegments(1).toFile();
            if (!dir.exists())
              dir.mkdirs();
           
            FileOutputStream fout = new FileOutputStream(path.append(name).toFile());
            copyWithSize(zin, fout, progress.newChild(1), (int)entry.getSize());
            fout.close();
            if (fileCnt <= 0)
              progress.setWorkRemaining(500);
          }
        }
        entry = zin.getNextEntry();
      }
      zin.close();
    } catch (TarException ex) {
      throw new IOException(ex);
    }
  }
View Full Code Here

      context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));

      // EV: invoke private methods
      //ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls);
      //printRequest(request);
      ProfileChangeRequest request = (ProfileChangeRequest)
        invokePrivate("buildProvisioningRequest",
            new Class[]{IProfile.class, Collection.class, Collection.class},
            new Object[]{profile, installs, uninstalls});
      invokePrivate(
          "printRequest",
View Full Code Here

   
   
    xenRootIU.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
    ITouchpointData tpd = MetadataFactory.createTouchpointData(touchpointData);
    xenRootIU.addTouchpointData(tpd);
    ArtifactKey xen_image = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, filename, Version.create("1.0.0"));
    xenRootIU.setArtifacts(new IArtifactKey[] {xen_image});
   
    File f = new File(repofiles + filename);
    IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(xen_image, f);
 
View Full Code Here

    touchpointData.put("install", installInstructions);

    ITouchpointData tpd = MetadataFactory.createTouchpointData(touchpointData);
    jvmIU.addTouchpointData(tpd);

    ArtifactKey jvm_rpm = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, filename , Version.create("1.0.0"));
    jvmIU.setArtifacts(new IArtifactKey[] {jvm_rpm});
   
    File f = new File(repofiles + filename);
    IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(jvm_rpm, f);
   
View Full Code Here

    publishArtifact(ad, f, publisherInfo);

    createSelfCapability = PublisherHelper.createSelfCapability(xenRootIU.getId(), xenRootIU.getVersion());
    xenRootIU.setCapabilities(new IProvidedCapability[] {createSelfCapability});

    RequiredCapability vm = new RequiredCapability(PublisherHelper.IU_NAMESPACE, "org.example.xenVM", new VersionRange(Version.create("0.0.0"), true, Version.create("9.9.9"), true), "", false, false);
    xenRootIU.setRequiredCapabilities(new IRequiredCapability[] {vm});
    ITouchpointData vm_touchpoint = MetadataFactory.createTouchpointData(Collections.EMPTY_MAP);
    xenRootIU.addTouchpointData(vm_touchpoint);
   
    results.addIU(makeJVM(publisherInfo), IPublisherResult.NON_ROOT);
View Full Code Here

 
  @Override
  protected StructuredViewer doCreateViewer(Composite container) {
   
    resources = new DiscoveryResources(getControl().getDisplay());
    StructuredViewer viewer = new ControlListViewer(container, SWT.BORDER) {
      @Override
      protected ControlListItem<?> doCreateItem(Composite parent, Object element) {
        return doCreateViewerItem(parent, element);
      }
    };
   
    viewer.setContentProvider(contentProvider = new PackagistContentProvider());
   
    searchResultCount = new Label(container, SWT.NONE);
    searchResultCount.setText("asdfasdf");
    GridDataFactory.fillDefaults().grab(true, false).span(3,1).align(SWT.BEGINNING, SWT.CENTER).hint(400, SWT.DEFAULT).applyTo(searchResultCount);
   
View Full Code Here

  }
 
  @Override
  protected StructuredViewer doCreateViewer(Composite container) {
   
    resources = new DiscoveryResources(getControl().getDisplay());
    StructuredViewer viewer = new ControlListViewer(container, SWT.BORDER) {
      @Override
      protected ControlListItem<?> doCreateItem(Composite parent, Object element) {
        return doCreateViewerItem(parent, element);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.internal.p2.metadata.RequiredCapability

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.