Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-03-04 01:00:39 +0000
committerSusan Franklin2010-03-04 01:00:39 +0000
commitb0a21385ce06e9b8f1cc8b2061b74751faf80590 (patch)
tree73ea01576fbeeccc043736dfbb1c8f3720c5a753 /bundles/org.eclipse.equinox.p2.tests/src/org
parentc3b24cfd425d2f8933a5a2f8d9fe4ff10b43bfc8 (diff)
downloadrt.equinox.p2-b0a21385ce06e9b8f1cc8b2061b74751faf80590.tar.gz
rt.equinox.p2-b0a21385ce06e9b8f1cc8b2061b74751faf80590.tar.xz
rt.equinox.p2-b0a21385ce06e9b8f1cc8b2061b74751faf80590.zip
Bug 295399 - [ui] [api] IServiceUI API cleanup
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AuthTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/HttpStatusTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/TimeoutTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/TimeoutTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java10
8 files changed, 25 insertions, 25 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
index 466da3497..09fe4380c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
@@ -17,14 +17,14 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.core.ProvisioningAgent;
import org.eclipse.equinox.internal.p2.engine.EngineActivator;
import org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.tests.*;
/**
* Tests for {@link CertificateChecker}.
*/
public class CertificateCheckerTest extends AbstractProvisioningTest {
- class CertificateTestService implements IServiceUI {
+ class CertificateTestService extends UIServices {
public boolean unsignedReturnValue = true;
public boolean wasPrompted = false;
@@ -51,7 +51,7 @@ public class CertificateCheckerTest extends AbstractProvisioningTest {
protected void setUp() throws Exception {
serviceUI = new CertificateTestService();
testAgent = new ProvisioningAgent();
- testAgent.registerService(IServiceUI.SERVICE_NAME, serviceUI);
+ testAgent.registerService(UIServices.SERVICE_NAME, serviceUI);
testAgent.setBundleContext(TestActivator.getContext());
checker = new CertificateChecker(testAgent);
try {
@@ -146,7 +146,7 @@ public class CertificateCheckerTest extends AbstractProvisioningTest {
public void testBug291049() {
try {
// Intentionally replace our service with a null service
- testAgent.registerService(IServiceUI.SERVICE_NAME, null);
+ testAgent.registerService(UIServices.SERVICE_NAME, null);
checker.add(unsigned);
// TODO need to add some untrusted files here, too. To prove that we treated them as trusted temporarily
System.getProperties().setProperty(EngineActivator.PROP_UNSIGNED_POLICY, EngineActivator.UNSIGNED_PROMPT);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
index 3eaff84b3..11304aa29 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AllServerTests.java
@@ -15,7 +15,7 @@ import java.net.ServerSocket;
import java.security.cert.Certificate;
import java.util.Hashtable;
import junit.framework.*;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
@@ -30,7 +30,7 @@ public class AllServerTests extends TestCase {
private static final String BUNDLE_EQUINOX_HTTP = "org.eclipse.equinox.http";
public static final String PROP_TESTSERVER_PORT = "org.osgi.service.http.port";
- static IServiceUI hookedAuthDialog;
+ static UIServices hookedAuthDialog;
private static ServiceRegistration certificateUIRegistration;
private static int setUpCounter = 0;
private static ServiceReference packageAdminRef;
@@ -123,7 +123,7 @@ public class AllServerTests extends TestCase {
Hashtable properties = new Hashtable(1);
properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
- certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new DelegatingAuthService(), properties);
+ certificateUIRegistration = context.registerService(UIServices.class.getName(), new DelegatingAuthService(), properties);
setUpCounter = 1;
}
@@ -163,11 +163,11 @@ public class AllServerTests extends TestCase {
return;
}
- static public void setServiceUI(IServiceUI hook) {
+ static public void setServiceUI(UIServices hook) {
hookedAuthDialog = hook;
}
- public static class DelegatingAuthService implements IServiceUI {
+ public static class DelegatingAuthService extends UIServices {
public AuthenticationInfo getUsernamePassword(String location) {
if (hookedAuthDialog != null)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AuthTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AuthTest.java
index ec10deed7..ae9ac798c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AuthTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/AuthTest.java
@@ -12,8 +12,8 @@ import java.net.URI;
import java.security.cert.Certificate;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.equinox.internal.p2.repository.RepositoryPreferences;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
public class AuthTest extends ServerBasedTestCase {
@@ -80,7 +80,7 @@ public class AuthTest extends ServerBasedTestCase {
}
- public class AladdinNotSavedService implements IServiceUI {
+ public class AladdinNotSavedService extends UIServices {
public int counter = 0;
public AuthenticationInfo getUsernamePassword(String location) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/HttpStatusTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/HttpStatusTest.java
index 2aa73a351..4225c559f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/HttpStatusTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/HttpStatusTest.java
@@ -15,8 +15,8 @@ import java.text.MessageFormat;
import java.text.ParseException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
/**
@@ -170,7 +170,7 @@ public class HttpStatusTest extends ServerBasedTestCase {
}
}
- public class AladdinNotSavedService implements IServiceUI {
+ public class AladdinNotSavedService extends UIServices {
public int counter = 0;
public AuthenticationInfo getUsernamePassword(String location) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/TimeoutTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/TimeoutTest.java
index f8b3e3354..bd44d39a2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/TimeoutTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/TimeoutTest.java
@@ -11,8 +11,8 @@ package org.eclipse.equinox.p2.tests.metadata.repository;
import java.net.URI;
import java.security.cert.Certificate;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
/**
@@ -155,7 +155,7 @@ public class TimeoutTest extends ServerBasedTestCase {
}
}
- public class AladdinNotSavedService implements IServiceUI {
+ public class AladdinNotSavedService extends UIServices {
public int counter = 0;
public AuthenticationInfo getUsernamePassword(String location) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/TimeoutTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/TimeoutTest.java
index dacbeb2af..c58334633 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/TimeoutTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/TimeoutTest.java
@@ -13,8 +13,8 @@ import java.net.URI;
import java.security.cert.Certificate;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.tests.metadata.repository.AllServerTests;
import org.eclipse.equinox.p2.tests.testserver.helper.AbstractTestServerClientCase;
@@ -210,7 +210,7 @@ public class TimeoutTest extends AbstractTestServerClientCase {
}
}
- public class AladdinNotSavedService implements IServiceUI {
+ public class AladdinNotSavedService extends UIServices {
public int counter = 0;
public AuthenticationInfo getUsernamePassword(String location) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java
index 802d8cc34..6c3886fda 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java
@@ -13,8 +13,8 @@ package org.eclipse.equinox.p2.tests.testserver.helper;
import java.security.cert.Certificate;
import junit.framework.*;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.tests.TestActivator;
public class AbstractTestServerClientCase extends TestCase {
@@ -110,7 +110,7 @@ public class AbstractTestServerClientCase extends TestCase {
TestServerController.setServiceUI(null);
}
- public class AladdinNotSavedService implements IServiceUI {
+ public class AladdinNotSavedService extends UIServices {
public AuthenticationInfo getUsernamePassword(String location) {
return new AuthenticationInfo("Aladdin", "open sesame", false);
@@ -136,7 +136,7 @@ public class AbstractTestServerClientCase extends TestCase {
* @author henrik
*
*/
- public class BadLoginService implements IServiceUI {
+ public class BadLoginService extends UIServices {
public AuthenticationInfo getUsernamePassword(String location) {
return new AuthenticationInfo("moria", "friend", false);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
index 621716753..14b0ee33e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
@@ -14,7 +14,7 @@ import java.io.IOException;
import java.net.ServerSocket;
import java.security.cert.Certificate;
import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
+import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
@@ -31,7 +31,7 @@ public class TestServerController {
private static final String BUNDLE_EQUINOX_HTTP = "org.eclipse.equinox.http";
public static final String PROP_TESTSERVER_PORT = "org.osgi.service.http.port";
- static IServiceUI hookedAuthDialog;
+ static UIServices hookedAuthDialog;
private static ServiceRegistration certificateUIRegistration;
private static int setUpCounter = 0;
private static ServiceReference packageAdminRef;
@@ -95,7 +95,7 @@ public class TestServerController {
Hashtable properties = new Hashtable(1);
properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
- certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new DelegatingAuthService(), properties);
+ certificateUIRegistration = context.registerService(UIServices.class.getName(), new DelegatingAuthService(), properties);
setUpCounter = 1;
}
@@ -135,11 +135,11 @@ public class TestServerController {
return;
}
- static public void setServiceUI(IServiceUI hook) {
+ static public void setServiceUI(UIServices hook) {
hookedAuthDialog = hook;
}
- public static class DelegatingAuthService implements IServiceUI {
+ public static class DelegatingAuthService extends UIServices {
public AuthenticationInfo getUsernamePassword(String location) {
if (hookedAuthDialog != null)

Back to the top