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

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability


        collector = queryable.query(query, collector, null);

        if (queryContext.isHideAlreadyInstalled()) {
            Collector filteredCollection = new Collector();
            for (Iterator itr = collector.iterator(); itr.hasNext();) {
                IInstallableUnit iu = (IInstallableUnit) itr.next();

                Collector tmpCollector = profile.query(new InstallableUnitQuery(iu.getId()), new Collector(), null);
                if (tmpCollector.size() == 0) {
                    filteredCollection.accept(iu);
                    continue;
                }
                Iterator iter = tmpCollector.iterator();

                while (iter.hasNext()) {
                    IInstallableUnit installed = (IInstallableUnit) iter.next();
                    if (installed.getVersion().compareTo(iu.getVersion()) < 0) {
                        filteredCollection.accept(iu);
                    }
                }
            }
            return filteredCollection;
View Full Code Here


        }

        // Now process the side effects
        Map sideEffects = plan.getSideEffectChanges();
        for (Object o : sideEffects.keySet()) {
            IInstallableUnit iu = (IInstallableUnit) o;
            RequestStatus rs = (RequestStatus) sideEffects.get(iu);
            if (rs.getInitialRequestType() == RequestStatus.ADDED) {
                report.addStatus(iu, new Status(rs.getSeverity(), "temp", 10010, iu.getId() +
                        " will also be installed in order to complete this operation.", null));
                report.addReviewedInstallableUnit(iu);
            } else {
                report.addStatus(iu, new Status(rs.getSeverity(), "temp", 10009, iu.getId() +
                        " must be uninstalled in order to complete this operation.", null));
                report.addReviewedUninstallableUnit(iu);
            }
        }
View Full Code Here

        IInstallableUnit[] installableUnits = provisioningPlan.getProfileChangeRequest().getAddedInstallableUnits();

        boolean found;
        for (IInstallableUnit iu : installableUnits) {
            found = false;
            ILicense license = IUPropertyUtils.getLicense(iu);
            for (ILicense addedLicense : licenseArrayList) {
                if (addedLicense.equals(license)) {
                    found = true;
                    break;
                }
View Full Code Here

                log.error("Error occured while quering feature information :" + featureID + "-" + featureVersion);
                throw new AxisFault("failed.get.feature.information");
            }

            IInstallableUnit iu = installableUnits[0];
            ILicense license = IUPropertyUtils.getLicense(iu);
            ICopyright copyright = IUPropertyUtils.getCopyright(iu);
            featureInfo = ProvWSUtils.wrapIUsAsFeaturesWithDetails(iu, license, copyright);
        } catch (Exception e) {
            handleException("Error occured while quering feature information :" + featureID + "-" + featureVersion,
                    "failed.get.feature.information", e);
View Full Code Here

            if (iu == null) {
                handleException("Error occured while quering feature information :" + featureID + "-" + featureVersion,
                        "failed.get.feature.information");
            }

            ILicense licence = IUPropertyUtils.getLicense(iu);
            ICopyright copyright = IUPropertyUtils.getCopyright(iu);
            featureInfo = ProvWSUtils.wrapIUsAsFeaturesWithDetails(iu, licence, copyright);
        } catch (Exception e) {
            handleException("Error occured while quering feature information :" + featureID + "-" + featureVersion,
                    "failed.get.feature.information", e);
View Full Code Here

   
    InstallableUnitDescription vmIU = new InstallableUnitDescription();
    vmIU.setId("org.example.xenVM");
    vmIU.setVersion(Version.createOSGi(1, 0, 0, time));
    vmIU.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
    IProvidedCapability createSelfCapability = PublisherHelper.createSelfCapability(vmIU.getId(), vmIU.getVersion());
    vmIU.setCapabilities(new IProvidedCapability[] {createSelfCapability});


    InstallableUnitDescription xenRootIU = new InstallableUnitDescription();
    xenRootIU.setId("org.example.xenRoot");
View Full Code Here

    File f = new File(repofiles + filename);
    IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(jvm_rpm, f);
   
    publishArtifact(ad, f, publisherInfo);

    IProvidedCapability createSelfCapability = PublisherHelper.createSelfCapability(jvmIU.getId(),jvmIU.getVersion());
    jvmIU.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);
    //jvmIU.setRequiredCapabilities(new IRequiredCapability[] {vm});
 
View Full Code Here

    //File f = new File(repofiles + filename);
    //IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(jvm_rpm, f);
   
    //publishArtifact(ad, f, publisherInfo);
   
    IProvidedCapability createSelfCapability = PublisherHelper.createSelfCapability(yourAppIU.getId(),yourAppIU.getVersion());
    yourAppIU.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);
    //jvmIU.setRequiredCapabilities(new IRequiredCapability[] {vm});
   
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);
 
   
    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);
    results.addIU(makeInstallYourApp(publisherInfo), IPublisherResult.NON_ROOT);
    results.addIU(MetadataFactory.createInstallableUnit(vmIU), IPublisherResult.NON_ROOT);
View Full Code Here

    jvmIU.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
      Map<String, String> touchpointData = new HashMap<String, String>(7);
    touchpointData.put("collect", "collect();");
    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});
   
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability

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.