aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cummi...@apache.org
Subject svn commit: r1069932 - 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/ application-...
Date Fri, 11 Feb 2011 19:51:34 GMT
Author: cumminsh
Date: Fri Feb 11 19:51:34 2011
New Revision: 1069932

URL: http://svn.apache.org/viewvc?rev=1069932&view=rev
Log:
ARIES-574: Back out ARIES-542 and expose ModelledBundleResource in exported package.

Added:
    aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ext/ModelledBundleResource.java
      - copied, changed from r1059279, aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ModelledBundleResource.java
Removed:
    aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ModelledBundleResource.java
Modified:
    aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/AriesApplicationResolver.java
    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
    aries/trunk/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
    aries/trunk/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
    aries/trunk/application/application-noop-resolver/src/main/java/org/apache/aries/application/resolver/noop/impl/NoOpResolver.java
    aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java

Modified: aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/AriesApplicationResolver.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/AriesApplicationResolver.java?rev=1069932&r1=1069931&r2=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/AriesApplicationResolver.java
(original)
+++ aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/AriesApplicationResolver.java
Fri Feb 11 19:51:34 2011
@@ -29,7 +29,6 @@ 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.modelling.ModelledResource;
 import org.osgi.framework.Version;
 
@@ -92,20 +91,4 @@ public interface AriesApplicationResolve
    */
   Collection<ModelledResource> resolve(String appName, String appVersion, Collection<ModelledResource>
byValueBundles, Collection<Content> inputs) 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
-   * @param appName Application name
-   * @param appVersion application version
-   * @param byValueBundles by value bundles
-   * @param inputs bundle requirement
-   * @param platformRepository a platform repository to resolve against instead of the default
-   * @return a collection of modelled resource required by this application.
-   * @throws ResolverException
-   */
-  Collection<ModelledResource> resolve(String appName, String appVersion, Collection<ModelledResource>
byValueBundles, Collection<Content> inputs, PlatformRepository platformRepository) throws
ResolverException;
-
 }

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=1069932&r1=1069931&r2=1069932&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
Fri Feb 11 19:51:34 2011
@@ -56,22 +56,6 @@ 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=1069932&r1=1069931&r2=1069932&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
Fri Feb 11 19:51:34 2011
@@ -49,7 +49,6 @@ 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;
@@ -175,24 +174,8 @@ public class DeploymentManifestManagerIm
    * @return
    * @throws ResolverException
    */
-  @Override
-  public DeployedBundles generateDeployedBundles
-  ( 
-      ApplicationMetadata appMetadata, 
-      Collection<ModelledResource> provideByValueBundles, 
-      Collection<Content> otherBundles) throws ResolverException {  
-    
-		_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)
+            Collection<ModelledResource> provideByValueBundles, Collection<Content>
otherBundles)
             throws ResolverException {
      
     Collection<Content> useBundleSet = appMetadata.getUseBundles();
@@ -244,14 +227,9 @@ public class DeploymentManifestManagerIm
       bundlesToResolve.addAll(appContent);
       Collection<ImportedBundle> slimmedDownUseBundle = narrowUseBundles(useBundleIB,
requiredUseBundle);
       bundlesToResolve.addAll(toContent(slimmedDownUseBundle));
-      if (platformRepository != null) {
-        bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion,
-            byValueBundles, bundlesToResolve, platformRepository);
-      } else {
-        bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion,
-            byValueBundles, bundlesToResolve);
-      }
-      pruneFakeBundleFromResults (bundlesToBeProvisioned);
+      bundlesToBeProvisioned = resolver.resolve(appSymbolicName, appVersion,
+          byValueBundles, bundlesToResolve);
+       pruneFakeBundleFromResults (bundlesToBeProvisioned);
       for (ModelledResource rbm : bundlesToBeProvisioned)
       {
         deployedBundles.addBundle(rbm);

Modified: aries/trunk/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java?rev=1069932&r1=1069931&r2=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
(original)
+++ aries/trunk/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
Fri Feb 11 19:51:34 2011
@@ -25,7 +25,6 @@ import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.IOException;
-import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -45,7 +44,6 @@ 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.runtime.LocalPlatform;
 import org.apache.aries.application.modelling.DeployedBundles;
@@ -129,15 +127,6 @@ public class DeploymentGeneratorTest
       _nextResults.add(result);
     }
 
-		public Collection<ModelledResource> resolve(String appName,
-				String appVersion, Collection<ModelledResource> byValueBundles,
-				Collection<Content> inputs,
-				PlatformRepository platformRepository) throws ResolverException 
-		{
-
-			return resolve(appName, appVersion, byValueBundles, inputs);
-		}
-
     public BundleInfo getBundleInfo(String bundleSymbolicName, Version bundleVersion)
     {
       return null;

Modified: aries/trunk/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java?rev=1069932&r1=1069931&r2=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
(original)
+++ aries/trunk/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
Fri Feb 11 19:51:34 2011
@@ -155,13 +155,6 @@ public class AriesApplicationManagerImpl
       return null;
     }
 
-    public DeployedBundles generateDeployedBundles(ApplicationMetadata appMetadata,
-            Collection<ModelledResource> byValueBundles, Collection<Content>
otherBundles, PlatformRepository platformRepository)
-            throws ResolverException {
-          // Not required or used in this test
-          return null;
-        }
-
     public Manifest generateDeploymentManifest(String appSymbolicName,
         String appVersion, DeployedBundles deployedBundles)
         throws ResolverException {
@@ -193,15 +186,6 @@ public class AriesApplicationManagerImpl
       
       return byValueBundles;
     }
-    
-	   public Collection<ModelledResource> resolve(String appName, String appVersion,
-		       Collection<ModelledResource> byValueBundles, Collection<Content> inputs,
PlatformRepository platformRepository)
-		       throws ResolverException
-		   {
-		     
-		     return byValueBundles;
-		   }
-
   }
   
   static class DummyLocalPlatform implements LocalPlatform {

Modified: aries/trunk/application/application-noop-resolver/src/main/java/org/apache/aries/application/resolver/noop/impl/NoOpResolver.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-noop-resolver/src/main/java/org/apache/aries/application/resolver/noop/impl/NoOpResolver.java?rev=1069932&r1=1069931&r2=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-noop-resolver/src/main/java/org/apache/aries/application/resolver/noop/impl/NoOpResolver.java
(original)
+++ aries/trunk/application/application-noop-resolver/src/main/java/org/apache/aries/application/resolver/noop/impl/NoOpResolver.java
Fri Feb 11 19:51:34 2011
@@ -72,14 +72,6 @@ public class NoOpResolver implements Ari
 	     
 	     return byValueBundles;
 	   }
-	   
-	   public Collection<ModelledResource> resolve(String appName, String appVersion,
-		       Collection<ModelledResource> byValueBundles, Collection<Content> inputs,
PlatformRepository platformRepository)
-		       throws ResolverException
-		   {
-		     
-		     return byValueBundles;
-		   }
 
 }
 

Modified: aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java?rev=1069932&r1=1069931&r2=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
(original)
+++ aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
Fri Feb 11 19:51:34 2011
@@ -56,8 +56,8 @@ import org.apache.aries.application.mode
 import org.apache.aries.application.modelling.ModellingManager;
 import org.apache.aries.application.modelling.utils.ModellingHelper;
 import org.apache.aries.application.resolver.internal.MessageUtil;
+import org.apache.aries.application.resolver.obr.ext.ModelledBundleResource;
 import org.apache.aries.application.resolver.obr.impl.ApplicationResourceImpl;
-import org.apache.aries.application.resolver.obr.impl.ModelledBundleResource;
 import org.apache.aries.application.resolver.obr.impl.OBRBundleInfo;
 import org.apache.aries.application.resolver.obr.impl.RepositoryGeneratorImpl;
 import org.apache.aries.application.resolver.obr.impl.ResourceWrapper;
@@ -130,13 +130,6 @@ public class OBRAriesResolver implements
     return returnOptionalResources;
   }
   
-	public Collection<ModelledResource> resolve(String appName,
-			String appVersion, Collection<ModelledResource> byValueBundles,
-			Collection<Content> inputs) throws ResolverException {
-		return resolve(appName, appVersion, byValueBundles,
-				inputs, this.platformRepository);
-	}
-
 /**
    * Resolve a list of resources from the OBR bundle repositories by OBR
    * resolver.
@@ -151,13 +144,13 @@ public class OBRAriesResolver implements
    */
   @Override
   public Collection<ModelledResource> resolve(String appName, String appVersion,
-			Collection<ModelledResource> byValueBundles, Collection<Content> inputs, PlatformRepository
platformRepository)
+			Collection<ModelledResource> byValueBundles, Collection<Content> inputs)
 			throws ResolverException {
      log.debug(LOG_ENTRY, "resolve", new Object[]{appName, appVersion,byValueBundles, inputs});
     Collection<ImportedBundle> importedBundles = toImportedBundle(inputs);
     Collection<ModelledResource> toReturn = new ArrayList<ModelledResource>();
     
-    Resolver obrResolver = getConfiguredObrResolver(appName, appVersion, byValueBundles,
platformRepository);
+    Resolver obrResolver = getConfiguredObrResolver(appName, appVersion, byValueBundles);
     // add a resource describing the requirements of the application metadata.
     obrResolver.add(createApplicationResource( appName, appVersion, importedBundles));
     
@@ -215,14 +208,7 @@ public class OBRAriesResolver implements
   }
 
   private Resolver getConfiguredObrResolver(String appName, String appVersion,
-	      Collection<ModelledResource> byValueBundles) throws ResolverException
-	      {
-	 
-	  return getConfiguredObrResolver(appName, appVersion, byValueBundles, platformRepository);
-	      }
-
-  private Resolver getConfiguredObrResolver(String appName, String appVersion,
-      Collection<ModelledResource> byValueBundles, PlatformRepository platformRepository)
throws ResolverException
+      Collection<ModelledResource> byValueBundles) throws ResolverException
   {
     log.debug(LOG_ENTRY, "getConfiguredObrResolver", new Object[]{appName, appVersion,byValueBundles
});
     DataModelHelper helper = repositoryAdmin.getHelper();
@@ -250,6 +236,7 @@ public class OBRAriesResolver implements
     for (Repository r : repos) {
       resolveRepos.add(r);      
     }     
+
     Resolver obrResolver = repositoryAdmin.resolver(resolveRepos.toArray(new Repository[resolveRepos.size()]));
     addPlatformRepositories (obrResolver, appName, platformRepository);
     log.debug(LOG_EXIT, "getConfiguredObrResolver", obrResolver);

Copied: aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ext/ModelledBundleResource.java
(from r1059279, aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ModelledBundleResource.java)
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ext/ModelledBundleResource.java?p2=aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ext/ModelledBundleResource.java&p1=aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ModelledBundleResource.java&r1=1059279&r2=1069932&rev=1069932&view=diff
==============================================================================
--- aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ModelledBundleResource.java
(original)
+++ aries/trunk/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ext/ModelledBundleResource.java
Fri Feb 11 19:51:34 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.aries.application.resolver.obr.impl;
+package org.apache.aries.application.resolver.obr.ext;
 
 import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
 import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;



Mime
View raw message