public final class FeatureUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Set<String> |
bundlesToCoords(List<org.apache.karaf.features.internal.model.Bundle> bundles)
Lists the artifact coordinates of the given bundles.
|
static Set<String> |
configFilesToCoords(List<org.apache.karaf.features.internal.model.ConfigFile> configfiles)
Lists the artifact coordinates of the given configuration files.
|
static Set<String> |
featuresRepositoryToCoords(org.apache.karaf.features.internal.model.Features features)
Converts the given features' repository to artifact coordinates.
|
static Set<String> |
featuresRepositoryToCoords(Set<org.apache.karaf.features.internal.model.Features> features)
Converts all the given features' repositories to artifact coordinates.
|
static Set<String> |
featuresToCoords(org.apache.karaf.features.internal.model.Features features)
Extracts all the artifact coordinates for the given features (repositories, bundles, configuration files).
|
static Set<String> |
featuresToCoords(Set<org.apache.karaf.features.internal.model.Features> features)
Extracts all the artifact coordinates for the given set of features (repositories, bundles, configuration
files).
|
static Set<String> |
featureToCoords(org.apache.karaf.features.internal.model.Feature feature)
Lists the artifact coordinates of the given feature's bundles and configuration files.
|
static Set<org.apache.karaf.features.internal.model.Features> |
findAllFeaturesRecursively(AetherUtil aetherUtil,
org.apache.karaf.features.internal.model.Features features,
Set<String> existingCoords)
Unmarshals all the features starting from the given feature.
|
static Set<org.apache.karaf.features.internal.model.Features> |
findAllFeaturesRecursively(AetherUtil aetherUtil,
Set<org.apache.karaf.features.internal.model.Features> features)
Unmarshals all the features (including known ones) starting from the given features.
|
static Set<org.apache.karaf.features.internal.model.Features> |
findAllFeaturesRecursively(AetherUtil aetherUtil,
Set<org.apache.karaf.features.internal.model.Features> features,
Set<String> existingCoords)
Unmarshals all the features starting from the given features.
|
static Set<String> |
mvnUrlsToCoord(List<String> repository)
Parses the given repository as URLs and converts them to artifact coordinates.
|
static org.apache.karaf.features.internal.model.Features |
readFeature(AetherUtil aetherUtil,
String coords)
Unmarshal the features matching the given artifact coordinates.
|
static org.apache.karaf.features.internal.model.Features |
readFeature(org.eclipse.aether.artifact.Artifact artifact)
Unmarshal the features in the given artifact.
|
static Set<org.apache.karaf.features.internal.model.Features> |
readFeatures(Set<org.eclipse.aether.artifact.Artifact> featureArtifacts)
Unmarshal all the features in the given artifacts.
|
static List<String> |
toCoord(List<URL> urls)
Converts the given list of URLs to artifact coordinates.
|
static String |
toCoord(URL url)
Converts the given URL to artifact coordinates.
|
public static List<String> toCoord(List<URL> urls) throws MalformedURLException
urls
- The URLs.MalformedURLException
- if a URL is malformed.public static String toCoord(URL url) throws MalformedURLException
url
- The URL.MalformedURLException
- if the URL is malformed.public static Set<String> mvnUrlsToCoord(List<String> repository) throws MalformedURLException
repository
- The repository (list of URLs).MalformedURLException
- if a URL is malformed.public static Set<String> featuresRepositoryToCoords(org.apache.karaf.features.internal.model.Features features) throws MalformedURLException
features
- The features.MalformedURLException
- if a URL is malformed.public static Set<String> featuresRepositoryToCoords(Set<org.apache.karaf.features.internal.model.Features> features) throws MalformedURLException
features
- The features.MalformedURLException
- if a URL is malformed.public static Set<String> featureToCoords(org.apache.karaf.features.internal.model.Feature feature) throws MalformedURLException
feature
- The feature.MalformedURLException
- if a URL is malformed.public static Set<String> configFilesToCoords(List<org.apache.karaf.features.internal.model.ConfigFile> configfiles) throws MalformedURLException
configfiles
- The configuration files.MalformedURLException
- if a URL is malformed.public static Set<String> bundlesToCoords(List<org.apache.karaf.features.internal.model.Bundle> bundles) throws MalformedURLException
bundles
- The bundles.MalformedURLException
- if a URL is malformed.public static Set<String> featuresToCoords(org.apache.karaf.features.internal.model.Features features) throws MalformedURLException
features
- The feature.MalformedURLException
- if a URL is malformed.public static Set<String> featuresToCoords(Set<org.apache.karaf.features.internal.model.Features> features) throws MalformedURLException
features
- The features.MalformedURLException
- if a URL is malformed.public static Set<org.apache.karaf.features.internal.model.Features> readFeatures(Set<org.eclipse.aether.artifact.Artifact> featureArtifacts) throws FileNotFoundException
featureArtifacts
- The artifacts.FileNotFoundException
- if a file is missing.public static org.apache.karaf.features.internal.model.Features readFeature(org.eclipse.aether.artifact.Artifact artifact) throws FileNotFoundException
artifact
- The artifact.FileNotFoundException
- if a file is missing.public static org.apache.karaf.features.internal.model.Features readFeature(AetherUtil aetherUtil, String coords) throws org.eclipse.aether.resolution.ArtifactResolutionException, FileNotFoundException
aetherUtil
- The Aether resolver.coords
- The artifact coordinates.org.eclipse.aether.resolution.ArtifactResolutionException
- if the coordinates can't be resolved.FileNotFoundException
- if a file is missing.public static Set<org.apache.karaf.features.internal.model.Features> findAllFeaturesRecursively(AetherUtil aetherUtil, org.apache.karaf.features.internal.model.Features features, Set<String> existingCoords) throws MalformedURLException, FileNotFoundException, org.eclipse.aether.resolution.ArtifactResolutionException
aetherUtil
- The Aether resolver.features
- The starting features.existingCoords
- The artifact coordinates which have already been unmarshalled.MalformedURLException
- if a URL is malformed.FileNotFoundException
- if a file is missing.org.eclipse.aether.resolution.ArtifactResolutionException
- if artifact coordinates can't be resolved.public static Set<org.apache.karaf.features.internal.model.Features> findAllFeaturesRecursively(AetherUtil aetherUtil, Set<org.apache.karaf.features.internal.model.Features> features, Set<String> existingCoords) throws MalformedURLException, FileNotFoundException, org.eclipse.aether.resolution.ArtifactResolutionException
aetherUtil
- The Aether resolver.features
- The starting features.existingCoords
- The artifact coordinates which have already been unmarshalled.MalformedURLException
- if a URL is malformed.FileNotFoundException
- if a file is missing.org.eclipse.aether.resolution.ArtifactResolutionException
- if artifact coordinates can't be resolved.public static Set<org.apache.karaf.features.internal.model.Features> findAllFeaturesRecursively(AetherUtil aetherUtil, Set<org.apache.karaf.features.internal.model.Features> features) throws MalformedURLException, FileNotFoundException, org.eclipse.aether.resolution.ArtifactResolutionException
aetherUtil
- The Aether resolver.features
- The starting features.MalformedURLException
- if a URL is malformed.FileNotFoundException
- if a file is missing.org.eclipse.aether.resolution.ArtifactResolutionException
- if artifact coordinates can't be resolved.Copyright © 2017 OpenDaylight. All rights reserved.