From 8f161352bd401ff5d30c3c411e8d7aba9a980841 Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Fri, 11 May 2007 21:12:17 +0000
Subject: [PATCH] [186525][api] Move keystoreProviders extension point to
org.eclipse.rse.core
---
.../reference/extension-points/index.html | 4 +-
.../topics_Reference.xml | 4 +-
.../org.eclipse.rse.core/META-INF/MANIFEST.MF | 1 +
.../org.eclipse.rse.core/build.properties | 6 +-
.../icons/full/obj16/systemlinux_obj.gif | Bin
.../icons/full/obj16/systemlinuxlive_obj.gif | Bin
.../icons/full/obj16/systemlocal_obj.gif | Bin
.../icons/full/obj16/systemlocallive_obj.gif | Bin
.../icons/full/obj16/systemunix_obj.gif | Bin
.../icons/full/obj16/systemunixlive_obj.gif | Bin
.../icons/full/obj16/systemwin_obj.gif | Bin
.../icons/full/obj16/systemwinlive_obj.gif | Bin
.../org.eclipse.rse.core/plugin.properties | 20 ++++-
rse/plugins/org.eclipse.rse.core/plugin.xml | 80 ++++++++++++++----
.../schema/keystoreProviders.exsd | 7 +-
.../org/eclipse/rse/core/RSECorePlugin.java | 44 ++++++++++
.../core/comm/ISystemKeystoreProvider.java | 9 +-
.../comm/SystemKeystoreProviderManager.java | 4 +-
.../META-INF/MANIFEST.MF | 1 +
.../plugin.xml | 6 +-
.../org.eclipse.rse.ui/META-INF/MANIFEST.MF | 1 -
.../UI/org/eclipse/rse/ui/RSEUIPlugin.java | 40 +--------
.../org.eclipse.rse.ui/plugin.properties | 17 +---
rse/plugins/org.eclipse.rse.ui/plugin.xml | 52 +-----------
24 files changed, 151 insertions(+), 145 deletions(-)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemlinux_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemlinuxlive_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemlocal_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemlocallive_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemunix_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemunixlive_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemwin_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/icons/full/obj16/systemwinlive_obj.gif (100%)
rename rse/plugins/{org.eclipse.rse.ui => org.eclipse.rse.core}/schema/keystoreProviders.exsd (92%)
rename rse/plugins/{org.eclipse.rse.ui/systems => org.eclipse.rse.core/src}/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java (87%)
rename rse/plugins/{org.eclipse.rse.ui/systems => org.eclipse.rse.core/src}/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java (92%)
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
index 88fd27e5904..b799ac2052c 100755
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
+++ b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
@@ -11,16 +11,16 @@
The following extension points can be used to extend the capabilities of the
RSE infrastructure:
diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
index 2c00a3bae75..3e16c943d8f 100755
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
+++ b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
@@ -6,16 +6,16 @@
+
+
-
-
diff --git a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
index caf3c6c2f6b..3104b3e20c9 100644
--- a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
+++ b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.rse.services
Eclipse-LazyStart: true
Export-Package: org.eclipse.rse.core,
+ org.eclipse.rse.core.comm,
org.eclipse.rse.core.events,
org.eclipse.rse.core.filters,
org.eclipse.rse.core.model,
diff --git a/rse/plugins/org.eclipse.rse.core/build.properties b/rse/plugins/org.eclipse.rse.core/build.properties
index 96cd1dc3217..6d217bc3d1c 100644
--- a/rse/plugins/org.eclipse.rse.core/build.properties
+++ b/rse/plugins/org.eclipse.rse.core/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
+# Copyright (c) 2001, 2007 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
@@ -7,6 +7,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
###############################################################################
bin.includes = META-INF/,\
plugin.xml,\
@@ -16,7 +17,8 @@ bin.includes = META-INF/,\
.,\
about.ini,\
about.mappings,\
- eclipse32.png
+ eclipse32.png,\
+ icons/
source.. = src/
output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gif
rename to rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif
diff --git a/rse/plugins/org.eclipse.rse.core/plugin.properties b/rse/plugins/org.eclipse.rse.core/plugin.properties
index 0b4126905f5..b5eeaaa8da3 100644
--- a/rse/plugins/org.eclipse.rse.core/plugin.properties
+++ b/rse/plugins/org.eclipse.rse.core/plugin.properties
@@ -7,6 +7,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
###############################################################################
# NLS_MESSAGEFORMAT_NONE
@@ -15,6 +16,23 @@
pluginName = Remote System Explorer Core
providerName = Eclipse.org
-extPoint.systemTypes=RSE System Types
+extPoint.keystoreProviders = Keystore Providers
extPoint.persistenceProviders=RSE Persistence Providers
+extPoint.systemTypes=RSE System Types
extPoint.systemTypeProviders=RSE System Type Providers
+
+systemType.windows.label=Windows
+systemType.unix.label=Unix
+systemType.linux.label=Linux
+systemType.local.label=Local
+
+#systemType.iseries.description = iSeries native operating system (OS/400 or i5/OS)
+#systemType.iseries.PASE.description = PASE on iSeries
+#systemType.zseries.description = zSeries native operating system (z/OS)
+systemType.windows.description = Any version of Microsoft Windows
+systemType.unix.description = Any distribution of Unix
+#systemType.aix.description = IBM AIX operating system
+systemType.linux.description = Any distribution of Linux
+#systemType.powerlinux.description = Linux running on PowerPC hardware
+#systemType.zlinux.description = Linux running on zSeries hardware
+systemType.local.description = Local file system on this computer
diff --git a/rse/plugins/org.eclipse.rse.core/plugin.xml b/rse/plugins/org.eclipse.rse.core/plugin.xml
index 06743103c77..47ac35486b8 100644
--- a/rse/plugins/org.eclipse.rse.core/plugin.xml
+++ b/rse/plugins/org.eclipse.rse.core/plugin.xml
@@ -1,22 +1,17 @@
-
+
+
+
+
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd b/rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd
similarity index 92%
rename from rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd
rename to rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd
index 267a2ca806a..716513f8b33 100644
--- a/rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd
+++ b/rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd
@@ -3,7 +3,7 @@
-
+
This extension point is used to allow the delegation of client keystores to vendors where needed.
@@ -87,7 +87,7 @@
<p>
<pre>
- <extension point="org.eclipse.rse.ui.keystoreProviders">
+ <extension point="org.eclipse.rse.core.keystoreProviders">
<keystoreProvider
id="com.xyz.universal.security.UniversalKeystoreProvider"
name="Universal Keystore Provider"
@@ -123,13 +123,14 @@ in <samp>org.eclipse.rse.dstore.security.UniversalKeystoreProvider</sam
- Copyright (c) 2002, 2006 IBM Corporation. All Rights Reserved.
+ Copyright (c) 2002, 2007 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
+Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
index fb9720ae5f7..92e215ce7c4 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
@@ -13,19 +13,26 @@
* Contributors:
* David Dykstal (IBM) - added utility method for finding qualifiedHostNames
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
********************************************************************************/
package org.eclipse.rse.core;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
+import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
+import org.eclipse.rse.core.comm.SystemKeystoreProviderManager;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.internal.core.RSECoreRegistry;
import org.eclipse.rse.internal.persistence.RSEPersistenceManager;
import org.eclipse.rse.logging.Logger;
import org.eclipse.rse.logging.LoggerFactory;
import org.eclipse.rse.persistence.IRSEPersistenceManager;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@@ -137,6 +144,7 @@ public class RSECorePlugin extends Plugin {
public void start(BundleContext context) throws Exception {
super.start(context);
logger = LoggerFactory.getLogger(this);
+ registerKeystoreProviders();
}
/*
@@ -212,4 +220,40 @@ public class RSECorePlugin extends Plugin {
private void log(Throwable t) {
getLogger().logError("Unexpected Exception", t); //$NON-NLS-1$
}
+
+ protected void registerKeystoreProviders()
+ {
+ // Get reference to the plug-in registry
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+
+ // Get configured extenders
+ IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.core", "keystoreProviders"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ for (int i = 0; i < systemTypeExtensions.length; i++)
+ {
+ try
+ {
+ // get the name space of the declaring extension
+ String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespaceIdentifier();
+
+ String keystoreProviderType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
+
+ // use the name space to get the bundle
+ Bundle bundle = Platform.getBundle(nameSpace);
+
+ if (bundle.getState() != Bundle.UNINSTALLED)
+ {
+ Class keystoreProvider = bundle.loadClass(keystoreProviderType);
+
+ ISystemKeystoreProvider extension = (ISystemKeystoreProvider)keystoreProvider.getConstructors()[0].newInstance(null);
+ SystemKeystoreProviderManager.getInstance().registerKeystoreProvider(extension);
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
similarity index 87%
rename from rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
rename to rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
index 1b48f5a4851..2691217808d 100644
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2007 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
@@ -11,16 +11,13 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
********************************************************************************/
package org.eclipse.rse.core.comm;
import java.util.List;
-
-
-
/*
* Interface for the keystoreProviders extension point.
* Implementors must provide a keystore and it's password.
@@ -30,4 +27,4 @@ public interface ISystemKeystoreProvider
public String getKeyStorePassword();
public String getKeyStorePath();
public boolean importCertificates(List certificates, String systemName);
-}
\ No newline at end of file
+}
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
similarity index 92%
rename from rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
rename to rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
index ceaa4d0a25c..223edeb7466 100644
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2007 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
@@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
********************************************************************************/
package org.eclipse.rse.core.comm;
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF
index d9481350481..486e8f10e31 100644
--- a/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF
+++ b/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.rse.services,
org.eclipse.dstore.core,
org.eclipse.core.resources,
+ org.eclipse.rse.core,
org.eclipse.rse.subsystems.files.dstore,
org.eclipse.rse.subsystems.shells.dstore,
org.eclipse.rse.subsystems.processes.dstore,
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml b/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
index 7da19ad1e60..ed5d4ad8e69 100644
--- a/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
+++ b/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
@@ -1,6 +1,6 @@
@@ -27,7 +27,7 @@ Contributors:
-
+
@@ -171,47 +172,6 @@ Martin Oberhuber (Wind River) - [185554] Remove dynamicPopupMenuExtensions exten
-
-
-
-
-
-
-
-
-
-
@@ -435,24 +395,16 @@ Martin Oberhuber (Wind River) - [185554] Remove dynamicPopupMenuExtensions exten
-
-
-
-
-
-
+
-
-
-