Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.service
Interface BundleDependencyService


public interface BundleDependencyService

The BundleDependencyService declares an API that allows the dependencies between installed bundles to be queried. The interface supports adding and removing an object as a BundleDependencyListener.

The interface also provides a way for bundles to communicate that they should be considered uninstallable, meaning that they wish to be automatically uninstalled when their last dependent bundle is uninstalled.


Field Summary
static String BDS_STATUS_PROPERTY
           
static String SERVICE_NAME
          The OSGi service name for BundleDependencyService.
 
Method Summary
 void addBundleDependencyListener(BundleDependencyListener listener)
          Add a BundleDependencyListener.
 void addUninstallableBundle(Bundle bundle)
          Adds a Bundle to the collection of uninstallable bundles.
 List getAllDependentsOf(Bundle bundle)
          Query for all the dependents of the specified bundle.
 List getAllPrerequisitesOf(Bundle bundle)
          Query for all the prerequisites of the specified bundle.
 List getBundleActivationManagerIds()
          Query for all the BundleActivationManager ids.
 Collection getBundles()
          Get all the bundles.
 List getDependentsOf(Bundle bundle)
          Query for the immediate dependents of the specified bundle.
 List getPrerequisitesOf(Bundle bundle)
          Query for the immediate prerequisites of the specified bundle.
 List getUnacquiredImportedServiceNames(String id)
          Get the unacquired imported services of the IBundleActivationManager with the specified id.
 List getUnacquiredOptionalImportedServiceNames(String id)
          Get the unacquired optional imported services of the IBundleActivationManager with the specified id.
 boolean hasCircularReferences(Bundle bundle)
          Answers true if the specified bundle has circular references, otherwise false.
 boolean isRegisteredAsUninstallable(Bundle bundle)
          Answers true if a bundle is registered as uninstallable, otherwise false.
 void removeBundleDependencyListener(BundleDependencyListener listener)
          Add a BundleDependencyListener.
 void removeUninstallableBundle(Bundle bundle)
          Removes a Bundle from the collection of uninstallable bundles.
 String toXml()
          Convert the state of the BundleDependencyService to XML.
 String toXml(int indent)
          Convert the state of the BundleDependencyService to XML.
 

Field Detail

BDS_STATUS_PROPERTY

static final String BDS_STATUS_PROPERTY
See Also:
Constant Field Values

SERVICE_NAME

static final String SERVICE_NAME
The OSGi service name for BundleDependencyService.

Method Detail

addBundleDependencyListener

void addBundleDependencyListener(BundleDependencyListener listener)
Add a BundleDependencyListener.

Parameters:
listener - A BundleDependencyListener.

addUninstallableBundle

void addUninstallableBundle(Bundle bundle)
Adds a Bundle to the collection of uninstallable bundles.

Parameters:
bundle - An uninstallable Bundle.

getAllDependentsOf

List getAllDependentsOf(Bundle bundle)
Query for all the dependents of the specified bundle.

Parameters:
bundle - A Bundle.
Returns:
List

getAllPrerequisitesOf

List getAllPrerequisitesOf(Bundle bundle)
Query for all the prerequisites of the specified bundle.

Parameters:
bundle - A Bundle.
Returns:
List

getBundleActivationManagerIds

List getBundleActivationManagerIds()
Query for all the BundleActivationManager ids.

Returns:
List

getBundles

Collection getBundles()
Get all the bundles.

Returns:
Collection

getDependentsOf

List getDependentsOf(Bundle bundle)
Query for the immediate dependents of the specified bundle.

Parameters:
bundle - A Bundle.
Returns:
List

getPrerequisitesOf

List getPrerequisitesOf(Bundle bundle)
Query for the immediate prerequisites of the specified bundle.

Parameters:
bundle - A Bundle.
Returns:
List

getUnacquiredImportedServiceNames

List getUnacquiredImportedServiceNames(String id)
Get the unacquired imported services of the IBundleActivationManager with the specified id.

Parameters:
id - The id of a IBundleActivationManager.
Returns:
List

getUnacquiredOptionalImportedServiceNames

List getUnacquiredOptionalImportedServiceNames(String id)
Get the unacquired optional imported services of the IBundleActivationManager with the specified id.

Parameters:
id - The id of a IBundleActivationManager.
Returns:
List

hasCircularReferences

boolean hasCircularReferences(Bundle bundle)
Answers true if the specified bundle has circular references, otherwise false.

Parameters:
bundle - The Bundle to be queried.
Returns:
boolean

isRegisteredAsUninstallable

boolean isRegisteredAsUninstallable(Bundle bundle)
Answers true if a bundle is registered as uninstallable, otherwise false.

Parameters:
bundle - The Bundle to be queried.
Returns:
boolean

removeBundleDependencyListener

void removeBundleDependencyListener(BundleDependencyListener listener)
Add a BundleDependencyListener.

Parameters:
listener - a BundleDependencyListeer.

removeUninstallableBundle

void removeUninstallableBundle(Bundle bundle)
Removes a Bundle from the collection of uninstallable bundles.

Parameters:
bundle - An uninstallable Bundle.

toXml

String toXml()
Convert the state of the BundleDependencyService to XML.

Returns:
An XML representation of the state of the service.

toXml

String toXml(int indent)
Convert the state of the BundleDependencyService to XML.

Parameters:
indent - The indent level at which to start.
Returns:
An XML representation of the state of the service.

Service Activator Toolkit
Version 1.1.0 (20081206)