From 1db587c0d0eb3da03462a5faf00c2aa962b76d29 Mon Sep 17 00:00:00 2001
From: David Dykstal
RSE subsystems integrate the services of the service layer with connection information, model artifacts and persistence.
-Each subsystem is associated with a single service type. For example, the file service subsystem is associated with the
-file service. Each subsystem is associated with one or more services from the service layer,
+Each subsystem is associated with a single service type. For example, the file service subsystem is associated with the
+file service. Each subsystem is associated with one or more services from the service layer,
a connector service and, in some cases, a model adapter, which is used to
convert artifacts from the service layer into a form that is suitable for the subsystem layer.
RSE Subsystem Layer
+Subsystems do not have to be implemented on top of a formally defined service layer, although this is highly recommended. +Instead it may have all the services implemented directly in the subsystem itself. +If a subsystem does not use a service layer it should return null when implementing getServiceType(). +
+
Subsystems are RSE objects that are persistable and maintain higher level functionality from the service layer. Subsystems that
are used to query information on a host often have filters. Filters provide the user the means to
specify a criteria for which to query a set of data. In addition to filters, there are more arbitrary properties that can be
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
index 83029e4236e..18f2c3b45bc 100644
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
+++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Wind River Systems, Inc.
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc.
* 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:
* Martin Oberhuber (Wind River) - initial API and implementation
+ * David Dykstal (IBM) - [217556] remove service subsystem types
*******************************************************************************/
package org.eclipse.rse.examples.daytime.subsystems;
@@ -20,8 +21,7 @@ import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemMessageObject;
import org.eclipse.rse.core.model.SystemMessageObject;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.examples.daytime.model.DaytimeResource;
import org.eclipse.rse.examples.daytime.service.IDaytimeService;
@@ -34,7 +34,7 @@ import org.eclipse.rse.ui.model.ISystemRegistryUI;
* This is our subsystem, which manages the remote connection and resources for
* a particular Service (system connection) object.
*/
-public class DaytimeSubSystem extends SubSystem implements IServiceSubSystem {
+public class DaytimeSubSystem extends SubSystem {
private IDaytimeService fDaytimeService;
@@ -90,7 +90,7 @@ public class DaytimeSubSystem extends SubSystem implements IServiceSubSystem {
return IDaytimeService.class;
}
- public void switchServiceFactory(IServiceSubSystemConfiguration factory) {
+ public void switchServiceFactory(ISubSystemConfiguration factory) {
// not applicable here
}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
index efe1cbbd5f0..5675b579de3 100644
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
+++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -13,6 +13,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - adapted template for daytime example.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
*******************************************************************************/
package org.eclipse.rse.examples.daytime.subsystems;
@@ -21,9 +22,9 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
import org.eclipse.rse.examples.daytime.connectorservice.DaytimeConnectorService;
import org.eclipse.rse.examples.daytime.connectorservice.DaytimeConnectorServiceManager;
import org.eclipse.rse.examples.daytime.service.IDaytimeService;
@@ -36,7 +37,7 @@ import org.eclipse.rse.services.IService;
* or disabled options, and is responsible for instanciating the actual
* Daytime subsystem as well as the UI-less configuration layer (service).
*/
-public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration {
+public class DaytimeSubSystemConfiguration extends SubSystemConfiguration {
private Map fServices = new HashMap();
@@ -47,14 +48,17 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration
public boolean supportsFilters() {
return false;
}
+
public boolean supportsSubSystemConnect() {
//TODO for now, we have to connect in order to pass the hostname to the service
//This should not be necessary in an ideal world
return true;
}
+
public boolean isPortEditable() {
return false;
}
+
public boolean isFactoryFor(Class subSystemType) {
return DaytimeSubSystem.class.equals(subSystemType);
}
@@ -71,12 +75,11 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration
}
public IConnectorService getConnectorService(IHost host) {
- return DaytimeConnectorServiceManager.getInstance()
- .getConnectorService(host, IDaytimeService.class);
+ return DaytimeConnectorServiceManager.getInstance().getConnectorService(host, IDaytimeService.class);
}
+
public void setConnectorService(IHost host, IConnectorService connectorService) {
- DaytimeConnectorServiceManager.getInstance()
- .setConnectorService(host, IDaytimeService.class, connectorService);
+ DaytimeConnectorServiceManager.getInstance().setConnectorService(host, IDaytimeService.class, connectorService);
}
public IDaytimeService createDaytimeService(IHost host) {
diff --git a/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd b/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd
index 8bb55730e90..52ef363969c 100644
--- a/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd
+++ b/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd
@@ -100,7 +100,7 @@ These appear in configuration and properties pages for subsystems.
- * This is the same as {@link #resolveFilterString(String)} but takes an array of
+ * This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
* filter strings versus a single filter string.
*
* @param filterStrings array of filter patterns for objects to return.
@@ -600,6 +601,34 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
* @return An object representing the parent
*/
Object getTargetForFilter(ISystemFilterReference filterRef);
+
+ /**
+ * Returns the interface type (i.e. a Class object that is an Interface) of a service subsystem.
+ * @return the service interface on which this service subsystem is implemented. If this
+ * subsystem is not a service subsystem it must return null.
+ */
+ public Class getServiceType();
+
+ /**
+ * Requests a service subsystem to switch to a new configuration. If the configuration
+ * is compatible with this subsystem then it must disconnect, possibly reset its
+ * filter pool references, and request new services and parameters from its new configuration.
+ * It must also answer true to {@link #canSwitchTo(ISubSystemConfiguration)}.
+ * If the configuration is not compatible with this subsystem then this must do nothing and must answer
+ * false to {@link #canSwitchTo(ISubSystemConfiguration)}.
+ * @param configuration the configuration to which to switch.
+ */
+ public void switchServiceFactory(ISubSystemConfiguration configuration);
+
+ /**
+ * Determine is this subsystem is compatible with this specified configuration.
+ * @param configuration the configuration which may be switched to
+ * @return true if the subsystem can switch to this configuration, false otherwise.
+ * Subsystems which are not service subsystems must return false.
+ */
+ public boolean canSwitchTo(ISubSystemConfiguration configuration);
+
+
//// -------------------------------------
// // GUI methods
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
index 3d6c4ab5d62..f867343f9d7 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
* David Dykstal (IBM) - [197036] change signature of getFilterPoolManager method to be able to control the creation of filter pools
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -29,6 +30,7 @@ import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.IRSEPersistableContainer;
import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.services.IService;
/**
* Subsystem Configuration interface.
@@ -387,8 +389,7 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
* @param creatingConnection true if we are creating a connection, false if just creating
* another subsystem for an existing connection.
* @param yourNewConnectionWizardPages The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter#getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
+ * getNewConnectionWizardPages(...) method, or null.
*/
public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages);
@@ -398,10 +399,54 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
public ISubSystem createSubSystemInternal(IHost conn);
/**
- * Find or create a connector service for this host
+ * Get the connector service for a particular host.
+ * This may create the connector service if necessary.
+ * If the configuration is a service subsystem configuration, this should
+ * return the connector service specified in {@link #setConnectorService(IHost, IConnectorService)}.
+ * @param host the host for which to create or retrieve the connector service
+ * @return the connector service associated with this host. This can return null if there
+ * is no connector service associated with this configuration. It is recommended that
+ * there be a connector service if {@link #supportsSubSystemConnect()} is true.
*/
public IConnectorService getConnectorService(IHost host);
+ /**
+ * Sets the connector service for a particular host.
+ * This is usually mangaged by a connector service manager known
+ * to this configuration.
+ * This must be implemented by service subsystem configurations.
+ * Service subsystems allow a connector service to be changed.
+ * @param host the host for which to set this connector service.
+ * @param connectorService the connector service associated with this host.
+ */
+ public void setConnectorService(IHost host, IConnectorService connectorService);
+
+ /**
+ * Get the service type associated with this subsystem configuration.
+ * If the configuration is not a service subsystem configuration it must return null, otherwise
+ * it must return the interface class that the underlying service layer implements.
+ * @return an interface class that is implemented by the service layer used by subsystems that have this configuration.
+ */
+ public Class getServiceType();
+
+ /**
+ * Get the implementation type of the service associated with this subsystem configuration.
+ * If the configuration is not a service subsystem configuration then this must return null, otherwise
+ * it must return the class that implements the interface specified in {@link #getServiceType()}.
+ * @return an implementation class that implements the interface specified in {@link #getServiceType()}.
+ */
+ public Class getServiceImplType();
+
+ /**
+ * Get the actual service associated with a particular host.
+ * If the configuration is not a service subsystem this must return null.
+ * Otherwise this must return the particular instance of the class returned by {@link #getServiceImplType()}
+ * that is associated with this host instance.
+ * @param host The host for which to retrieve the service.
+ * @return The instance of {@link IService} which is associated with this host.
+ */
+ public IService getService(IHost host);
+
/**
* Overridable entry for child classes to contribute a server launcher instance
* for a given subsystem.
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
index bc67d2a66ce..05fa2157ec2 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -18,6 +18,7 @@
* Martin Oberhuber (Wind River) - [202416] Protect against NPEs when importing DOM
* David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
* David Dykstal (IBM) - [197036] respond to removal of SystemProfile.createHost()
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.internal.persistence.dom;
@@ -45,8 +46,6 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.model.PropertyType;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.SubSystemFilterNamingPolicy;
@@ -258,13 +257,13 @@ public class RSEDOMImporter {
ISubSystem subSystem = null;
ISubSystemConfiguration factory = getSubSystemConfiguration(type);
if (factory != null) {
- if (factory instanceof IServiceSubSystemConfiguration) {
- IServiceSubSystemConfiguration serviceFactory = (IServiceSubSystemConfiguration) factory;
- ISubSystem[] existingSubSystems = _registry.getServiceSubSystems(host, serviceFactory.getServiceType());
+ Class serviceType = factory.getServiceType();
+ if (serviceType != null) {
+ ISubSystem[] existingSubSystems = _registry.getServiceSubSystems(host, serviceType);
if (existingSubSystems != null && existingSubSystems.length > 0) {
subSystem = existingSubSystems[0];
// need to switch factories
- ((IServiceSubSystem) subSystem).switchServiceFactory(serviceFactory);
+ subSystem.switchServiceFactory(factory);
}
} else {
ISubSystemConfiguration config = _registry.getSubSystemConfiguration(type);
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java
index dd23e57ed39..74580a93a68 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages;
@@ -25,7 +26,6 @@ import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystemConfiguration;
@@ -87,7 +87,7 @@ public class FileServicesPropertyPage extends ServicesPropertyPage
}
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
+ protected ISubSystemConfiguration getCurrentSubSystemConfiguration()
{
return _currentFactory;
}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java
index c84e6f26faa..c719d585dce 100644
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.internal.processes.ui.propertypages;
@@ -25,7 +26,6 @@ import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration;
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
@@ -84,7 +84,7 @@ public class ProcessServicesPropertyPage extends ServicesPropertyPage
return (IProcessServiceSubSystemConfiguration[])results.toArray(new IProcessServiceSubSystemConfiguration[results.size()]);
}
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
+ protected ISubSystemConfiguration getCurrentSubSystemConfiguration()
{
return _currentFactory;
}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java
index e324caf94a3..332575c0b21 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.internal.shells.ui.propertypages;
@@ -26,7 +27,6 @@ import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.DummyHost;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
@@ -100,7 +100,7 @@ public class ShellServicesPropertyPage extends ServicesPropertyPage
}
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
+ protected ISubSystemConfiguration getCurrentSubSystemConfiguration()
{
return _currentFactory;
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
index c03f3f6eb29..14b949a53b5 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -28,6 +28,7 @@
* Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
* David Dykstal (IBM) - [197036] pulling up subsystem switch logic
+ * David Dykstal (IBM) - [217556] remove service subsystem types
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
@@ -46,7 +47,7 @@ import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
import org.eclipse.rse.services.clientserver.PathUtility;
import org.eclipse.rse.services.clientserver.SystemSearchString;
@@ -917,18 +918,18 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
* Overriding the super implementation to return true for any configuration that implements IFileServiceSubSystemConfiguration
*/
- public boolean canSwitchTo(IServiceSubSystemConfiguration configuration) {
+ public boolean canSwitchTo(ISubSystemConfiguration configuration) {
return (configuration instanceof IFileServiceSubSystemConfiguration);
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
* Overriding the super implementation to do switch the file subsystem bits that need to be copied or initialized in a switch
*/
- protected void internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration newConfig) {
+ protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfig) {
if (newConfig instanceof IFileServiceSubSystemConfiguration) {
IHost host = getHost();
IFileServiceSubSystemConfiguration config = (IFileServiceSubSystemConfiguration) newConfig;
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
index 6e56d32c144..a60db07b84a 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2008 IBM Corporation. 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,13 +11,12 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.services.clientserver.SystemSearchString;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
@@ -27,7 +26,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-public interface IFileServiceSubSystem extends IRemoteFileSubSystem, IServiceSubSystem
+public interface IFileServiceSubSystem extends IRemoteFileSubSystem
{
/**
@@ -41,4 +40,4 @@ public interface IFileServiceSubSystem extends IRemoteFileSubSystem, IServiceSub
-} //DefaultFileSubSystem
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java
index 0bcb4fe2a8b..c091c8f74ca 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -12,14 +12,13 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.services.clientserver.SystemSearchString;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
@@ -32,7 +31,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConf
-public interface IFileServiceSubSystemConfiguration extends IRemoteFileSubSystemConfiguration, IServiceSubSystemConfiguration
+public interface IFileServiceSubSystemConfiguration extends IRemoteFileSubSystemConfiguration
{
public IFileService getFileService(IHost host);
public IFileService createFileService(IHost host);
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
index ffd6f2f6b7a..9e18b164a20 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2008 IBM Corporation. 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,15 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.processes.servicesubsystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem, IServiceSubSystem
+public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem
{
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
index 9adef195435..9bf9648ad51 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2008 IBM Corporation. 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,13 +11,12 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.processes.servicesubsystem;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.services.processes.IProcessService;
import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
@@ -28,7 +27,7 @@ import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSyst
* @author mjberger
*
*/
-public interface IProcessServiceSubSystemConfiguration extends IServiceSubSystemConfiguration, IRemoteProcessSubSystemConfiguration
+public interface IProcessServiceSubSystemConfiguration extends IRemoteProcessSubSystemConfiguration
{
/**
* @param host The object representing the remote machine to which the process service is associated
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
index 8c3ff9ef437..e0c18480425 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* David Dykstal (IBM) - [197036] refactored switch configuration
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.processes.servicesubsystem;
@@ -22,7 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
@@ -146,9 +147,9 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
*/
- protected void internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration configuration)
+ protected void internalSwitchServiceSubSystemConfiguration(ISubSystemConfiguration configuration)
{
IProcessServiceSubSystemConfiguration config = (IProcessServiceSubSystemConfiguration) configuration;
IHost host = getHost();
@@ -157,14 +158,14 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
*/
- public boolean canSwitchTo(IServiceSubSystemConfiguration configuration) {
+ public boolean canSwitchTo(ISubSystemConfiguration configuration) {
return configuration instanceof IProcessServiceSubSystemConfiguration;
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystem#getServiceType()
+ * @see org.eclipse.rse.core.servicesubsystem.ISubSystem#getServiceType()
*/
public Class getServiceType()
{
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
index 31d201b2192..7237ecc2bbe 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.processes.servicesubsystem;
@@ -56,7 +57,7 @@ public abstract class ProcessServiceSubSystemConfiguration extends RemoteProcess
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getServiceType()
+ * @see org.eclipse.rse.core.servicesubsystem.ISubSystemConfiguration#getServiceType()
*/
public final Class getServiceType()
{
@@ -72,7 +73,7 @@ public abstract class ProcessServiceSubSystemConfiguration extends RemoteProcess
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getService(org.eclipse.rse.ui.model.IHost)
+ * @see org.eclipse.rse.core.servicesubsystem.ISubSystemConfiguration#getService(org.eclipse.rse.ui.model.IHost)
*/
public IService getService(IHost host)
{
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
index 564e815911f..b66f77545e8 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2008 IBM Corporation. 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,19 +11,18 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-public interface IShellServiceSubSystem extends IRemoteCmdSubSystem, IServiceSubSystem
+public interface IShellServiceSubSystem extends IRemoteCmdSubSystem
{
public IShellService getShellService();
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
index c0db48e0d31..214b30c3797 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2006, 2008 IBM Corporation. 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,14 +11,13 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
@@ -28,7 +27,7 @@ import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConf
/**
* @lastgen interface DefaultCmdSubSystemConfiguration extends RemoteCmdSubSystemConfiguration {}
*/
-public interface IShellServiceSubSystemConfiguration extends IRemoteCmdSubSystemConfiguration, IServiceSubSystemConfiguration
+public interface IShellServiceSubSystemConfiguration extends IRemoteCmdSubSystemConfiguration
{
public IShellService getShellService(IHost host);
public IShellService createShellService(IHost host);
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java
index e6c239a98c9..cc17be66055 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* David McKnight (IBM) - [191599] Need to pass in shell encoding
* David Dykstal (IBM) - [197036] refactored switch configuration
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
@@ -28,13 +29,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration;
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
import org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem;
@@ -207,16 +207,16 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
*/
- public boolean canSwitchTo(IServiceSubSystemConfiguration configuration) {
+ public boolean canSwitchTo(ISubSystemConfiguration configuration) {
return configuration instanceof IShellServiceSubSystemConfiguration;
}
/* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration)
+ * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
*/
- protected void internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration newConfiguration) {
+ protected void internalSwitchServiceSubSystemConfiguration(ISubSystemConfiguration newConfiguration) {
IShellServiceSubSystemConfiguration configuration = (IShellServiceSubSystemConfiguration) newConfiguration;
IHost host = getHost();
setShellService(configuration.getShellService(host));
diff --git a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
index 04eaaab9eeb..9697fbfa90a 100644
--- a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
+++ b/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
@@ -20,8 +20,7 @@ Import-Package: com.ibm.icu.lang,
com.ibm.icu.util
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.core.servicesubsystem,
- org.eclipse.rse.core.subsystems,
+Export-Package: org.eclipse.rse.core.subsystems,
org.eclipse.rse.internal.ui;x-friends:="org.eclipse.rse.connectorservice.dstore,org.eclipse.rse.processes.ui",
org.eclipse.rse.internal.ui.actions;x-internal:=true,
org.eclipse.rse.internal.ui.dialogs;x-internal:=true,
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java
index 3ff781adf17..a4b003c6f4f 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -29,7 +30,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.ui.SystemResources;
@@ -152,19 +152,12 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter
public String getAbsoluteName(Object element)
{
ISubSystem ss = (ISubSystem)element;
-
- // DKM - using type instead of name
- //FIXME can we guarantee that the serviceType is always different than the subsystemName?
- //Or could the two be confused when looking up the subsystem the reverse way?
- if (ss instanceof IServiceSubSystem)
- {
- return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ((IServiceSubSystem)ss).getServiceType(); //$NON-NLS-1$ //$NON-NLS-2$
+ String suffix = ss.getName();
+ Class serviceType = ss.getServiceType();
+ if (serviceType != null) {
+ suffix = serviceType.toString();
}
- else
- {
- return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ss.getName(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
+ return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + suffix; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* Return the type label for this object
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
index f7096a67c3d..1daac2d2218 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -12,14 +12,15 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.ui.propertypages;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.ui.widgets.services.FactoryServiceElement;
import org.eclipse.rse.ui.widgets.services.RootServiceElement;
import org.eclipse.rse.ui.widgets.services.ServiceElement;
@@ -59,13 +60,14 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage
_form.init(_rootElement);
}
- protected IServiceSubSystem getServiceSubSystem()
+ protected ISubSystem getServiceSubSystem()
{
- return (IServiceSubSystem)getElement();
+ return (ISubSystem)getElement();
}
protected abstract ServiceElement[] getServiceElements();
- protected abstract IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration();
+
+ protected abstract ISubSystemConfiguration getCurrentSubSystemConfiguration();
public boolean performOk()
{
@@ -93,22 +95,16 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage
public boolean applyValues(IConnectorService connectorService)
{
-
-
FactoryServiceElement selectedService = (FactoryServiceElement)_form.getSelectedService();
-
- IServiceSubSystemConfiguration factory = selectedService.getFactory();
- IServiceSubSystemConfiguration currentFactory = getCurrentServiceSubSystemConfiguration();
+ ISubSystemConfiguration factory = selectedService.getFactory();
+ ISubSystemConfiguration currentFactory = getCurrentSubSystemConfiguration();
if (factory != currentFactory)
{
getServiceSubSystem().switchServiceFactory(factory);
}
-
return true;
}
-
-
public void setHostname(String hostname)
{
_hostname = hostname;
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
index a9bc97130d6..c0328637fa1 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [190231] Remove UI-only code from SubSystemConfiguration
* Martin Oberhuber (Wind River) - [174789] [performance] Don't contribute Property Pages to Wizard automatically
* David McKnight (IBM) - [197129] Removing obsolete ISystemConnectionWizardPropertyPage and SystemSubSystemsPropertiesWizardPage
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.ui.view;
@@ -40,7 +41,6 @@ import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.core.filters.ISystemFilterString;
import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
@@ -192,7 +192,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda
*/
public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration config, IWizard wizard)
{
- if (config instanceof IServiceSubSystemConfiguration)
+ if (config.getServiceType() != null)
{
SubSystemServiceWizardPage page = new SubSystemServiceWizardPage(wizard, config);
return new ISystemNewConnectionWizardPage[] {page};
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
index 73ca1bdc061..eb8e8868cdf 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [217556] remove service subsystem types
*******************************************************************************/
package org.eclipse.rse.ui.widgets.services;
@@ -22,7 +22,7 @@ import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.IDelegatingConnectorService;
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.services.IService;
@@ -31,11 +31,11 @@ import org.eclipse.rse.services.IService;
public class FactoryServiceElement extends ServiceElement
{
- private IServiceSubSystemConfiguration _factory;
+ private ISubSystemConfiguration _factory;
private ServiceElement[] _children;
- public FactoryServiceElement(IHost host, IServiceSubSystemConfiguration factory)
+ public FactoryServiceElement(IHost host, ISubSystemConfiguration factory)
{
super(host, null);
_factory = factory;
@@ -51,7 +51,7 @@ public class FactoryServiceElement extends ServiceElement
return _factory.getDescription();
}
- public IServiceSubSystemConfiguration getFactory()
+ public ISubSystemConfiguration getFactory()
{
return _factory;
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
index 6aa5aacc88b..2a3dc0168b8 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Javier Montalvo Orus (Symbian) - [188146] Incorrect "FTP Settings" node in Property Sheet for Linux connection
* Martin Oberhuber (Wind River) - [190231] Move ISubSystemPropertiesWizardPage from UI to Core
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.ui.wizards;
@@ -34,8 +35,6 @@ import org.eclipse.rse.core.model.IPropertySet;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemPropertiesWizardPage;
@@ -55,7 +54,7 @@ import org.eclipse.swt.widgets.Control;
public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizardPage implements ISubSystemPropertiesWizardPage
{
private ServicesForm _form;
- private IServiceSubSystemConfiguration _selectedConfiguration;
+ private ISubSystemConfiguration _selectedConfiguration;
private ServiceElement _root;
private ServiceElement[] _serviceElements;
@@ -93,10 +92,10 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
{
- IServiceSubSystemConfiguration currentFactory = (IServiceSubSystemConfiguration)getSubSystemConfiguration();
+ ISubSystemConfiguration currentFactory = getSubSystemConfiguration();
IRSESystemType systemType = getMainPage() != null && getMainPage().getWizard() instanceof RSEDefaultNewConnectionWizard ? ((RSEDefaultNewConnectionWizard)getMainPage().getWizard()).getSystemType() : null;
- IServiceSubSystemConfiguration[] factories = getServiceSubSystemConfigurations(systemType, currentFactory.getServiceType());
+ ISubSystemConfiguration[] factories = getServiceSubSystemConfigurations(systemType, currentFactory.getServiceType());
IHost dummyHost = null;
if (getWizard() instanceof RSEDefaultNewConnectionWizard)
@@ -112,7 +111,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
_serviceElements = new ServiceElement[factories.length];
for (int i = 0; i < factories.length; i++)
{
- IServiceSubSystemConfiguration factory = factories[i];
+ ISubSystemConfiguration factory = factories[i];
_serviceElements[i] = new FactoryServiceElement(dummyHost, factory);
@@ -127,7 +126,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
return _serviceElements;
}
- protected IServiceSubSystemConfiguration[] getServiceSubSystemConfigurations(IRSESystemType systemType, Class serviceType)
+ protected ISubSystemConfiguration[] getServiceSubSystemConfigurations(IRSESystemType systemType, Class serviceType)
{
List results = new ArrayList();
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
@@ -136,18 +135,13 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
for (int i = 0; i < configs.length; i++)
{
ISubSystemConfiguration config = configs[i];
- if (config instanceof IServiceSubSystemConfiguration)
+ if (config.getServiceType() == serviceType)
{
- IServiceSubSystemConfiguration sconfig = (IServiceSubSystemConfiguration)config;
- if (sconfig.getServiceType() == serviceType)
- {
-
- results.add(sconfig);
- }
+ results.add(config);
}
}
- return (IServiceSubSystemConfiguration[])results.toArray(new IServiceSubSystemConfiguration[results.size()]);
+ return (ISubSystemConfiguration[])results.toArray(new ISubSystemConfiguration[results.size()]);
}
public boolean isPageComplete()
@@ -203,10 +197,10 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
public boolean applyValues(ISubSystem ss) {
if (_selectedConfiguration != null) {
- IServiceSubSystemConfiguration currentConfiguration = (IServiceSubSystemConfiguration) ss.getSubSystemConfiguration();
+ ISubSystemConfiguration currentConfiguration = ss.getSubSystemConfiguration();
if (currentConfiguration != null) {
if (_selectedConfiguration != currentConfiguration) {
- ((IServiceSubSystem) ss).switchServiceFactory(_selectedConfiguration);
+ ss.switchServiceFactory(_selectedConfiguration);
}
if (_root != null) {
IConnectorService connectorService = ss.getConnectorService();
@@ -267,7 +261,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
return result;
}
- protected IConnectorService getCustomConnectorService(IServiceSubSystemConfiguration config)
+ protected IConnectorService getCustomConnectorService(ISubSystemConfiguration config)
{
ServiceElement[] children = _root.getChildren();
for (int i = 0; i < children.length; i++)
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
index c1cc2ade89c..fac7b3da092 100644
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
@@ -42,6 +42,7 @@
* David Dykstal (IBM) - [197036] wrapped createHost to commit changes only once
* rewrote createHost to better pick default subsystem configurations to activate
* rewrote getSubSystemConfigurationsBySystemType to be able to delay the creation (and loading) of subsystem configurations
+ * David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.ui.internal.model;
@@ -90,8 +91,6 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.model.SystemChildrenContentsType;
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
@@ -355,9 +354,8 @@ public class SystemRegistry implements ISystemRegistry
if (activate || subsystemConfigurationProxy.isSubSystemConfigurationActive()) {
ISubSystemConfiguration configuration = subsystemConfigurationProxy.getSubSystemConfiguration();
if (configuration != null) { // could happen if activate fails
- if (filterDuplicates && configuration instanceof IServiceSubSystemConfiguration) {
- IServiceSubSystemConfiguration service = (IServiceSubSystemConfiguration) configuration;
- Class serviceType = service.getServiceType();
+ Class serviceType = configuration.getServiceType();
+ if (filterDuplicates && serviceType != null) {
if (!serviceTypes.contains(serviceType)) {
serviceTypes.add(serviceType);
configurations.add(configuration);
@@ -1153,14 +1151,11 @@ public class SystemRegistry implements ISystemRegistry
for (int i = 0; i < allSS.length; i++)
{
ISubSystem ss = allSS[i];
- if (ss instanceof IServiceSubSystem)
+ Class thisServiceType = ss.getServiceType();
+ if (thisServiceType == serviceType)
{
- IServiceSubSystem serviceSubSystem = (IServiceSubSystem)ss;
- if (serviceSubSystem.getServiceType() == serviceType)
- {
- matches.add(ss);
- }
- }
+ matches.add(ss);
+ }
}
return (ISubSystem[])matches.toArray(new ISubSystem[matches.size()]);
}
@@ -1709,7 +1704,7 @@ public class SystemRegistry implements ISystemRegistry
ISubSystemConfiguration[] configsArray = getSubSystemConfigurationsBySystemType(systemType, false);
for (int i = 0; i < configsArray.length; i++) {
ISubSystemConfiguration config = configsArray[i];
- boolean isStrange = !(config instanceof IServiceSubSystemConfiguration);
+ boolean isStrange = (config.getServiceType() == null);
boolean isAbsent = !configs.contains(config);
if (isStrange && isAbsent) {
configs.add(config);
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java
deleted file mode 100644
index 82f14871bd9..00000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/********************************************************************************
- * 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
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- ********************************************************************************/
-
-package org.eclipse.rse.core.servicesubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public abstract class ServiceSubSystem extends SubSystem implements IServiceSubSystem
-{
- /**
- * Constructor
- * Subclasses must call this via super().
- */
- protected ServiceSubSystem(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- }
-
- // -------------------------------------
- // GUI methods
- // -------------------------------------
- /**
- * Optionally override in order to supply a property sub-page to the tabbed
- * notebook in the owning connection's Properties page.
- *
- * Return the single property page to show in the tabbed notebook for the
- * for SubSystem property of the parent Connection object, in the Remote Systems
- * view.
- * Return null if no page is to be contributed for this. You are limited to a single
- * page, so you may have to compress. It is recommended you prompt for the port
- * if applicable since the common base subsystem property page is not shown
- * To help with this you can use the {@link org.eclipse.rse.ui.widgets.SystemPortPrompt} widget.
- *
- * Returns null by default.
- */
- public PropertyPage getPropertyPage(Composite parent)
- {
- return null;
- }
-
-
- // ----------------------------------
- // METHODS THAT MUST BE OVERRIDDEN...
- // ----------------------------------
-
-
- /**
- * Remote-accessing method, that does nothing by default. Override if filter strings are supported.
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- *
- * When a user expands a filter this method is invoked for each filter string and the - * results are concatenated and displayed to the user. You can affect the post-concatenated - * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to - * sort the result, say, or pick our redundancies. - *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}. - * There are two requirements on the returned objects:
- *A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it - * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when - * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}. - *
- * Be sure to register your adapter factory in your plugin's startup method. - *
- * As per IRunnableWithProgress rules: - *
- * When a user expands a remote resource this method is invoked and the - * results are potentially sorted and displayed to the user. You can affect the sorting - * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to - * sort the result, say, or pick our redundancies. This is only called if the parent object's adapter indicated it can have children. - *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}. - * There are two requirements on the returned objects:
- *A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it - * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when - * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}. - *
- * Be sure to register your adapter factory in your plugin's startup method. - * - *
- * As per IRunnableWithProgress rules: - *
- * For additional customization of the subsystem, you may supply a {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter}, - * which allows you to - *
- * This class is typically used together with:
- *
- * In general, for what methods to override, only worry about the non-generated methods in
- * this class, and ignore the hundreds in {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration}
- *
- * @see org.eclipse.rse.core.servicesubsystem.ServiceSubSystem
- * @see AbstractConnectorService
- * @see AbstractConnectorServiceManager
- */
-
-public abstract class ServiceSubSystemConfiguration extends SubSystemConfiguration implements IServiceSubSystemConfiguration
-{
-
- protected ServiceSubSystemConfiguration()
- {
- super();
- }
-
- // ------------------------------------------------------
- // CONFIGURATION METHODS THAT ARE OVERRIDDEN FROM PARENT
- // WE ASSUME TYPICAL DEFAULTS, BUT CHILDREN CAN OVERRIDE
- // ------------------------------------------------------
- /**
- * Overridable configuration method. Default is false
- * Return true if instance of this subsystem configuration's subsystems support connect and disconnect actions.
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
-
- /**
- * Overridable configuration method. Default is true
- * Return true (default) or false to indicate if subsystems of this subsystem configuration support user-editable
- * port numbers.
- */
- public boolean isPortEditable()
- {
- return true;
- }
- /**
- * Overridable configuration method. Default is true
- * Required method for subsystem configuration child classes. Return true if you support filters, false otherwise.
- * If you support filters, then some housekeeping will be done for you automatically. Specifically, they
- * will be saved and restored for you automatically.
- */
- public boolean supportsFilters()
- {
- return true;
- }
- /**
- * Overridable configuration method. Default is false
- * Do we allow filters within filters?
- */
- public boolean supportsNestedFilters()
- {
- return false;
- }
- /**
- * COverridable configuration method. Default is false
- * Return true if you support user-defined actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem configuration
- */
- public boolean supportsUserDefinedActions()
- {
- return false;
- }
- /**
- * Overridable configuration method. Default is false
- * Return true if you support user-defined/managed named file types
- */
- public boolean supportsFileTypes()
- {
- return false;
- }
- /**
- * Overridable configuration method. Default is false
- * Tell us if filter strings are case sensitive.
- */
- public boolean isCaseSensitive()
- {
- return false;
- }
- /**
- * Overridable configuration method. Default is false
- * Tell us if duplicate filter strings are supported per filter.
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return false;
- }
-
- // ------------------------------------------------
- // FRAMEWORKD METHODS TO BE OVERRIDDEN IF APPROPRIATE.
- // THESE ARE CALLED BY OUR OWN PARENT
- // ------------------------------------------------
-
- /**
- * Overridable lifecycle method. Not typically overridden.
- * After a new subsystem instance is created, the framework calls this method
- * to initialize it. This is your opportunity to set default attribute values.
- *
- *
The reason for the connect wizard pages parameter is in case your subsystem configuration contributes a page to that wizard, - * whose values are needed to set the subsystem's initial state. For example, you might decide to add a - * page to the connection wizard to prompt for a JDBC Driver name. If so, when this method is called at - * the time a new connection is created after the wizard, your page will have the user's value. You can - * thus use it here to initialize that subsystem property. Be use to use instanceof to find your particular - * page. - *
- * - *
- * If you override this, PLEASE CALL SUPER TO DO DEFAULT INITIALIZATION!
- *
- * @param subsys - The subsystem that was created via createSubSystemInternal
- * @param yourNewConnectionWizardPages - The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
- * Note there may be more pages than you originally supplied, as you are passed all pages contributed
- * by this subsystem configuration object, including subclasses. Null on a clone operation.
- *
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
- protected void initializeSubSystem(ISubSystem subsys,ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
- {
- super.initializeSubSystem(subsys, yourNewConnectionWizardPages);
- }
-
- // --------------------------------
- // METHODS FOR SUPPLYING ACTIONS...
- // --------------------------------
-
- /**
- * Optionally overridable method affecting the visual display of objects within subsystems created by this subsystem configuration.
- * Return the translated string to show in the property sheet for the "type" property, for the selected
- * filter. This method is only called for filters within subsystems created by this subsystem configuration.
- *
- * Returns a default string, override if appropriate. - */ - public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter) - { - return super.getTranslatedFilterTypeProperty(selectedFilter); - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java index a13424cca64..43ac2d055a4 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 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 @@ -31,6 +31,7 @@ * David Dykstal (IBM) - [197036] pulled up subsystem configuration switching logic from the service subsystem layer * implemented IServiceSubSystem here so that subsystem configuration switching can be * made common among all service subsystems. + * David Dykstal (IBM) - [217556] remove service subsystem types ********************************************************************************/ package org.eclipse.rse.core.subsystems; @@ -132,8 +133,7 @@ import org.eclipse.ui.progress.WorkbenchJob; */ public abstract class SubSystem extends RSEModelObject - implements IAdaptable, ISubSystem, IServiceSubSystem, - ISystemFilterPoolReferenceManagerProvider + implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider { @@ -3070,7 +3070,7 @@ public abstract class SubSystem extends RSEModelObject * This supplied implementation does nothing. Subclasses may override if they implement a service subsystem. * @param newConfiguration the configuration this subsystem should use from this point. */ - protected void internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration newConfiguration) { + protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfiguration) { } /** @@ -3080,9 +3080,9 @@ public abstract class SubSystem extends RSEModelObject * @param configuration the configuration to which this subsystem may switch * @return true if this subsystem is capable of switching to this configuration, false otherwise. This implementation * returns false. - * @see IServiceSubSystem#canSwitchTo(IServiceSubSystemConfiguration) + * @see ISubSystem#canSwitchTo(ISubSystemConfiguration) */ - public boolean canSwitchTo(IServiceSubSystemConfiguration configuration) { + public boolean canSwitchTo(ISubSystemConfiguration configuration) { return false; } @@ -3090,10 +3090,10 @@ public abstract class SubSystem extends RSEModelObject * Switch to use another subsystem configuration. This default implementation will test if the subsystem is a * service subsystem and if the subsystem is compatible with the suggested configuration. If it is the switch will * be performed and internalSwitchSubSystemConfiguration will be called. - * @see IServiceSubSystem#switchServiceFactory(IServiceSubSystemConfiguration) - * @see #internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration) + * @see ISubSystem#switchServiceFactory(ISubSystemConfiguration) + * @see #internalSwitchSubSystemConfiguration(ISubSystemConfiguration) */ - public void switchServiceFactory(final IServiceSubSystemConfiguration config) { + public void switchServiceFactory(final ISubSystemConfiguration config) { if (config != getSubSystemConfiguration() && canSwitchTo(config)) { // define the operation to be executed ISystemProfileOperation op = new ISystemProfileOperation() { @@ -3111,7 +3111,7 @@ public abstract class SubSystem extends RSEModelObject * Return the service type for this subsystem. * @return the default implementation returns null. Subclasses that implement service subsystems * should return a type as specified in the interface. - * @see org.eclipse.rse.core.subsystems.IServiceSubSystem#getServiceType() + * @see org.eclipse.rse.core.subsystems.ISubSystem#getServiceType() */ public Class getServiceType() { return null; @@ -3121,7 +3121,7 @@ public abstract class SubSystem extends RSEModelObject * Actually perform the switch inside the commit guard * @param newConfig */ - private void doSwitchServiceConfiguration(IServiceSubSystemConfiguration newConfig) { + private void doSwitchServiceConfiguration(ISubSystemConfiguration newConfig) { try { disconnect(); } catch (Exception e) { @@ -3181,7 +3181,7 @@ public abstract class SubSystem extends RSEModelObject newConnectorService.commit(); // call the subsystem specfic switching support - internalSwitchServiceSubSystemConfiguration(newConfig); + internalSwitchSubSystemConfiguration(newConfig); // commit the subsystem setDirty(true); diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java index de5492013bd..cb03887ac82 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 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 @@ -27,6 +27,7 @@ * Martin Oberhuber (Wind River) - [195392] Avoid setting port 0 in initializeSubSystem() * David Dykstal (IBM) - [197036] rewrote getFilterPoolManager to delay the creation of default filter pools until the corresponding * a subsystem configuration is actually used for a host. + * David Dykstal (IBM) - [217556] remove service subsystem types ********************************************************************************/ package org.eclipse.rse.core.subsystems; @@ -70,6 +71,7 @@ import org.eclipse.rse.internal.core.model.SystemProfileManager; import org.eclipse.rse.internal.ui.SystemPropertyResources; import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.logging.Logger; +import org.eclipse.rse.services.IService; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; @@ -2798,4 +2800,53 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration { return true; } + + /* + * Service Subsystem Configuration methods - default implementations + */ + + /** + * This default implementation does nothing. + * Service subsystems must override as defined in the interface. + * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#setConnectorService(org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.subsystems.IConnectorService) + */ + public void setConnectorService(IHost host, IConnectorService connectorService) { + } + + /** + * This default implementation returns null. + * Service subsystem configurations must override as defined in the interface. + * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost) + */ + public IConnectorService getConnectorService(IHost host) { + return null; + } + + /** + * This default implementation returns null. + * Service subsystem configurations must override as defined in the interface. + * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getServiceType() + */ + public Class getServiceType() { + return null; + } + + /** + * This default implementation returns null. + * Service subsystem configurations must override as defined in the interface. + * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getServiceImplType() + */ + public Class getServiceImplType() { + return null; + } + + /** + * This default implementation returns null. + * Service subsystem configurations must override as defined in the interface. + * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getService(org.eclipse.rse.core.model.IHost) + */ + public IService getService(IHost host) { + return null; + } + } \ No newline at end of file diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java index 4216e4b0b10..2685e2b5d5b 100644 --- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java +++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 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 @@ -13,6 +13,7 @@ * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * David Dykstal (IBM) - [217556] remove service subsystem types *******************************************************************************/ package org.eclipse.rse.tests.internal; @@ -39,7 +40,6 @@ import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.SystemSignonInformation; -import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; @@ -263,9 +263,8 @@ public class RSEConnectionManager implements IRSEConnectionManager { ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); ISubSystemConfiguration desiredConfiguration = registry.getSubSystemConfiguration(desiredConfigurationId); - if (desiredConfiguration instanceof IServiceSubSystemConfiguration) { - IServiceSubSystemConfiguration t = (IServiceSubSystemConfiguration)desiredConfiguration; - subsystem.switchServiceFactory(t); + if (subsystem.canSwitchTo(desiredConfiguration)) { + subsystem.switchServiceFactory(desiredConfiguration); } } return subsystem;