aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cummi...@apache.org
Subject svn commit: r1062533 - in /aries/trunk/application: application-api/src/main/java/org/apache/aries/application/management/spi/resolve/ application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/
Date Sun, 23 Jan 2011 21:20:28 GMT
Author: cumminsh
Date: Sun Jan 23 21:20:26 2011
New Revision: 1062533

URL: http://svn.apache.org/viewvc?rev=1062533&view=rev
Log:
ARIES-542: New API on DeploymentManifestManager which takes in a PlatformRepository.

Modified:
    aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
    aries/trunk/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java

Modified: aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java?rev=1062533&r1=1062532&r2=1062533&view=diff
==============================================================================
--- aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
(original)
+++ aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
Sun Jan 23 21:20:26 2011
@@ -23,10 +23,10 @@ import java.util.jar.Manifest;
 
 import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.Content;
-import org.apache.aries.application.ServiceDeclaration;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.ResolveConstraint;
 import org.apache.aries.application.management.ResolverException;
+import org.apache.aries.application.management.spi.repository.PlatformRepository;
 import org.apache.aries.application.modelling.DeployedBundles;
 import org.apache.aries.application.modelling.ModelledResource;
 
@@ -56,6 +56,22 @@ public interface DeploymentManifestManag
       Collection<Content> otherBundles) throws ResolverException;
 
   /**
+   * Generate the deployment manifest map. The method can be used for some advanced scenarios.
+   * @param appMeta The Aries application metadata
+   * @param byValueBundles By value bundles
+   * @param useBundleSet Use Bundle set
+   * @param otherBundles Other bundles to be used to narrow the resolved bundles
+   * @param platformRepository a platform repository to use instead of the default
+   * @return DeployedBundles model of the deployed application
+   * @throws ResolverException
+   */
+  DeployedBundles generateDeployedBundles( 
+      ApplicationMetadata appMetadata, 
+      Collection<ModelledResource> byValueBundles, 
+      Collection<Content> otherBundles,
+      PlatformRepository platformRepository) throws ResolverException;
+  
+  /**
    * Generate a Manifest representation of a DEPLOYMENT.MF, 
    * suitable for example to writing to disk
    * @param appSymbolicName

Modified: aries/trunk/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java?rev=1062533&r1=1062532&r2=1062533&view=diff
==============================================================================
--- aries/trunk/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java
(original)
+++ aries/trunk/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java
Sun Jan 23 21:20:26 2011
@@ -49,6 +49,7 @@ import org.apache.aries.application.mana
 import org.apache.aries.application.management.BundleInfo;
 import org.apache.aries.application.management.ResolveConstraint;
 import org.apache.aries.application.management.ResolverException;
+import org.apache.aries.application.management.spi.repository.PlatformRepository;
 import org.apache.aries.application.management.spi.resolve.AriesApplicationResolver;
 import org.apache.aries.application.management.spi.resolve.DeploymentManifestManager;
 import org.apache.aries.application.management.spi.resolve.PostResolveTransformer;
@@ -181,9 +182,19 @@ public class DeploymentManifestManagerIm
       Collection<ModelledResource> provideByValueBundles, 
       Collection<Content> otherBundles) throws ResolverException {  
     
-    _logger.debug(LOG_ENTRY, "generateDeployedBundles", new Object[]{appMetadata,
-        provideByValueBundles,otherBundles });
+		_logger.debug(LOG_ENTRY, "generateDeployedBundles", new Object[] {
+				appMetadata, provideByValueBundles, otherBundles });
+		DeployedBundles bundles = generateDeployedBundles(appMetadata,
+				provideByValueBundles, otherBundles, null);
+		_logger.debug(LOG_EXIT, "generateDeploymentManifest",
+				new Object[] { bundles });
+		return bundles;
+  }
     
+    public DeployedBundles generateDeployedBundles(ApplicationMetadata appMetadata,
+            Collection<ModelledResource> provideByValueBundles, Collection<Content>
otherBundles, PlatformRepository platformRepository)
+            throws ResolverException {
+     
     Collection<Content> useBundleSet = appMetadata.getUseBundles();
     Collection<Content> appContent = appMetadata.getApplicationContents();
     
@@ -233,7 +244,13 @@ public class DeploymentManifestManagerIm
       bundlesToResolve.addAll(appContent);
       Collection<ImportedBundle> slimmedDownUseBundle = narrowUseBundles(useBundleIB,
requiredUseBundle);
       bundlesToResolve.addAll(toContent(slimmedDownUseBundle));
-      bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion, byValueBundles,
bundlesToResolve);
+      if (platformRepository != null) {
+        bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion,
+            byValueBundles, bundlesToResolve, platformRepository);
+      } else {
+        bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion,
+            byValueBundles, bundlesToResolve);
+      }
       pruneFakeBundleFromResults (bundlesToBeProvisioned);
       for (ModelledResource rbm : bundlesToBeProvisioned)
       {



Mime
View raw message