private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) { InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription(); root.setSingleton(true); root.setId(id); root.setVersion(version); root.setProperty(IInstallableUnit.PROP_NAME, name); Collection<IRequirement> requiredCapabilities = createIURequirements(children); if (requires != null) requiredCapabilities.addAll(requires); root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()])); root.setArtifacts(new IArtifactKey[0]); root.setProperty(InstallableUnitDescription.PROP_TYPE_PRODUCT, Boolean.TRUE.toString()); root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null)); root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString()); root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)}); // TODO why is the type OSGI? root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI); return root; }
cat.setArtifacts(new IArtifactKey[0]); cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$ return MetadataFactory.createInstallableUnit(cat);
private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) { InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription(); root.setSingleton(true); root.setId(id); root.setVersion(version); root.setProperty(IInstallableUnit.PROP_NAME, name); Collection<IRequirement> requiredCapabilities = createIURequirements(children); if (requires != null) requiredCapabilities.addAll(requires); root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()])); root.setArtifacts(new IArtifactKey[0]); root.setProperty(InstallableUnitDescription.PROP_TYPE_PRODUCT, Boolean.TRUE.toString()); root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null)); root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString()); root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)}); // TODO why is the type OSGI? root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI); return root; }
iu.setArtifacts(new IArtifactKey[] {createFeatureArtifactKey(feature.getId(), version.toString())});
iu.setFilter(filter); IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version); iu.setArtifacts(new IArtifactKey[] {key}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
iu.setFilter(filter); IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version); iu.setArtifacts(new IArtifactKey[] {key}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
iu.setFilter(filter); IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version); iu.setArtifacts(new IArtifactKey[] {key}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
} else { IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version); iu.setArtifacts(new IArtifactKey[] {key}); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null); publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
} else { IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version); iu.setArtifacts(new IArtifactKey[] {key}); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null); publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
iu.setArtifacts(new IArtifactKey[] {key}); results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
iu.setArtifacts(new IArtifactKey[] {key}); results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
} else { IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version); iu.setArtifacts(new IArtifactKey[] {key}); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null); publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
iu.setArtifacts(new IArtifactKey[] {key}); results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
iu.setFilter(filter); IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version); iu.setArtifacts(new IArtifactKey[] {key}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
iu.setArtifacts(new IArtifactKey[] {key}); results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
protected IInstallableUnit createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) { InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription(); iu.setSingleton(true); String id = featureId + '_' + descriptor.getKey(); iu.setId(id); Version version = Version.parseVersion(featureVersion); iu.setVersion(version); iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); String configSpec = descriptor.getConfigSpec(); if (configSpec != null && configSpec.length() > 0) iu.setFilter(createFilterSpec(configSpec)); Map<String, String> touchpointData = new HashMap<String, String>(2); String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("install", configurationData); //$NON-NLS-1$ String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$ iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData)); // prime the IU with an artifact key that will correspond to the zipped up root files. IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion()); iu.setArtifacts(new IArtifactKey[] {key}); setupLinks(iu, descriptor); setupPermissions(iu, descriptor); IInstallableUnit iuResult = MetadataFactory.createInstallableUnit(iu); // need to return both the iu and any files. return iuResult; }
protected IInstallableUnit createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) { InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription(); iu.setSingleton(true); String id = featureId + '_' + descriptor.getKey(); iu.setId(id); Version version = Version.parseVersion(featureVersion); iu.setVersion(version); iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); String configSpec = descriptor.getConfigSpec(); if (configSpec != null && configSpec.length() > 0) iu.setFilter(createFilterSpec(configSpec)); Map<String, String> touchpointData = new HashMap<String, String>(2); String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("install", configurationData); //$NON-NLS-1$ String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$ iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData)); // prime the IU with an artifact key that will correspond to the zipped up root files. IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion()); iu.setArtifacts(new IArtifactKey[] {key}); setupLinks(iu, descriptor); setupPermissions(iu, descriptor); IInstallableUnit iuResult = MetadataFactory.createInstallableUnit(iu); // need to return both the iu and any files. return iuResult; }
protected IInstallableUnit createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) { InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription(); iu.setSingleton(true); String id = featureId + '_' + descriptor.getKey(); iu.setId(id); Version version = Version.parseVersion(featureVersion); iu.setVersion(version); iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)}); iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE); String configSpec = descriptor.getConfigSpec(); if (configSpec != null && configSpec.length() > 0) iu.setFilter(createFilterSpec(configSpec)); Map<String, String> touchpointData = new HashMap<>(2); String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("install", configurationData); //$NON-NLS-1$ String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$ iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData)); // prime the IU with an artifact key that will correspond to the zipped up root files. IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion()); iu.setArtifacts(new IArtifactKey[] {key}); setupLinks(iu, descriptor); setupPermissions(iu, descriptor); IInstallableUnit iuResult = MetadataFactory.createInstallableUnit(iu); // need to return both the iu and any files. return iuResult; }
private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) { InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription(); root.setSingleton(true); root.setId(id); root.setVersion(version); root.setProperty(IInstallableUnit.PROP_NAME, name); Collection<IRequirement> requiredCapabilities = createIURequirements(children); if (requires != null) requiredCapabilities.addAll(requires); root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()])); root.setArtifacts(new IArtifactKey[0]); root.setProperty(InstallableUnitDescription.PROP_TYPE_PRODUCT, Boolean.TRUE.toString()); root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null)); root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString()); root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)}); // TODO why is the type OSGI? root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI); return root; }
private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) { InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription(); root.setSingleton(true); root.setId(id); root.setVersion(version); root.setProperty(IInstallableUnit.PROP_NAME, name); Collection<IRequirement> requiredCapabilities = createIURequirements(children); if (requires != null) requiredCapabilities.addAll(requires); root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()])); root.setArtifacts(new IArtifactKey[0]); root.setProperty(InstallableUnitDescription.PROP_TYPE_PRODUCT, Boolean.TRUE.toString()); root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null)); root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString()); root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)}); // TODO why is the type OSGI? root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI); return root; }