Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-09-06 14:29:18 +0000
committerThomas Watson2012-09-06 14:29:18 +0000
commit869e2ef794c4cabc62e3e931f3ef73493d2e21ab (patch)
tree87f1bc9e2f0b94398e4f32a8fb32abd21cf4ced0 /bundles/org.eclipse.osgi.tests/bundles_src
parent1d5e88b1dcfca7ff764ce0e9741b1e432b320617 (diff)
parentda9bd82cc99714d9877c6f77e81b2b7358b880e6 (diff)
downloadrt.equinox.framework-869e2ef794c4cabc62e3e931f3ef73493d2e21ab.tar.gz
rt.equinox.framework-869e2ef794c4cabc62e3e931f3ef73493d2e21ab.tar.xz
rt.equinox.framework-869e2ef794c4cabc62e3e931f3ef73493d2e21ab.zip
Merge branch 'master' into twatson/containerMerge
Conflicts: bundles/org.eclipse.osgi.tests/.classpath bundles/org.eclipse.osgi.tests/build.properties bundles/org.eclipse.osgi/META-INF/MANIFEST.MF bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/bundles_src')
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/console.test/META-INF/MANIFEST.MF9
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestActivator.java27
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestCommandProvider.java82
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/test/link/b/client/Activator.java58
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/SomeAPI.java24
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/params/AParam.java17
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/resource.txt1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/test/link/c/client/Activator.java47
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/META-INF/MANIFEST.MF11
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/Activator.java31
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service1/Service1.java15
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service2/Service2.java17
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service3/Service3.java17
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/META-INF/MANIFEST.MF11
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/test/link/d/Activator.java74
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/test/link/e/client/Activator.java47
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/META-INF/MANIFEST.MF11
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/Activator.java31
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service1/Service1.java15
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service2/Service2.java17
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service3/Service3.java17
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/META-INF/MANIFEST.MF6
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/test/link/postponed/PostPonedCondition.java40
27 files changed, 0 insertions, 654 deletions
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/console.test/META-INF/MANIFEST.MF
deleted file mode 100644
index e368061f0..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: console.test
-Bundle-SymbolicName: console.test
-Bundle-Version: 1.0.0
-Import-Package: org.eclipse.osgi.framework.console;version="1.1.0",
- org.osgi.framework;version="1.5.0"
-Bundle-Activator: test.ConsoleTestActivator
-
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestActivator.java b/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestActivator.java
deleted file mode 100644
index 79c22ace3..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestActivator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Lazar Kirchev, SAP AG - initial API and implementation
- *******************************************************************************/
-package test;
-
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.osgi.framework.*;
-
-public class ConsoleTestActivator implements BundleActivator {
- ServiceRegistration serviceRegistration;
-
- public void start(BundleContext context) throws Exception {
- serviceRegistration = context.registerService(CommandProvider.class.getName(), new ConsoleTestCommandProvider(), null);
- }
-
- public void stop(BundleContext context) throws Exception {
- serviceRegistration.unregister();
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestCommandProvider.java b/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestCommandProvider.java
deleted file mode 100644
index 4cf9d45e8..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/console.test/test/ConsoleTestCommandProvider.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Lazar Kirchev, SAP AG - initial API and implementation
- *******************************************************************************/
-package test;
-
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-
-public class ConsoleTestCommandProvider implements CommandProvider {
-
- public void _echo(CommandInterpreter intp) {
- intp.println(intp.nextArgument());
- }
-
- public void _cust_exec(CommandInterpreter intp) {
- String nextArg = intp.nextArgument();
- String innerCommand = null;
- if (nextArg != null) {
- intp.println("Customized execution of command " + nextArg);
- StringBuffer builder = new StringBuffer();
- while (nextArg != null) {
- builder.append(' ');
- builder.append(nextArg);
- nextArg = intp.nextArgument();
- }
- innerCommand = builder.toString().trim();
- intp.execute(innerCommand);
- }
- }
-
- public String getHelp() {
- return getHelp(null);
- }
-
- public Object _help(CommandInterpreter intp) {
- String commandName = intp.nextArgument();
- if (commandName == null) {
- return Boolean.FALSE;
- }
- String help = getHelp(commandName);
-
- if (help.length() > 0) {
- return help;
- }
-
- return Boolean.FALSE;
- }
-
- private String getHelp(String commandName) {
- boolean allCommands = commandName == null;
- StringBuffer help = new StringBuffer();
-
- if (allCommands) {
- help.append("---");
- help.append("Custom commands");
- help.append("---");
- help.append("\r\n");
- help.append("\t");
- }
- if (allCommands || "echo".equals(commandName)) {
- help.append("echo - echos input");
- help.append("\r\n");
- }
- if (allCommands) {
- help.append("\t");
- }
- if (allCommands || "cust_exec".equals(commandName)) {
- help.append("cust_exec - executes the command, passed as an argument");
- help.append("\r\n");
- }
-
- return help.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/META-INF/MANIFEST.MF
deleted file mode 100644
index 0b5d38f02..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.b.client
-Bundle-SymbolicName: test.link.b.client
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.b.client.Activator
-Import-Package: org.osgi.framework, test.link.b, test.link.b.params
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/test/link/b/client/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/test/link/b/client/Activator.java
deleted file mode 100644
index 4266b3f64..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b.client/test/link/b/client/Activator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.b.client;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URL;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import test.link.b.SomeAPI;
-import test.link.b.params.AParam;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- SomeAPI api = new SomeAPI();
- api.getBundleID(context.getBundle());
- api.getString(new AParam());
- // test class that does not exist
- try {
- getClass().getClassLoader().loadClass("test.link.b.DoesNotExist"); //$NON-NLS-1$
- throw new RuntimeException("Unexpected class load success"); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- // expected
- }
- // test resource
- URL resource = this.getClass().getResource("/test/link/b/resource.txt"); //$NON-NLS-1$
- if (resource == null)
- throw new RuntimeException("Did not find resource.txt"); //$NON-NLS-1$
- BufferedReader reader = new BufferedReader(new InputStreamReader(resource.openStream()));
- try {
- String content = reader.readLine();
- if (!"Test content".equals(content)) //$NON-NLS-1$
- throw new RuntimeException("Unexpected content in resource.txt: " + content); //$NON-NLS-1$
- } finally {
- reader.close();
- }
- // test resource that does not exist
- URL notExist = this.getClass().getResource("/test/link/b/DoesNotExist.txt"); //$NON-NLS-1$
- if (notExist != null)
- throw new RuntimeException("Should not have found resource: " + notExist.getPath()); //$NON-NLS-1$
-
- }
-
- public void stop(BundleContext context) throws Exception {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/META-INF/MANIFEST.MF
deleted file mode 100644
index 1329e3e72..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.b
-Bundle-SymbolicName: test.link.b
-Bundle-Version: 1.0.0
-Export-Package: test.link.b; attr1="value1"; uses:="org.osgi.framework, test.link.b.params",
- test.link.b.params; attr2="value2"
-Import-Package: org.osgi.framework
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/SomeAPI.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/SomeAPI.java
deleted file mode 100644
index 3b29bd066..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/SomeAPI.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.b;
-
-import org.osgi.framework.Bundle;
-import test.link.b.params.AParam;
-
-public class SomeAPI {
- public Long getBundleID(Bundle bundle) {
- return new Long(bundle.getBundleId());
- }
-
- public String getString(AParam arg0) {
- return arg0.toString();
- }
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/params/AParam.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/params/AParam.java
deleted file mode 100644
index 6d8710c5a..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/params/AParam.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.b.params;
-
-public class AParam {
- public String toString() {
- return "AParam"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/resource.txt b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/resource.txt
deleted file mode 100644
index 2eec599a1..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.b/test/link/b/resource.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test content
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/META-INF/MANIFEST.MF
deleted file mode 100644
index 90019f532..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.c.client
-Bundle-SymbolicName: test.link.c.client
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.c.client.Activator
-Import-Package: test.link.c.service1, test.link.c.service2, test.link.c.service3, org.osgi.framework
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/test/link/c/client/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/test/link/c/client/Activator.java
deleted file mode 100644
index 6ea746f00..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c.client/test/link/c/client/Activator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.c.client;
-
-import org.osgi.framework.*;
-import test.link.c.service1.Service1;
-import test.link.c.service2.Service2;
-import test.link.c.service3.Service3;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- Service1 service1 = (Service1) checkService(Service1.class.getName(), context);
- if (service1 == null)
- throw new Exception("missing Service1"); //$NON-NLS-1$
- Service2 service2 = (Service2) checkService(Service2.class.getName(), context);
- if (service2 == null)
- throw new Exception("missing Service2"); //$NON-NLS-1$
- Service3 service3 = (Service3) checkService(Service3.class.getName(), context);
- if (service3 == null)
- throw new Exception("missing Service3"); //$NON-NLS-1$
- }
-
- private Object checkService(String name, BundleContext context) throws BundleException {
- ServiceReference ref = context.getServiceReference(name);
- if (ref == null)
- throw new BundleException("Missing service " + name); //$NON-NLS-1$
- Object service = context.getService(ref);
- if (service != null)
- context.ungetService(ref);
- return service;
- }
-
- public void stop(BundleContext context) throws Exception {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/META-INF/MANIFEST.MF
deleted file mode 100644
index 4a15453af..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.c
-Bundle-SymbolicName: test.link.c
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.c.Activator
-Export-Package:
- test.link.c.service1; attr1="value1",
- test.link.c.service2; attr2="value2"; uses:="test.link.c.service1",
- test.link.c.service3; attr3="value3"; uses:="test.link.c.service2"
-Import-Package: org.osgi.framework
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/Activator.java
deleted file mode 100644
index ae6d199ae..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.c;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import test.link.c.service1.Service1;
-import test.link.c.service2.Service2;
-import test.link.c.service3.Service3;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- context.registerService(Service1.class.getName(), new Service1() {}, null);
- context.registerService(new String[] {Service1.class.getName(), Service2.class.getName()}, new Service2() {}, null);
- context.registerService(new String[] {Service1.class.getName(), Service2.class.getName(), Service3.class.getName()}, new Service3() {}, null);
- }
-
- public void stop(BundleContext context) throws Exception {
- // nothing
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service1/Service1.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service1/Service1.java
deleted file mode 100644
index 5286b6f47..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service1/Service1.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.c.service1;
-
-public interface Service1 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service2/Service2.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service2/Service2.java
deleted file mode 100644
index 5186e1e52..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service2/Service2.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.c.service2;
-
-import test.link.c.service1.Service1;
-
-public interface Service2 extends Service1 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service3/Service3.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service3/Service3.java
deleted file mode 100644
index 69c7bd03c..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.c/test/link/c/service3/Service3.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.c.service3;
-
-import test.link.c.service2.Service2;
-
-public interface Service3 extends Service2 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/META-INF/MANIFEST.MF
deleted file mode 100644
index 102d6aea2..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.d
-Bundle-SymbolicName: test.link.d
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.d.Activator
-Import-Package: org.osgi.framework,
- org.eclipse.osgi.tests.bundles,
- org.osgi.service.framework,
- org.osgi.framework.launch,
- org.osgi.util.tracker
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/test/link/d/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/test/link/d/Activator.java
deleted file mode 100644
index 09f75a213..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.d/test/link/d/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.d;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.osgi.tests.bundles.AbstractBundleTests;
-import org.eclipse.osgi.tests.bundles.BundleInstaller;
-import org.osgi.framework.*;
-import org.osgi.service.framework.CompositeBundle;
-import org.osgi.service.framework.CompositeBundleFactory;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- ServiceReference installerRef = context.getServiceReference(BundleInstaller.class.getName());
- if (installerRef == null)
- throw new Exception("Missing Service Permission"); //$NON-NLS-1$
- BundleInstaller installer = (BundleInstaller) context.getService(installerRef);
- if (installer == null)
- throw new Exception("Missing Service Permission"); //$NON-NLS-1$
- context.ungetService(installerRef);
-
- ServiceReference factoryRef = context.getServiceReference(CompositeBundleFactory.class.getName());
- if (factoryRef == null)
- throw new Exception("Missing Service Permission"); //$NON-NLS-1$
- CompositeBundleFactory factory = (CompositeBundleFactory) context.getService(factoryRef);
- if (factory == null)
- throw new Exception("Missing Service Permission"); //$NON-NLS-1$
-
- Map linkManifest = new HashMap();
- linkManifest.put(Constants.BUNDLE_SYMBOLICNAME, "childComposite"); //$NON-NLS-1$
- linkManifest.put(Constants.BUNDLE_VERSION, "1.0.0"); //$NON-NLS-1$
- linkManifest.put(Constants.IMPORT_PACKAGE, "org.eclipse.osgi.tests.bundles"); //$NON-NLS-1$
- linkManifest.put(CompositeBundleFactory.COMPOSITE_SERVICE_FILTER_IMPORT, "(objectClass=org.eclipse.osgi.tests.bundles.BundleInstaller)"); //$NON-NLS-1$
- CompositeBundle childComposite = null;
- try {
- childComposite = factory.installCompositeBundle(null, "childComposite", linkManifest); //$NON-NLS-1$
- } catch (SecurityException e) {
- throw new Exception("Missing AllPermissions"); //$NON-NLS-1$
- }
-
- Bundle test = childComposite.getCompositeFramework().getBundleContext().installBundle(installer.getBundleLocation("test")); //$NON-NLS-1$
- if (test == null)
- throw new Exception("Install of test bundle is null"); //$NON-NLS-1$
-
- childComposite.start();
-
- ServiceTracker trackInstaller = new ServiceTracker(childComposite.getBundleContext(), BundleInstaller.class.getName(), null);
- trackInstaller.open();
- BundleInstaller childInstaller = (BundleInstaller) trackInstaller.waitForService(5000);
- if (childInstaller != installer)
- throw new Exception("Unexpected childInstaller: " + childInstaller);
- test.start();
- Object[] expectedEvents = new Object[1];
- expectedEvents[0] = new BundleEvent(BundleEvent.STARTED, test);
- AbstractBundleTests.compareResults(expectedEvents, AbstractBundleTests.simpleResults.getResults(1));
- }
-
- public void stop(BundleContext context) throws Exception {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/META-INF/MANIFEST.MF
deleted file mode 100644
index 1de76b3b9..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.e.client
-Bundle-SymbolicName: test.link.e.client
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.e.client.Activator
-Import-Package: test.link.e.service1, test.link.e.service2, test.link.e.service3, org.osgi.framework
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/test/link/e/client/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/test/link/e/client/Activator.java
deleted file mode 100644
index 8388603cf..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e.client/test/link/e/client/Activator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.e.client;
-
-import org.osgi.framework.*;
-import test.link.e.service1.Service1;
-import test.link.e.service2.Service2;
-import test.link.e.service3.Service3;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- Service1 service1 = (Service1) checkService(Service1.class.getName(), context);
- if (service1 == null)
- throw new Exception("missing Service1"); //$NON-NLS-1$
- Service2 service2 = (Service2) checkService(Service2.class.getName(), context);
- if (service2 == null)
- throw new Exception("missing Service2"); //$NON-NLS-1$
- Service3 service3 = (Service3) checkService(Service3.class.getName(), context);
- if (service3 == null)
- throw new Exception("missing Service3"); //$NON-NLS-1$
- }
-
- private Object checkService(String name, BundleContext context) throws BundleException {
- ServiceReference ref = context.getServiceReference(name);
- if (ref == null)
- throw new BundleException("Missing service " + name); //$NON-NLS-1$
- Object service = context.getService(ref);
- if (service != null)
- context.ungetService(ref);
- return service;
- }
-
- public void stop(BundleContext context) throws Exception {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/META-INF/MANIFEST.MF
deleted file mode 100644
index 2370deb15..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.e
-Bundle-SymbolicName: test.link.e
-Bundle-Version: 1.0.0
-Bundle-Activator: test.link.e.Activator
-Export-Package:
- test.link.e.service1; attr1="value1",
- test.link.e.service2; attr2="value2"; uses:="test.link.e.service1",
- test.link.e.service3; attr3="value3"; uses:="test.link.e.service2"
-Import-Package: org.osgi.framework
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/Activator.java
deleted file mode 100644
index b0c5aa000..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.e;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import test.link.e.service1.Service1;
-import test.link.e.service2.Service2;
-import test.link.e.service3.Service3;
-
-public class Activator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- context.registerService(Service1.class.getName(), new Service1() {}, null);
- context.registerService(new String[] {Service1.class.getName(), Service2.class.getName()}, new Service2() {}, null);
- context.registerService(new String[] {Service1.class.getName(), Service2.class.getName(), Service3.class.getName()}, new Service3() {}, null);
- }
-
- public void stop(BundleContext context) throws Exception {
- // nothing
- }
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service1/Service1.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service1/Service1.java
deleted file mode 100644
index 232152f82..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service1/Service1.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.e.service1;
-
-public interface Service1 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service2/Service2.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service2/Service2.java
deleted file mode 100644
index 39b95985f..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service2/Service2.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.e.service2;
-
-import test.link.e.service1.Service1;
-
-public interface Service2 extends Service1 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service3/Service3.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service3/Service3.java
deleted file mode 100644
index 525bcd235..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.e/test/link/e/service3/Service3.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.e.service3;
-
-import test.link.e.service2.Service2;
-
-public interface Service3 extends Service2 {
-
-}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/META-INF/MANIFEST.MF
deleted file mode 100644
index cb31d5b6d..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: test.link.postponed
-Bundle-SymbolicName: test.link.postponed
-Bundle-Version: 1.0.0
-Fragment-Host: system.bundle
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/test/link/postponed/PostPonedCondition.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/test/link/postponed/PostPonedCondition.java
deleted file mode 100644
index db7e6820d..000000000
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.postponed/test/link/postponed/PostPonedCondition.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package test.link.postponed;
-
-import java.util.Dictionary;
-import org.osgi.framework.Bundle;
-import org.osgi.service.condpermadmin.Condition;
-import org.osgi.service.condpermadmin.ConditionInfo;
-
-public class PostPonedCondition implements Condition {
-
- static public Condition getCondition(final Bundle bundle, final ConditionInfo info) {
- return new PostPonedCondition();
- }
-
- public boolean isMutable() {
- return true;
- }
-
- public boolean isPostponed() {
- return true;
- }
-
- public boolean isSatisfied() {
- return true;
- }
-
- public boolean isSatisfied(Condition[] conditions, Dictionary context) {
- return true;
- }
-
-}

Back to the top