Class BundleInstallSupportImpl
- java.lang.Object
-
- org.apache.karaf.features.internal.service.BundleInstallSupportImpl
-
- All Implemented Interfaces:
BundleInstallSupport
public class BundleInstallSupportImpl extends Object implements BundleInstallSupport
Interaction with OSGi framework, where bundles are installed into it viaRegionDigraph
. After a bundle is installed, it may be controlled in standard way viaBundle
interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.karaf.features.internal.service.BundleInstallSupport
BundleInstallSupport.FrameworkInfo
-
-
Constructor Summary
Constructors Constructor Description BundleInstallSupportImpl(org.osgi.framework.Bundle ourBundle, org.osgi.framework.BundleContext ourBundleContext, org.osgi.framework.BundleContext systemBundleContext, org.osgi.framework.Bundle cmBundle, FeatureConfigInstaller configInstaller, org.eclipse.equinox.region.RegionDigraph digraph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteConfigs(Feature feature)
File
getDataFile(String fileName)
org.eclipse.equinox.region.RegionDigraph
getDiGraphCopy()
BundleInstallSupport.FrameworkInfo
getInfo()
org.osgi.framework.Bundle
installBundle(String region, String uri, InputStream is)
void
installConfigs(Feature feature)
void
installLibraries(Feature feature)
void
print(String message, boolean verbose)
void
refreshPackages(Collection<org.osgi.framework.Bundle> bundles)
void
replaceDigraph(Map<String,Map<String,Map<String,Set<String>>>> policies, Map<String,Set<Long>> bundles)
void
resolveBundles(Set<org.osgi.framework.Bundle> bundles, Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> wiring, Map<org.osgi.resource.Resource,org.osgi.framework.Bundle> resToBnd)
void
saveDigraph()
void
setBundleStartLevel(org.osgi.framework.Bundle bundle, int startLevel)
void
startBundle(org.osgi.framework.Bundle bundle)
void
stopBundle(org.osgi.framework.Bundle bundle, int options)
void
uninstall(org.osgi.framework.Bundle bundle)
void
unregister()
void
updateBundle(org.osgi.framework.Bundle bundle, String uri, InputStream is)
-
-
-
Constructor Detail
-
BundleInstallSupportImpl
public BundleInstallSupportImpl(org.osgi.framework.Bundle ourBundle, org.osgi.framework.BundleContext ourBundleContext, org.osgi.framework.BundleContext systemBundleContext, org.osgi.framework.Bundle cmBundle, FeatureConfigInstaller configInstaller, org.eclipse.equinox.region.RegionDigraph digraph)
-
-
Method Detail
-
unregister
public void unregister()
- Specified by:
unregister
in interfaceBundleInstallSupport
-
print
public void print(String message, boolean verbose)
- Specified by:
print
in interfaceBundleInstallSupport
-
refreshPackages
public void refreshPackages(Collection<org.osgi.framework.Bundle> bundles) throws InterruptedException
- Specified by:
refreshPackages
in interfaceBundleInstallSupport
- Throws:
InterruptedException
-
installBundle
public org.osgi.framework.Bundle installBundle(String region, String uri, InputStream is) throws org.osgi.framework.BundleException
- Specified by:
installBundle
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
updateBundle
public void updateBundle(org.osgi.framework.Bundle bundle, String uri, InputStream is) throws org.osgi.framework.BundleException
- Specified by:
updateBundle
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
uninstall
public void uninstall(org.osgi.framework.Bundle bundle) throws org.osgi.framework.BundleException
- Specified by:
uninstall
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
startBundle
public void startBundle(org.osgi.framework.Bundle bundle) throws org.osgi.framework.BundleException
- Specified by:
startBundle
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
stopBundle
public void stopBundle(org.osgi.framework.Bundle bundle, int options) throws org.osgi.framework.BundleException
- Specified by:
stopBundle
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
setBundleStartLevel
public void setBundleStartLevel(org.osgi.framework.Bundle bundle, int startLevel)
- Specified by:
setBundleStartLevel
in interfaceBundleInstallSupport
-
resolveBundles
public void resolveBundles(Set<org.osgi.framework.Bundle> bundles, Map<org.osgi.resource.Resource,List<org.osgi.resource.Wire>> wiring, Map<org.osgi.resource.Resource,org.osgi.framework.Bundle> resToBnd)
- Specified by:
resolveBundles
in interfaceBundleInstallSupport
-
replaceDigraph
public void replaceDigraph(Map<String,Map<String,Map<String,Set<String>>>> policies, Map<String,Set<Long>> bundles) throws org.osgi.framework.BundleException, org.osgi.framework.InvalidSyntaxException
- Specified by:
replaceDigraph
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
org.osgi.framework.InvalidSyntaxException
-
saveDigraph
public void saveDigraph()
- Specified by:
saveDigraph
in interfaceBundleInstallSupport
-
getDiGraphCopy
public org.eclipse.equinox.region.RegionDigraph getDiGraphCopy() throws org.osgi.framework.BundleException
- Specified by:
getDiGraphCopy
in interfaceBundleInstallSupport
- Throws:
org.osgi.framework.BundleException
-
installConfigs
public void installConfigs(Feature feature) throws IOException, org.osgi.framework.InvalidSyntaxException
- Specified by:
installConfigs
in interfaceBundleInstallSupport
- Throws:
IOException
org.osgi.framework.InvalidSyntaxException
-
deleteConfigs
public void deleteConfigs(Feature feature) throws IOException, org.osgi.framework.InvalidSyntaxException
- Specified by:
deleteConfigs
in interfaceBundleInstallSupport
- Throws:
IOException
org.osgi.framework.InvalidSyntaxException
-
installLibraries
public void installLibraries(Feature feature)
- Specified by:
installLibraries
in interfaceBundleInstallSupport
-
getDataFile
public File getDataFile(String fileName)
- Specified by:
getDataFile
in interfaceBundleInstallSupport
-
getInfo
public BundleInstallSupport.FrameworkInfo getInfo()
- Specified by:
getInfo
in interfaceBundleInstallSupport
-
-