org.apache.aries.application.management.spi.resolve
Interface AriesApplicationResolver


public interface AriesApplicationResolver

An AriesApplicationResolver is a service used by the AriesApplicationManager when one of the createApplication methods are called. It is used to "deploy" the application. The "deploy" process generates an Aries Deployment manifest


Method Summary
 BundleInfo getBundleInfo(String bundleSymbolicName, Version bundleVersion)
          Return the info for the requested bundle.
 Set<BundleInfo> resolve(AriesApplication app, ResolveConstraint... constraints)
          Deprecated. 
 Collection<ModelledResource> resolve(String appName, String appVersion, Collection<ModelledResource> byValueBundles, Collection<Content> inputs)
          Resolve an AriesApplication.
 Collection<ModelledResource> resolve(String appName, String appVersion, Collection<ModelledResource> byValueBundles, Collection<Content> inputs, PlatformRepository platformRepository)
          Resolve an AriesApplication against a given platform repository.
 

Method Detail

resolve

@Deprecated
Set<BundleInfo> resolve(AriesApplication app,
                                   ResolveConstraint... constraints)
                        throws ResolverException
Deprecated. 

Deprecated. Use the method resolve(String appName, String appVersion, Collection byValueBundles, Collection inputs) throws ResolverException; Resolve an AriesApplication. The implementation of this method is expected to do the following:
  1. Extract from the AriesApplication's the application's content. This is performed using the AriesApplication.getApplicationMetadata() method following by calling ApplicationMetadata.getApplicationContents().
  2. Resolve the application content using any configured repositories for bundles, and the bundles that are contained by value inside the application. These bundles can be obtained by calling AriesApplication.getBundleInfo().
The method returns the set of bundle info objects that should be used.

Parameters:
app - The application to resolve
Returns:
The additional bundles required to ensure that the application resolves. This set will not include those provided by value within the application.
Throws:
ResolverException - if the application cannot be resolved.

getBundleInfo

BundleInfo getBundleInfo(String bundleSymbolicName,
                         Version bundleVersion)
Return the info for the requested bundle. This method is called when installing an application to determine where the bundle is located in order to install it.

If no matching bundle exists in the resolver runtime then null is returned.

Parameters:
bundleSymbolicName - the bundle symbolic name.
bundleVersion - the version of the bundle
Returns:
the BundleInfo for the requested bundle, or null if none could be found.

resolve

Collection<ModelledResource> resolve(String appName,
                                     String appVersion,
                                     Collection<ModelledResource> byValueBundles,
                                     Collection<Content> inputs)
                                     throws ResolverException
Resolve an AriesApplication. The resolving process will build a repository from by-value bundles. It then scans all the required bundles and pull the dependencies required to resolve the bundles. Return a collect of modelled resources. This method is called when installing an application

Parameters:
appName - Application name
appVersion - application version
byValueBundles - by value bundles
inputs - bundle requirement
Returns:
a collection of modelled resource required by this application.
Throws:
ResolverException

resolve

Collection<ModelledResource> resolve(String appName,
                                     String appVersion,
                                     Collection<ModelledResource> byValueBundles,
                                     Collection<Content> inputs,
                                     PlatformRepository platformRepository)
                                     throws ResolverException
Resolve an AriesApplication against a given platform repository. The resolving process will build a repository from by-value bundles. It then scans all the required bundles and pull the dependencies required to resolve the bundles. Return a collect of modelled resources. This method is called when installing an application

Parameters:
appName - Application name
appVersion - application version
byValueBundles - by value bundles
inputs - bundle requirement
platformRepository - a platform repository to resolve against instead of the default
Returns:
a collection of modelled resource required by this application.
Throws:
ResolverException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.