org.apache.aries.application.modelling.impl
Class DeployedBundlesImpl

java.lang.Object
  extended by org.apache.aries.application.modelling.impl.DeployedBundlesImpl
All Implemented Interfaces:
org.apache.aries.application.modelling.DeployedBundles

public final class DeployedBundlesImpl
extends Object
implements org.apache.aries.application.modelling.DeployedBundles

Class to generate DEPLOYMENT.MF manifest entries for resolved bundles based on corresponding APPLICATION.MF entries.


Constructor Summary
DeployedBundlesImpl(String assetName, Collection<org.apache.aries.application.modelling.ImportedBundle> appContentNames, Collection<org.apache.aries.application.modelling.ImportedBundle> appUseBundleNames, Collection<org.apache.aries.application.modelling.ModelledResource> fakeServiceProvidingBundles)
          Constructor for cases when we have one or more '
 
Method Summary
 void addBundle(org.apache.aries.application.modelling.ModelledResource modelledBundle)
          Add provisioned version information for a specific bundle name.
 String getContent()
          Get the value corresponding to the Deployed-Content header in the deployment.mf.
 Collection<org.apache.aries.application.modelling.ModelledResource> getDeployedContent()
          Get the set of bundles that are going to be deployed into an isolated framework
 String getDeployedImportService()
          Get the Deployed-ImportService header.
 Collection<org.apache.aries.application.modelling.ModelledResource> getDeployedProvisionBundle()
          Get the set of bundles that map to Provision-Bundle: these plus getRequiredUseBundle combined give the bundles that will be provisioned into the shared bundle space 'getProvisionBundle' returns the manifest header string, so this method needs to be called something else.
 Map<String,String> getExtraHeaders()
          This method will be overridden by a PostResolveTransformer returning an extended version of DeployedBundles
 String getImportPackage()
          Get the value corresponding to the Import-Package header in the deployment.mf.
 String getProvisionBundle()
          Get the value corresponding to the Provision-Bundle header in the deployment.mf.
 Collection<org.apache.aries.application.modelling.ModelledResource> getRequiredUseBundle()
          Get the subset of bundles specified in use-bundle that are actually required to satisfy direct requirements of deployed content.
 String getUseBundle()
          Get the value corresponding to the Deployed-Use-Bundle header in the deployment.mf.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeployedBundlesImpl

public DeployedBundlesImpl(String assetName,
                           Collection<org.apache.aries.application.modelling.ImportedBundle> appContentNames,
                           Collection<org.apache.aries.application.modelling.ImportedBundle> appUseBundleNames,
                           Collection<org.apache.aries.application.modelling.ModelledResource> fakeServiceProvidingBundles)
Constructor for cases when we have one or more '

Parameters:
assetName - the name of the asset being deployed.
appContentNames - the bundle names specified in Deployed-Content.
appUseBundleNames - the bundle names specified in Deployed-Use-Bundle.
fakeServiceProvidingBundles - bundles that we're pretending are part of the deployed content. Can be null. These bundles are proxies for bundles provided (for example by SCA) that export services matching Application-ImportService.
Method Detail

addBundle

public void addBundle(org.apache.aries.application.modelling.ModelledResource modelledBundle)
Add provisioned version information for a specific bundle name. This will be added to the appropriate manifest header for the specified bundle.

Specified by:
addBundle in interface org.apache.aries.application.modelling.DeployedBundles
Parameters:
resolvedBundle - the bundle that has been provisioned.
resolvedVersion - the specific version provisioned.

getContent

public String getContent()
Get the value corresponding to the Deployed-Content header in the deployment.mf.

Specified by:
getContent in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a manifest entry, or an empty string if there is no content.

getUseBundle

public String getUseBundle()
Get the value corresponding to the Deployed-Use-Bundle header in the deployment.mf.

Specified by:
getUseBundle in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a manifest entry, or an empty string if there is no content.

getProvisionBundle

public String getProvisionBundle()
Get the value corresponding to the Provision-Bundle header in the deployment.mf.

Specified by:
getProvisionBundle in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a manifest entry, or an empty string if there is no content.

getImportPackage

public String getImportPackage()
                        throws org.apache.aries.application.management.ResolverException
Get the value corresponding to the Import-Package header in the deployment.mf.

Specified by:
getImportPackage in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a manifest entry, or an empty string if there is no content.
Throws:
org.apache.aries.application.management.ResolverException - if the requirements could not be resolved.

getDeployedImportService

public String getDeployedImportService()
Get the Deployed-ImportService header. this.deployedImportService contains all the service import filters for every blueprint component within the application. We will only write an entry to Deployed-ImportService if a) the reference isMultiple(), or b) the service was not available internally when the app was first deployed

Specified by:
getDeployedImportService in interface org.apache.aries.application.modelling.DeployedBundles

toString

public String toString()
Specified by:
toString in interface org.apache.aries.application.modelling.DeployedBundles
Overrides:
toString in class Object

getDeployedContent

public Collection<org.apache.aries.application.modelling.ModelledResource> getDeployedContent()
Get the set of bundles that are going to be deployed into an isolated framework

Specified by:
getDeployedContent in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a set of bundle metadata

getDeployedProvisionBundle

public Collection<org.apache.aries.application.modelling.ModelledResource> getDeployedProvisionBundle()
Get the set of bundles that map to Provision-Bundle: these plus getRequiredUseBundle combined give the bundles that will be provisioned into the shared bundle space 'getProvisionBundle' returns the manifest header string, so this method needs to be called something else.

Specified by:
getDeployedProvisionBundle in interface org.apache.aries.application.modelling.DeployedBundles

getRequiredUseBundle

public Collection<org.apache.aries.application.modelling.ModelledResource> getRequiredUseBundle()
                                                                                         throws org.apache.aries.application.management.ResolverException
Get the subset of bundles specified in use-bundle that are actually required to satisfy direct requirements of deployed content.

Specified by:
getRequiredUseBundle in interface org.apache.aries.application.modelling.DeployedBundles
Returns:
a set of bundle metadata.
Throws:
org.apache.aries.application.management.ResolverException - if the requirements could not be resolved.

getExtraHeaders

public Map<String,String> getExtraHeaders()
This method will be overridden by a PostResolveTransformer returning an extended version of DeployedBundles

Specified by:
getExtraHeaders in interface org.apache.aries.application.modelling.DeployedBundles


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