org.apache.felix.bundlerepository.impl

## Class ResolverImpl

- java.lang.Object
- - org.apache.felix.bundlerepository.impl.ResolverImpl

All Implemented Interfaces:
  Resolver

    public class ResolverImpl
    extends java.lang.Object
    implements Resolver

### Field Summary

### Fields inherited from interface org.apache.felix.bundlerepository.Resolver

`DO_NOT_PREFER_LOCAL, NO_LOCAL_RESOURCES, NO_OPTIONAL_RESOURCES, NO_SYSTEM_BUNDLE, START`

### Constructor Summary

Constructors
Constructor and Description
`ResolverImpl(org.osgi.framework.BundleContext context, Repository[] repositories, org.apache.felix.utils.log.Logger logger)`

### Method Summary

Methods
`void` `add(Requirement requirement)` Add the following requirement to the resolution The current resolution will be lost after adding a requirement.
`void` `add(Resource resource)` Add the following resource to the resolution.
`void` `addGlobalCapability(Capability capability)` Add a global capability.
`void` `deploy(int flags)`
`Requirement[]` `getAddedRequirements()` Returns the list of requirements that have been added to the resolution
`Resource[]` `getAddedResources()` Returns the list of resources that have been added to the resolution
`static java.lang.String` `getBundleName(org.osgi.framework.Bundle bundle)`
`Capability[]` `getGlobalCapabilities()` Returns the list of global capabilities
`protected LocalResource[]` `getLocalResources()`
`Resource[]` `getOptionalResources()` List of optional resources that may be installed
`Reason[]` `getReason(Resource resource)` List of reasons why a resource has been included either as a mandatory or optional resource during the resolution.
`Resource[]` `getRequiredResources()` List of mandatory resources that need to be installed
`Reason[]` `getUnsatisfiedRequirements()` List of requirements that could not be satisfied during the resolution
`boolean` `resolve()` Start the resolution process and return whether the constraints have been successfully met or not.
`boolean` `resolve(int flags)` Start the resolution process with the following flags.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ResolverImpl

    public ResolverImpl(org.osgi.framework.BundleContext context,
                Repository[] repositories,
                org.apache.felix.utils.log.Logger logger)

### Method Detail

#### add

    public void add(Resource resource)

Description copied from interface: `Resolver`
Add the following resource to the resolution. The resource will be part of the output and all its requirements will be satisfied. It has the same effect has adding a requirement that will match this resource by symbolicname and version. The current resolution will be lost after adding a resource.

Specified by:
  `add` in interface `Resolver`
Parameters:
  `resource` - the resource to add

#### getAddedResources

    public Resource[] getAddedResources()

Description copied from interface: `Resolver`
Returns the list of resources that have been added to the resolution

Specified by:
  `getAddedResources` in interface `Resolver`
Returns:

#### add

    public void add(Requirement requirement)

Description copied from interface: `Resolver`
Add the following requirement to the resolution The current resolution will be lost after adding a requirement.

Specified by:
  `add` in interface `Resolver`
Parameters:
  `requirement` - the requirement to add

#### getAddedRequirements

    public Requirement[] getAddedRequirements()

Description copied from interface: `Resolver`
Returns the list of requirements that have been added to the resolution

Specified by:
  `getAddedRequirements` in interface `Resolver`
Returns:

#### addGlobalCapability

    public void addGlobalCapability(Capability capability)

Description copied from interface: `Resolver`
Add a global capability. A global capability is one capability provided by the environment but not reflected in local resources.

Specified by:
  `addGlobalCapability` in interface `Resolver`
Parameters:
  `capability` - the new global capability

#### getGlobalCapabilities

    public Capability[] getGlobalCapabilities()

Description copied from interface: `Resolver`
Returns the list of global capabilities

Specified by:
  `getGlobalCapabilities` in interface `Resolver`
Returns:

#### getRequiredResources

    public Resource[] getRequiredResources()

Description copied from interface: `Resolver`
List of mandatory resources that need to be installed

Specified by:
  `getRequiredResources` in interface `Resolver`
Returns:

#### getOptionalResources

    public Resource[] getOptionalResources()

Description copied from interface: `Resolver`
List of optional resources that may be installed

Specified by:
  `getOptionalResources` in interface `Resolver`
Returns:

#### getReason

    public Reason[] getReason(Resource resource)

Description copied from interface: `Resolver`
List of reasons why a resource has been included either as a mandatory or optional resource during the resolution.

Specified by:
  `getReason` in interface `Resolver`
Returns:
  an array of Reason

#### getUnsatisfiedRequirements

    public Reason[] getUnsatisfiedRequirements()

Description copied from interface: `Resolver`
List of requirements that could not be satisfied during the resolution

Specified by:
  `getUnsatisfiedRequirements` in interface `Resolver`
Returns:

#### getLocalResources

    protected LocalResource[] getLocalResources()

#### resolve

    public boolean resolve()

Description copied from interface: `Resolver`
Start the resolution process and return whether the constraints have been successfully met or not. The resolution can be interrupted by a call to Thread.interrupt() at any time. The result will be to stop the resolver and throw an InterruptedException.

Specified by:
  `resolve` in interface `Resolver`
Returns:
  `true` if the resolution has succeeded else `false`

#### resolve

    public boolean resolve(int flags)

Description copied from interface: `Resolver`
Start the resolution process with the following flags.

Specified by:
  `resolve` in interface `Resolver`
Parameters:
  `flags` - resolution flags
Returns:
  `true` if the resolution has succeeded else `false`

#### deploy

    public void deploy(int flags)

Specified by:
  `deploy` in interface `Resolver`

#### getBundleName

    public static java.lang.String getBundleName(org.osgi.framework.Bundle bundle)