|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.internal.resolver.StateHelperImpl
public final class StateHelperImpl
An implementation for the StateHelper API. Access to this implementation is provided by the PlatformAdmin. Since this helper is a general facility for state manipulation, it should not be tied to any implementation details.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.osgi.service.resolver.StateHelper |
|---|
ACCESS_DISCOURAGED, ACCESS_ENCOURAGED, VISIBLE_INCLUDE_ALL_HOST_WIRES, VISIBLE_INCLUDE_EE_PACKAGES |
| Constructor Summary | |
|---|---|
StateHelperImpl()
|
|
| Method Summary | |
|---|---|
int |
getAccessCode(BundleDescription bundle,
ExportPackageDescription export)
Returns the access code that the specified BundleDescription has to the
specified ExportPackageDescription. |
BundleDescription[] |
getDependentBundles(BundleDescription[] bundles)
Returns all bundles in the state depending on the given bundles. |
static StateHelper |
getInstance()
|
BundleDescription[] |
getPrerequisites(BundleDescription[] bundles)
Returns all the prerequisite bundles in the state for the given bundles. |
VersionConstraint[] |
getUnsatisfiedConstraints(BundleDescription bundle)
Returns all unsatisfied constraints in the given bundle. |
VersionConstraint[] |
getUnsatisfiedLeaves(BundleDescription[] bundles)
Returns all unsatisfied constraints in the given bundles that have no possible supplier. |
ExportPackageDescription[] |
getVisiblePackages(BundleDescription bundle)
Returns a list of all packages that the specified bundle has access to which are exported by other bundles. |
ExportPackageDescription[] |
getVisiblePackages(BundleDescription bundle,
int options)
Returns a list of all packages that the specified bundle has access to which are exported by other bundles. |
boolean |
isResolvable(BundleSpecification specification)
Returns whether the given bundle specification constraint is resolvable. |
boolean |
isResolvable(HostSpecification specification)
Returns whether the given host specification constraint is resolvable. |
boolean |
isResolvable(ImportPackageSpecification constraint)
Returns whether the given package specification constraint is resolvable. |
java.lang.Object[][] |
sortBundles(BundleDescription[] toSort)
Sorts the given array of resolved bundles in pre-requisite order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StateHelperImpl()
| Method Detail |
|---|
public BundleDescription[] getDependentBundles(BundleDescription[] bundles)
StateHelper
getDependentBundles in interface StateHelperbundles - the initial set of bundles
StateHelperpublic BundleDescription[] getPrerequisites(BundleDescription[] bundles)
StateHelper
getPrerequisites in interface StateHelperbundles - the inital set of bundles
public VersionConstraint[] getUnsatisfiedLeaves(BundleDescription[] bundles)
StateHelperThe returned constraints include only the unsatisfied constraints in the given state that have no possible supplier (leaf constraints). There may be additional unsatisfied constraints in the given bundles but these will have at least one possible supplier. In this case the possible supplier of the constraint is not resolved for some reason. For example, a given state only has Bundles X and Y installed and Bundles X and Y have the following constraints:
Bundle X requires Bundle Y Bundle Y requires Bundle Z
In this case Bundle Y has an unsatisfied constraint leaf on Bundle Z. This will cause Bundle X's constraint on Bundle Y to be unsatisfied as well because the bundles are involved in a dependency chain. Bundle X's constraint on Bundle Y is not considered a leaf because there is a possible supplier Y in the given state.
Note that a bundle may have no unsatisfied constraints and still not be resolved.
getUnsatisfiedLeaves in interface StateHelperbundles - the bundles to examine
public VersionConstraint[] getUnsatisfiedConstraints(BundleDescription bundle)
StateHelperNote that a bundle may have no unsatisfied constraints and still not be resolved.
getUnsatisfiedConstraints in interface StateHelperbundle - the bundle to examine
StateHelperpublic boolean isResolvable(ImportPackageSpecification constraint)
StateHelper
isResolvable in interface StateHelperconstraint - the package specification constraint to be examined
true if the constraint can be resolved,
false otherwiseStateHelperpublic boolean isResolvable(BundleSpecification specification)
StateHelper
isResolvable in interface StateHelperspecification - the bundle specification constraint to be examined
true if the constraint can be resolved,
false otherwiseStateHelperpublic boolean isResolvable(HostSpecification specification)
StateHelper
isResolvable in interface StateHelperspecification - the host specification constraint to be examined
true if the constraint can be resolved,
false otherwiseStateHelperpublic java.lang.Object[][] sortBundles(BundleDescription[] toSort)
StateHelperUnresolved bundles are ignored.
sortBundles in interface StateHelpertoSort - an array of bundles to be sorted
public ExportPackageDescription[] getVisiblePackages(BundleDescription bundle)
StateHelperSame as calling getVisiblePackages(bundle, 0)
getVisiblePackages in interface StateHelperbundle - a bundle to get the list of packages for.
public ExportPackageDescription[] getVisiblePackages(BundleDescription bundle,
int options)
StateHelper
getVisiblePackages in interface StateHelperbundle - a bundle to get the list of packages for.options - the options for selecting the visible packages
StateHelper.VISIBLE_INCLUDE_EE_PACKAGES,
StateHelper.VISIBLE_INCLUDE_ALL_HOST_WIRES
public int getAccessCode(BundleDescription bundle,
ExportPackageDescription export)
StateHelperBundleDescription has to the
specified ExportPackageDescription.
getAccessCode in interface StateHelperbundle - the bundle to find the access code forexport - the export to find the access code for
StateHelper.ACCESS_ENCOURAGED,
StateHelper.ACCESS_DISCOURAGEDpublic static StateHelper getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||