aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwr...@apache.org
Subject svn commit: r1419804 - in /aries/trunk/subsystem: subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/
Date Mon, 10 Dec 2012 21:43:02 GMT
Author: jwross
Date: Mon Dec 10 21:43:01 2012
New Revision: 1419804

URL: http://svn.apache.org/viewvc?rev=1419804&view=rev
Log:
Add support for translating multiple cardinality information for requirements from the Application
Modeller API to
OSGi.

Modified:
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BundleResource.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/ServiceDependencyTest.java

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BundleResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BundleResource.java?rev=1419804&r1=1419803&r2=1419804&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BundleResource.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BundleResource.java
Mon Dec 10 21:43:01 2012
@@ -189,6 +189,9 @@ public class BundleResource implements R
 					.directive(
 							Namespace.REQUIREMENT_RESOLUTION_DIRECTIVE, 
 							service.isOptional() ? Namespace.RESOLUTION_OPTIONAL : Namespace.RESOLUTION_MANDATORY)
+					.directive(
+							Namespace.REQUIREMENT_CARDINALITY_DIRECTIVE, 
+							service.isMultiple() ? Namespace.CARDINALITY_MULTIPLE : Namespace.CARDINALITY_SINGLE)
 					.resource(this)
 					.build());
 		}

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java?rev=1419804&r1=1419803&r2=1419804&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
Mon Dec 10 21:43:01 2012
@@ -151,7 +151,7 @@ public class SubsystemResource implement
 		computeOsgiServiceCapabilities(capabilities);
 	}
 	
-	public void computeOsgiServiceCapabilities(List<Capability> capabilities) throws InvalidSyntaxException
{
+	private void computeOsgiServiceCapabilities(List<Capability> capabilities) throws
InvalidSyntaxException {
 		SubsystemExportServiceHeader header = getSubsystemManifest().getSubsystemExportServiceHeader();
 		if (header == null)
 			return;

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/ServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/ServiceDependencyTest.java?rev=1419804&r1=1419803&r2=1419804&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/ServiceDependencyTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/ServiceDependencyTest.java
Mon Dec 10 21:43:01 2012
@@ -277,7 +277,7 @@ public class ServiceDependencyTest exten
 			try {
 				Subsystem child = installSubsystemFromFile(parent, APPLICATION_A);
 				try {
-					assertSubsystemImportServiceHeader(child, "osgi.service;filter:=\"(&(objectClass=bundle.b))\";resolution:=mandatory");
+					assertSubsystemImportServiceHeader(child, "osgi.service;filter:=\"(&(objectClass=bundle.b))\";resolution:=mandatory;cardinality:=single");
 				}
 				finally {
 					uninstallSubsystemSilently(child);
@@ -314,7 +314,7 @@ public class ServiceDependencyTest exten
 		try {
 			Subsystem subsystem = installSubsystemFromFile(APPLICATION_B);
 			try {
-				assertSubsystemImportServiceHeader(subsystem, "osgi.service;filter:=\"(&(objectClass=bundle.a))\";resolution:=optional");
+				assertSubsystemImportServiceHeader(subsystem, "osgi.service;filter:=\"(&(objectClass=bundle.a))\";resolution:=optional;cardinality:=single");
 			}
 			finally {
 				uninstallSubsystemSilently(subsystem);



Mime
View raw message