org.apache.felix.bundlerepository

## Interface Resolver

All Known Implementing Classes:
  ResolverImpl

    public interface Resolver

### Field Summary

Fields
`static int` `DO_NOT_PREFER_LOCAL`
`static int` `NO_LOCAL_RESOURCES`
`static int` `NO_OPTIONAL_RESOURCES`
`static int` `NO_SYSTEM_BUNDLE`
`static int` `START`

### 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
`Capability[]` `getGlobalCapabilities()` Returns the list of global capabilities
`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.

### Field Detail

#### NO_OPTIONAL_RESOURCES

    static final int NO_OPTIONAL_RESOURCES

See Also:
  Constant Field Values

#### NO_LOCAL_RESOURCES

    static final int NO_LOCAL_RESOURCES

See Also:
  Constant Field Values

#### NO_SYSTEM_BUNDLE

    static final int NO_SYSTEM_BUNDLE

See Also:
  Constant Field Values

#### DO_NOT_PREFER_LOCAL

    static final int DO_NOT_PREFER_LOCAL

See Also:
  Constant Field Values

#### START

    static final int START

See Also:
  Constant Field Values

### Method Detail

#### add

    void add(Resource resource)

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.

Parameters:
  `resource` - the resource to add

#### getAddedResources

    Resource[] getAddedResources()

Returns the list of resources that have been added to the resolution

Returns:

#### add

    void add(Requirement requirement)

Add the following requirement to the resolution The current resolution will be lost after adding a requirement.

Parameters:
  `requirement` - the requirement to add

#### getAddedRequirements

    Requirement[] getAddedRequirements()

Returns the list of requirements that have been added to the resolution

Returns:

#### addGlobalCapability

    void addGlobalCapability(Capability capability)

Add a global capability. A global capability is one capability provided by the environment but not reflected in local resources.

Parameters:
  `capability` - the new global capability

#### getGlobalCapabilities

    Capability[] getGlobalCapabilities()

Returns the list of global capabilities

Returns:

#### resolve

    boolean resolve()
                    throws InterruptedResolutionException

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.

Returns:
  `true` if the resolution has succeeded else `false`
Throws:
  `InterruptedResolutionException` - if the resolution has been interrupted

#### resolve

    boolean resolve(int flags)
                    throws InterruptedResolutionException

Start the resolution process with the following flags.

Parameters:
  `flags` - resolution flags
Returns:
  `true` if the resolution has succeeded else `false`
Throws:
  `InterruptedResolutionException` - if the resolution has been interrupted

#### getRequiredResources

    Resource[] getRequiredResources()

List of mandatory resources that need to be installed

Returns:

#### getOptionalResources

    Resource[] getOptionalResources()

List of optional resources that may be installed

Returns:

#### getReason

    Reason[] getReason(Resource resource)

List of reasons why a resource has been included either as a mandatory or optional resource during the resolution.

Parameters:
  `resource` -
Returns:
  an array of Reason

#### getUnsatisfiedRequirements

    Reason[] getUnsatisfiedRequirements()

List of requirements that could not be satisfied during the resolution

Returns:

#### deploy

    void deploy(int flags)