public class AgentUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AgentUtils.ArtifactDownloader<T> |
static interface |
AgentUtils.Callback<T> |
static interface |
AgentUtils.DownloadCallback |
static class |
AgentUtils.FileDownloader |
static class |
AgentUtils.RepositoryDownloader |
Modifier and Type | Field and Description |
---|---|
static String |
FAB_PROTOCOL |
static String |
REQ_PROTOCOL |
Constructor and Description |
---|
AgentUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addFeatures(Set<org.apache.karaf.features.Feature> features,
io.fabric8.api.FabricService fabricService,
DownloadManager downloadManager,
io.fabric8.api.Profile profile)
Adds the set of features to the given set for the given profile
|
static void |
addMavenProxies(Dictionary props,
io.fabric8.api.FabricService fabricService) |
static void |
addRepository(DownloadManager manager,
Map<URI,org.apache.karaf.features.Repository> repositories,
URI uri) |
static Map<String,File> |
downloadBundles(DownloadManager manager,
Iterable<org.apache.karaf.features.Feature> features,
Iterable<String> bundles,
Set<String> overrides) |
static Map<String,File> |
downloadLocations(DownloadManager manager,
Collection<String> locations) |
static Map<String,File> |
downloadProfileArtifacts(io.fabric8.api.FabricService fabricService,
DownloadManager downloadManager,
io.fabric8.api.Profile profile)
Downloads all the bundles and features for the given profile
|
static Set<org.apache.karaf.features.Feature> |
expandFeature(org.apache.karaf.features.Feature feature,
Map<URI,org.apache.karaf.features.Repository> repositories) |
static Map<String,Parser> |
getProfileArtifacts(io.fabric8.api.FabricService fabricService,
DownloadManager downloadManager,
io.fabric8.api.Profile profile)
Returns the location and parser map (i.e.
|
static Map<String,Parser> |
getProfileArtifacts(io.fabric8.api.FabricService fabricService,
DownloadManager downloadManager,
io.fabric8.api.Profile profile,
AgentUtils.Callback<String> callback) |
static Map<String,Parser> |
getProfileArtifacts(io.fabric8.api.FabricService fabricService,
io.fabric8.api.Profile profile,
Iterable<String> bundles,
Iterable<org.apache.karaf.features.Feature> features)
Returns the location and parser map (i.e.
|
static Map<String,Parser> |
getProfileArtifacts(io.fabric8.api.FabricService fabricService,
io.fabric8.api.Profile profile,
Iterable<String> bundles,
Iterable<org.apache.karaf.features.Feature> features,
AgentUtils.Callback<String> nonMavenLocationCallback)
Returns the location and parser map (i.e.
|
protected static Map<URI,org.apache.karaf.features.Repository> |
getRepositories(io.fabric8.api.FabricService fabricService,
DownloadManager downloadManager,
io.fabric8.api.Profile profile)
Extracts the
URI /Repository map from the profile. |
static Map<String,org.apache.karaf.features.Repository> |
loadRepositories(DownloadManager manager,
Set<String> uris) |
static File |
waitForFileDownload(DownloadFuture future)
Waits for the download to complete returning the file or throwing an exception if it could not complete
|
public static final String FAB_PROTOCOL
public static final String REQ_PROTOCOL
public static Map<String,Parser> getProfileArtifacts(io.fabric8.api.FabricService fabricService, DownloadManager downloadManager, io.fabric8.api.Profile profile) throws Exception
Exception
public static Map<String,Parser> getProfileArtifacts(io.fabric8.api.FabricService fabricService, DownloadManager downloadManager, io.fabric8.api.Profile profile, AgentUtils.Callback<String> callback) throws Exception
Exception
public static Map<String,Parser> getProfileArtifacts(io.fabric8.api.FabricService fabricService, io.fabric8.api.Profile profile, Iterable<String> bundles, Iterable<org.apache.karaf.features.Feature> features)
public static File waitForFileDownload(DownloadFuture future) throws IOException
IOException
public static Map<String,Parser> getProfileArtifacts(io.fabric8.api.FabricService fabricService, io.fabric8.api.Profile profile, Iterable<String> bundles, Iterable<org.apache.karaf.features.Feature> features, AgentUtils.Callback<String> nonMavenLocationCallback)
public static void addRepository(DownloadManager manager, Map<URI,org.apache.karaf.features.Repository> repositories, URI uri) throws Exception
Exception
protected static Map<URI,org.apache.karaf.features.Repository> getRepositories(io.fabric8.api.FabricService fabricService, DownloadManager downloadManager, io.fabric8.api.Profile profile) throws Exception
URI
/Repository
map from the profile.fabricService
- downloadManager
- profile
- URISyntaxException
Exception
public static void addFeatures(Set<org.apache.karaf.features.Feature> features, io.fabric8.api.FabricService fabricService, DownloadManager downloadManager, io.fabric8.api.Profile profile) throws Exception
features
- fabricService
- downloadManager
- profile
- @throws ExceptionException
public static Set<org.apache.karaf.features.Feature> expandFeature(org.apache.karaf.features.Feature feature, Map<URI,org.apache.karaf.features.Repository> repositories)
public static Map<String,org.apache.karaf.features.Repository> loadRepositories(DownloadManager manager, Set<String> uris) throws Exception
Exception
public static Map<String,File> downloadProfileArtifacts(io.fabric8.api.FabricService fabricService, DownloadManager downloadManager, io.fabric8.api.Profile profile) throws Exception
Exception
public static Map<String,File> downloadBundles(DownloadManager manager, Iterable<org.apache.karaf.features.Feature> features, Iterable<String> bundles, Set<String> overrides) throws Exception
Exception
public static Map<String,File> downloadLocations(DownloadManager manager, Collection<String> locations) throws MalformedURLException, InterruptedException, io.fabric8.common.util.MultiException
MalformedURLException
InterruptedException
io.fabric8.common.util.MultiException
public static void addMavenProxies(Dictionary props, io.fabric8.api.FabricService fabricService)
Copyright © 2011–2014 Red Hat. All rights reserved.