aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwr...@apache.org
Subject svn commit: r1163349 [2/2] - in /aries/trunk/subsystem: subsystem-api/src/main/java/org/osgi/service/repository/ subsystem-api/src/main/java/org/osgi/service/resolver/ subsystem-api/src/main/java/org/osgi/service/subsystem/ subsystem-core/src/main/java...
Date Tue, 30 Aug 2011 19:36:36 GMT
Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixRequirementAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixRequirementAdapter.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixRequirementAdapter.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixRequirementAdapter.java
Tue Aug 30 19:36:35 2011
@@ -18,10 +18,10 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.osgi.framework.Constants;
+import org.osgi.framework.resource.Capability;
+import org.osgi.framework.resource.Requirement;
+import org.osgi.framework.resource.Resource;
 import org.osgi.framework.wiring.BundleRevision;
-import org.osgi.framework.wiring.Capability;
-import org.osgi.framework.wiring.Requirement;
-import org.osgi.framework.wiring.Resource;
 
 public class FelixRequirementAdapter implements Requirement {
 	private final org.apache.felix.bundlerepository.Requirement requirement;

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java
Tue Aug 30 19:36:35 2011
@@ -19,12 +19,12 @@ import java.util.List;
 import org.apache.aries.subsystem.core.ResourceHelper;
 import org.apache.aries.subsystem.core.internal.OsgiContentCapability;
 import org.apache.aries.subsystem.core.internal.OsgiIdentityCapability;
-import org.osgi.framework.wiring.Capability;
-import org.osgi.framework.wiring.Requirement;
-import org.osgi.framework.wiring.Resource;
-import org.osgi.framework.wiring.ResourceConstants;
+import org.osgi.framework.resource.Capability;
+import org.osgi.framework.resource.Requirement;
+import org.osgi.framework.resource.Resource;
+import org.osgi.framework.resource.ResourceConstants;
 
-public class FelixResourceAdapter implements org.osgi.framework.wiring.Resource {
+public class FelixResourceAdapter implements Resource {
 	private final org.apache.felix.bundlerepository.Resource resource;
 	
 	public FelixResourceAdapter(final org.apache.felix.bundlerepository.Resource resource) {

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiCapabilityAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiCapabilityAdapter.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiCapabilityAdapter.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiCapabilityAdapter.java
Tue Aug 30 19:36:35 2011
@@ -22,9 +22,9 @@ import org.apache.felix.bundlerepository
 import org.osgi.framework.wiring.BundleRevision;
 
 public class OsgiCapabilityAdapter implements Capability {
-	private final org.osgi.framework.wiring.Capability capability;
+	private final org.osgi.framework.resource.Capability capability;
 	
-	public OsgiCapabilityAdapter(org.osgi.framework.wiring.Capability capability) {
+	public OsgiCapabilityAdapter(org.osgi.framework.resource.Capability capability) {
 		if (capability == null)
 			throw new NullPointerException("Missing required parameter: capability");
 		this.capability = capability;

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiRequirementAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiRequirementAdapter.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiRequirementAdapter.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiRequirementAdapter.java
Tue Aug 30 19:36:35 2011
@@ -19,9 +19,9 @@ import org.osgi.framework.Constants;
 import org.osgi.framework.wiring.BundleRevision;
 
 public class OsgiRequirementAdapter implements Requirement {
-	private final org.osgi.framework.wiring.Requirement requirement;
+	private final org.osgi.framework.resource.Requirement requirement;
 	
-	public OsgiRequirementAdapter(org.osgi.framework.wiring.Requirement requirement) {
+	public OsgiRequirementAdapter(org.osgi.framework.resource.Requirement requirement) {
 		if (requirement == null)
 			throw new NullPointerException("Missing required parameter: requirement");
 		this.requirement = requirement;

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiResourceAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiResourceAdapter.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiResourceAdapter.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/OsgiResourceAdapter.java
Tue Aug 30 19:36:35 2011
@@ -26,18 +26,18 @@ import org.osgi.framework.Version;
 
 // TODO Need to distinguish between resources that have already been deployed (local) and
those that have not.
 public class OsgiResourceAdapter implements Resource {
-	private final org.osgi.framework.wiring.Resource resource;
+	private final org.osgi.framework.resource.Resource resource;
 	
-	public OsgiResourceAdapter(org.osgi.framework.wiring.Resource resource) {
+	public OsgiResourceAdapter(org.osgi.framework.resource.Resource resource) {
 		if (resource == null)
 			throw new NullPointerException("Missing required parameter: resource");
 		this.resource = resource;
 	}
 
 	public Capability[] getCapabilities() {
-		Collection<org.osgi.framework.wiring.Capability> capabilities = resource.getCapabilities(null);
+		Collection<org.osgi.framework.resource.Capability> capabilities = resource.getCapabilities(null);
 		Collection<Capability> result = new ArrayList<Capability>(capabilities.size());
-		for (org.osgi.framework.wiring.Capability capability : capabilities)
+		for (org.osgi.framework.resource.Capability capability : capabilities)
 			result.add(new OsgiCapabilityAdapter(capability));
 		return result.toArray(new Capability[result.size()]);
 	}
@@ -61,9 +61,9 @@ public class OsgiResourceAdapter impleme
 	}
 
 	public Requirement[] getRequirements() {
-		Collection<org.osgi.framework.wiring.Requirement> requirements = resource.getRequirements(null);
+		Collection<org.osgi.framework.resource.Requirement> requirements = resource.getRequirements(null);
 		Collection<Requirement> result = new ArrayList<Requirement>(requirements.size());
-		for (org.osgi.framework.wiring.Requirement requirement : requirements)
+		for (org.osgi.framework.resource.Requirement requirement : requirements)
 			result.add(new OsgiRequirementAdapter(requirement));
 		return result.toArray(new Requirement[result.size()]);
 	}

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/RepositoryAdminRepository.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/RepositoryAdminRepository.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/RepositoryAdminRepository.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/RepositoryAdminRepository.java
Tue Aug 30 19:36:35 2011
@@ -18,9 +18,9 @@ import java.util.ArrayList;
 import java.util.Collection;
 
 import org.apache.felix.bundlerepository.RepositoryAdmin;
-import org.osgi.framework.wiring.Capability;
-import org.osgi.framework.wiring.Requirement;
-import org.osgi.framework.wiring.Resource;
+import org.osgi.framework.resource.Capability;
+import org.osgi.framework.resource.Requirement;
+import org.osgi.framework.resource.Resource;
 import org.osgi.service.repository.Repository;
 
 public class RepositoryAdminRepository implements Repository {

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java
Tue Aug 30 19:36:35 2011
@@ -25,9 +25,9 @@ import org.apache.aries.subsystem.core.a
 import org.apache.aries.subsystem.core.archive.ExportPackageHeader;
 import org.apache.aries.subsystem.core.archive.ImportPackageHeader;
 import org.apache.aries.subsystem.core.internal.OsgiIdentityCapability;
-import org.osgi.framework.wiring.Capability;
-import org.osgi.framework.wiring.Requirement;
-import org.osgi.framework.wiring.Resource;
+import org.osgi.framework.resource.Capability;
+import org.osgi.framework.resource.Requirement;
+import org.osgi.framework.resource.Resource;
 
 public class BundleResource implements Resource {
 	public static BundleResource newInstance(URL content) throws IOException {

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/ResourceFactory.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/ResourceFactory.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/ResourceFactory.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/ResourceFactory.java
Tue Aug 30 19:36:35 2011
@@ -18,7 +18,7 @@ import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
 
-import org.osgi.framework.wiring.Resource;
+import org.osgi.framework.resource.Resource;
 import org.osgi.service.subsystem.SubsystemException;
 
 public class ResourceFactory {

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemResource.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemResource.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemResource.java
Tue Aug 30 19:36:35 2011
@@ -27,9 +27,9 @@ import org.apache.aries.util.filesystem.
 import org.apache.aries.util.filesystem.IDirectory;
 import org.apache.aries.util.filesystem.IFile;
 import org.osgi.framework.Version;
-import org.osgi.framework.wiring.Capability;
-import org.osgi.framework.wiring.Requirement;
-import org.osgi.framework.wiring.Resource;
+import org.osgi.framework.resource.Capability;
+import org.osgi.framework.resource.Requirement;
+import org.osgi.framework.resource.Resource;
 
 public class SubsystemResource implements Resource {
 	public static SubsystemResource newInstance(File file) throws IOException, URISyntaxException
{

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/FeatureTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/FeatureTest.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/FeatureTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/FeatureTest.java
Tue Aug 30 19:36:35 2011
@@ -78,21 +78,21 @@ public class FeatureTest extends Subsyst
 			assertVersion("1.0.0", subsystem);
 			assertConstituents(4, subsystem);
 			assertChildren(1, subsystem);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.INSTALLING, SubsystemConstants.EventType.INSTALLING,
5000);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.INSTALLED, SubsystemConstants.EventType.INSTALLED,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.INSTALLING, SubsystemConstants.EVENT_TYPE.INSTALLING,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.INSTALLED, SubsystemConstants.EVENT_TYPE.INSTALLED,
5000);
 			assertSymbolicName("org.apache.aries.subsystem.feature2", subsystem.getChildren().iterator().next());
 			assertVersion("1.0.0", subsystem.getChildren().iterator().next());
 			assertConstituents(1, subsystem.getChildren().iterator().next());
 			// TODO Test internal events for installation.
 			startSubsystem(subsystem);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVING, SubsystemConstants.EventType.RESOLVING,
5000);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVED, SubsystemConstants.EventType.RESOLVED,
5000);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.STARTING, SubsystemConstants.EventType.STARTING,
5000);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.ACTIVE, SubsystemConstants.EventType.STARTED,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVING, SubsystemConstants.EVENT_TYPE.RESOLVING,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.RESOLVED,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.STARTING, SubsystemConstants.EVENT_TYPE.STARTING,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.ACTIVE, SubsystemConstants.EVENT_TYPE.STARTED,
5000);
 			// TODO Test internal events for starting.
 			stopSubsystem(subsystem);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.STOPPING, SubsystemConstants.EventType.STOPPING,
5000);
-			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVED, SubsystemConstants.EventType.STOPPED,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.STOPPING, SubsystemConstants.EVENT_TYPE.STOPPING,
5000);
+			assertEvent(subsystem.getChildren().iterator().next(), Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.STOPPED,
5000);
 			// TODO Test internal events for stopping.
 		}
 		catch (AssertionError e) {
@@ -103,8 +103,8 @@ public class FeatureTest extends Subsyst
 			try {
 				Subsystem child = subsystem.getChildren().iterator().next();
 				uninstallSubsystem(subsystem);
-				assertEvent(child, Subsystem.State.UNINSTALLING, SubsystemConstants.EventType.UNINSTALLING,
5000);
-				assertEvent(child, Subsystem.State.UNINSTALLED, SubsystemConstants.EventType.UNINSTALLED,
5000);
+				assertEvent(child, Subsystem.State.UNINSTALLING, SubsystemConstants.EVENT_TYPE.UNINSTALLING,
5000);
+				assertEvent(child, Subsystem.State.UNINSTALLED, SubsystemConstants.EVENT_TYPE.UNINSTALLED,
5000);
 				// TODO Test internal events for uninstalling.
 				assertNotChild(subsystem, child);
 			}

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/InstallTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/InstallTest.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/InstallTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/InstallTest.java
Tue Aug 30 19:36:35 2011
@@ -19,7 +19,6 @@
 package org.apache.aries.subsystem.itests;
 
 import static org.junit.Assert.assertSame;
-import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -33,7 +32,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.service.subsystem.Subsystem;
-import org.osgi.service.subsystem.SubsystemException;
 
 @RunWith(JUnit4TestRunner.class)
 public class InstallTest extends SubsystemTest {
@@ -67,7 +65,8 @@ public class InstallTest extends Subsyst
 		if (createdApplications) {
 			return;
 		}
-		createApplication("feature1", new String[]{"tb1.jar"});
+		createApplication("feature2", new String[]{"tb2.jar"});
+		createApplication("feature1", new String[]{"tb1.jar", "feature2.ssa"});
 		createdApplications = true;
 	}
 

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
Tue Aug 30 19:36:35 2011
@@ -50,7 +50,7 @@ import org.osgi.service.repository.Repos
 import org.osgi.service.subsystem.Subsystem;
 import org.osgi.service.subsystem.Subsystem.State;
 import org.osgi.service.subsystem.SubsystemConstants;
-import org.osgi.service.subsystem.SubsystemConstants.EventType;
+import org.osgi.service.subsystem.SubsystemConstants.EVENT_TYPE;;
 
 public abstract class SubsystemTest extends IntegrationTest {
 	protected static class SubsystemTestEventHandler implements EventHandler {
@@ -63,7 +63,7 @@ public abstract class SubsystemTest exte
 		}
 		
 		public void handleEvent(Event event) {
-			Long subsystemId = (Long)event.getProperty(SubsystemConstants.SUBSYSTEM_ID);
+			Long subsystemId = (Long)event.getProperty(SubsystemConstants.EVENT_SUBSYSTEM_ID);
 			synchronized (subsystemIdToEvents) {
 				List <Event> events = subsystemIdToEvents.get(subsystemId);
 				if (events == null) {
@@ -203,24 +203,24 @@ public abstract class SubsystemTest exte
  		assertFalse("Subsystem data file exists", file.exists());
  	}
  	
- 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EventType
type) throws InterruptedException {
+ 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EVENT_TYPE
type) throws InterruptedException {
  		assertEvent(subsystem, state, type, 0);
  	}
  	
- 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EventType
type, long timeout) throws InterruptedException {
+ 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EVENT_TYPE
type, long timeout) throws InterruptedException {
  		assertEvent(subsystem, state, type, subsystemEvents.poll(subsystem.getSubsystemId(), timeout));
  	}
  	
- 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EventType
type, Event event) {
+ 	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EVENT_TYPE
type, Event event) {
 		assertEvent(subsystem, state, type, event, null);
 	}
 	
-	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EventType
type, Event event, Throwable throwable) {
+	protected void assertEvent(Subsystem subsystem, Subsystem.State state, SubsystemConstants.EVENT_TYPE
type, Event event, Throwable throwable) {
 		assertNotNull("The event was null", event);
 		assertTrue("Wrong topic: " + event.getTopic(), event.getTopic().endsWith(type.name()));
-		assertEquals("Wrong ID", subsystem.getSubsystemId(), event.getProperty(SubsystemConstants.SUBSYSTEM_ID));
-		assertEquals("Wrong location", subsystem.getLocation(), event.getProperty(SubsystemConstants.SUBSYSTEM_LOCATION));
-		if (!EventType.INSTALLING.equals(type)) {
+		assertEquals("Wrong ID", subsystem.getSubsystemId(), event.getProperty(SubsystemConstants.EVENT_SUBSYSTEM_ID));
+		assertEquals("Wrong location", subsystem.getLocation(), event.getProperty(SubsystemConstants.EVENT_SUBSYSTEM_LOCATION));
+		if (!EVENT_TYPE.INSTALLING.equals(type)) {
 			assertEquals("Wrong symbolic name", subsystem.getSymbolicName(), event.getProperty(SubsystemConstants.SUBSYSTEM_SYMBOLICNAME));
 			assertEquals("Wrong version", String.valueOf(subsystem.getVersion()), event.getProperty(SubsystemConstants.SUBSYSTEM_VERSION));
 		}
@@ -284,24 +284,24 @@ public abstract class SubsystemTest exte
         Subsystem subsystem = rootSubsystem.install(file.toURI().toURL().toExternalForm());
         assertNotNull("The subsystem was null", subsystem);
         assertState(EnumSet.of(State.INSTALLING, State.INSTALLED), subsystem.getState());
-		assertEvent(subsystem, Subsystem.State.INSTALLING, SubsystemConstants.EventType.INSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.INSTALLED, SubsystemConstants.EventType.INSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.INSTALLING, SubsystemConstants.EVENT_TYPE.INSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.INSTALLED, SubsystemConstants.EVENT_TYPE.INSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		assertChild(rootSubsystem, subsystem);
         subsystem.start();
         assertState(EnumSet.of(State.RESOLVING, State.RESOLVED, State.STARTING, State.ACTIVE),
subsystem.getState());
-		assertEvent(subsystem, Subsystem.State.RESOLVING, SubsystemConstants.EventType.RESOLVING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EventType.RESOLVED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.STARTING, SubsystemConstants.EventType.STARTING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.ACTIVE, SubsystemConstants.EventType.STARTED, subsystemEvents.poll(subsystem.getSubsystemId(),
5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVING, SubsystemConstants.EVENT_TYPE.RESOLVING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.RESOLVED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.STARTING, SubsystemConstants.EVENT_TYPE.STARTING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.ACTIVE, SubsystemConstants.EVENT_TYPE.STARTED, subsystemEvents.poll(subsystem.getSubsystemId(),
5000));
 		subsystem.stop();
 		assertState(EnumSet.of(State.STOPPING, State.RESOLVED), subsystem.getState());
-		assertEvent(subsystem, Subsystem.State.STOPPING, SubsystemConstants.EventType.STOPPING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EventType.STOPPED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.STOPPING, SubsystemConstants.EVENT_TYPE.STOPPING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.STOPPED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		// TODO Add update.
 		subsystem.uninstall();
 		assertState(EnumSet.of(State.UNINSTALLING, State.UNINSTALLED), subsystem.getState());
-		assertEvent(subsystem, Subsystem.State.UNINSTALLING, SubsystemConstants.EventType.UNINSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.UNINSTALLED, SubsystemConstants.EventType.UNINSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.UNINSTALLING, SubsystemConstants.EVENT_TYPE.UNINSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.UNINSTALLED, SubsystemConstants.EVENT_TYPE.UNINSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		assertNotChild(rootSubsystem, subsystem);
 		return subsystem;
 	}
@@ -358,8 +358,8 @@ public abstract class SubsystemTest exte
 		subsystemEvents.clear();
 		Subsystem subsystem = rootSubsystem.install(location, content);
 		assertSubsystemNotNull(subsystem);
-		assertEvent(subsystem, Subsystem.State.INSTALLING, SubsystemConstants.EventType.INSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.INSTALLED, SubsystemConstants.EventType.INSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.INSTALLING, SubsystemConstants.EVENT_TYPE.INSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.INSTALLED, SubsystemConstants.EVENT_TYPE.INSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		assertChild(parent, subsystem);
 		assertLocation(location, subsystem);
 		assertParent(parent, subsystem);
@@ -376,10 +376,10 @@ public abstract class SubsystemTest exte
 		subsystemEvents.clear();
 		subsystem.start();
 		assertState(EnumSet.of(State.RESOLVING, State.RESOLVED, State.STARTING, State.ACTIVE),
subsystem);
-		assertEvent(subsystem, Subsystem.State.RESOLVING, SubsystemConstants.EventType.RESOLVING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EventType.RESOLVED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.STARTING, SubsystemConstants.EventType.STARTING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.ACTIVE, SubsystemConstants.EventType.STARTED, subsystemEvents.poll(subsystem.getSubsystemId(),
5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVING, SubsystemConstants.EVENT_TYPE.RESOLVING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.RESOLVED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.STARTING, SubsystemConstants.EVENT_TYPE.STARTING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.ACTIVE, SubsystemConstants.EVENT_TYPE.STARTED, subsystemEvents.poll(subsystem.getSubsystemId(),
5000));
 		assertState(State.ACTIVE, subsystem);
 	}
 	
@@ -388,8 +388,8 @@ public abstract class SubsystemTest exte
 		subsystemEvents.clear();
 		subsystem.stop();
 		assertState(EnumSet.of(State.STOPPING, State.RESOLVED), subsystem);
-		assertEvent(subsystem, Subsystem.State.STOPPING, SubsystemConstants.EventType.STOPPING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EventType.STOPPED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.STOPPING, SubsystemConstants.EVENT_TYPE.STOPPING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.RESOLVED, SubsystemConstants.EVENT_TYPE.STOPPED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		assertState(State.RESOLVED, subsystem);
 	}
 	
@@ -399,8 +399,8 @@ public abstract class SubsystemTest exte
 		Subsystem parent = subsystem.getParent();
 		subsystem.uninstall();
 		assertState(EnumSet.of(State.UNINSTALLED, State.UNINSTALLING), subsystem);
-		assertEvent(subsystem, Subsystem.State.UNINSTALLING, SubsystemConstants.EventType.UNINSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
-		assertEvent(subsystem, Subsystem.State.UNINSTALLED, SubsystemConstants.EventType.UNINSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.UNINSTALLING, SubsystemConstants.EVENT_TYPE.UNINSTALLING,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
+		assertEvent(subsystem, Subsystem.State.UNINSTALLED, SubsystemConstants.EVENT_TYPE.UNINSTALLED,
subsystemEvents.poll(subsystem.getSubsystemId(), 5000));
 		assertState(State.UNINSTALLED, subsystem);
 		assertConstituents(0, subsystem);
 		assertNotChild(parent, subsystem);

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryDescriptorGenerator.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryDescriptorGenerator.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryDescriptorGenerator.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryDescriptorGenerator.java
Tue Aug 30 19:36:35 2011
@@ -32,7 +32,7 @@ import org.apache.aries.util.manifest.Ma
 import org.apache.felix.bundlerepository.Resource;
 import org.osgi.framework.Constants;
 import org.osgi.framework.wiring.BundleRevision;
-import org.osgi.framework.wiring.Requirement;
+import org.osgi.framework.resource.Requirement;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -75,12 +75,12 @@ public final class RepositoryDescriptorG
     return doc;
   }
   
-  public static Document generateRepositoryDescriptor(String name, Collection<org.osgi.framework.wiring.Resource>
resources) throws ParserConfigurationException {
+  public static Document generateRepositoryDescriptor(String name, Collection<org.osgi.framework.resource.Resource>
resources) throws ParserConfigurationException {
 	  Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
 	  Element rootElement = document.createElement("repository");
 	  rootElement.setAttribute("name", name);
 	  document.appendChild(rootElement);
-	  for (org.osgi.framework.wiring.Resource resource : resources) {
+	  for (org.osgi.framework.resource.Resource resource : resources) {
 		  Element element = document.createElement("resource");
 		  String version = String.valueOf(ResourceHelper.getVersionAttribute(resource));
 	      element.setAttribute(Resource.VERSION, version);
@@ -95,7 +95,7 @@ public final class RepositoryDescriptorG
 	  return document;
   }
   
-  private static void addRequirements(Document document, Element rootElement, org.osgi.framework.wiring.Resource
resource) {
+  private static void addRequirements(Document document, Element rootElement, org.osgi.framework.resource.Resource
resource) {
 	  for (Requirement requirement : resource.getRequirements(null))
 		  addRequirement(document, rootElement, requirement);
   }

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java?rev=1163349&r1=1163348&r2=1163349&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
Tue Aug 30 19:36:35 2011
@@ -43,7 +43,7 @@ import org.apache.felix.bundlerepository
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.Version;
-import org.osgi.framework.wiring.Resource;
+import org.osgi.framework.resource.Resource;
 import org.osgi.service.subsystem.SubsystemConstants;
 import org.osgi.service.subsystem.SubsystemException;
 import org.slf4j.Logger;
@@ -192,7 +192,7 @@ public class RepositoryGenerator {
         Map props = res.getProperties();
         
 
-        Object type = props.get(SubsystemConstants.RESOURCE_TYPE_ATTRIBUTE);
+        Object type = props.get(SubsystemConstants.IDENTITY_TYPE_ATTRIBUTE);
 
         return new FelixResourceAdapter(res);
     }
@@ -232,7 +232,7 @@ public class RepositoryGenerator {
         Map props = resource.getProperties();
         
 
-        Object type = props.get(SubsystemConstants.RESOURCE_TYPE_ATTRIBUTE);
+        Object type = props.get(SubsystemConstants.IDENTITY_TYPE_ATTRIBUTE);
 
         return new FelixResourceAdapter(resource);
     }
@@ -295,7 +295,7 @@ public class RepositoryGenerator {
     	return new org.apache.felix.bundlerepository.Resource() {
 			public Capability[] getCapabilities() {
 				Collection<Capability> result = new ArrayList<Capability>(resource.getCapabilities(null).size());
-				for (org.osgi.framework.wiring.Capability capability : resource.getCapabilities(null))
{
+				for (org.osgi.framework.resource.Capability capability : resource.getCapabilities(null))
{
 					result.add(new Capability() {
 						public String getName() {
 							// TODO Auto-generated method stub



Mime
View raw message