Service Activator Toolkit
Version 1.0.0

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 SERVICE_NAME
           
 
Method Summary
 void addBundleDependencyListener(BundleDependencyListener listener)
          Add a BundleDependencyListener.
 void addUninstallableBundle(Bundle bundle)
          Adds a Bundle to the collection of uninstallable bundles.
 List getAllDependentOf(Bundle bundle)
          Query for all the dependents of the specified bundle.
 List getAllPrerequisitesOf(Bundle bundle)
          Query for all the prerequisites of the specified bundle.
 Collection getBundles()
          Get all the bundles.
 List getDependentOf(Bundle bundle)
          Query for the immediate dependents of the specified bundle.
 List getPrerequisitesOf(Bundle bundle)
          Query for the immediate prerequisites of the specified bundle.
 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

SERVICE_NAME

public static final String SERVICE_NAME
Method Detail

addBundleDependencyListener

public void addBundleDependencyListener(BundleDependencyListener listener)
Add a BundleDependencyListener.

Parameters:
listener - A BundleDependencyListener.

addUninstallableBundle

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

Parameters:
bundle - An uninstallable Bundle.

getAllDependentOf

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

Parameters:
bundle - A Bundle.
Returns:
List

getAllPrerequisitesOf

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

Parameters:
bundle - A Bundle.
Returns:
List

getBundles

public Collection getBundles()
Get all the bundles.

Returns:
Collection

getDependentOf

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

Parameters:
bundle - A Bundle.
Returns:
List

getPrerequisitesOf

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

Parameters:
bundle - A Bundle.
Returns:
List

isRegisteredAsUninstallable

public 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

public void removeBundleDependencyListener(BundleDependencyListener listener)
Add a BundleDependencyListener.

Parameters:
listener - a BundleDependencyListeer.

removeUninstallableBundle

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

Parameters:
bundle - An uninstallable Bundle.

toXml

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

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

toXml

public 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.0.0