Package org.fedoraproject.p2.osgi.impl
Class DefaultOSGiConfigurator
- java.lang.Object
-
- org.fedoraproject.p2.osgi.impl.DefaultOSGiConfigurator
-
- All Implemented Interfaces:
OSGiConfigurator
public class DefaultOSGiConfigurator extends java.lang.Object implements OSGiConfigurator
Configurator implementation that loads bundles listed in a text manifest file that is generated by Tycho. If Tycho is in "bootstrapped" mode, then it instead loads bundles contained withing the "tycho-bundles-external" bootstrap zip-ball.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.fedoraproject.xmvn.artifact.Artifact
BUNDLES_EXTERNAL
private static org.fedoraproject.xmvn.artifact.Artifact
BUNDLES_EXTERNAL_ZIP
private org.slf4j.Logger
logger
private org.fedoraproject.xmvn.resolver.Resolver
resolver
-
Constructor Summary
Constructors Constructor Description DefaultOSGiConfigurator(org.fedoraproject.xmvn.resolver.Resolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.nio.file.Path>
getBundles()
private java.util.List<java.lang.String>
getBundlesFromZip(java.nio.file.Path bundlesZip)
Extracts all OSGi bundles contained within the given zip file and returns them in a list.java.util.Collection<java.lang.String>
getExportedPackages()
-
-
-
Field Detail
-
logger
private final org.slf4j.Logger logger
-
BUNDLES_EXTERNAL
private static final org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL
-
BUNDLES_EXTERNAL_ZIP
private static final org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL_ZIP
-
resolver
private final org.fedoraproject.xmvn.resolver.Resolver resolver
-
-
Method Detail
-
getBundles
public java.util.Collection<java.nio.file.Path> getBundles()
- Specified by:
getBundles
in interfaceOSGiConfigurator
-
getBundlesFromZip
private java.util.List<java.lang.String> getBundlesFromZip(java.nio.file.Path bundlesZip) throws java.io.IOException
Extracts all OSGi bundles contained within the given zip file and returns them in a list.- Parameters:
bundlesZip
- path to the zip on the filesystem- Returns:
- the list of paths to the extracted bundles
- Throws:
java.io.IOException
- if there was an IO error during extraction
-
getExportedPackages
public java.util.Collection<java.lang.String> getExportedPackages()
- Specified by:
getExportedPackages
in interfaceOSGiConfigurator
-
-