1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

[217556][api][breaking] removing types associated with service subsystems

ASSIGNED - bug 217556: [api][breaking] Get rid of the concept of service subsystem types - merge with subsystem types
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217556
This commit is contained in:
David Dykstal 2008-02-08 18:48:25 +00:00
parent 7f8ebca07d
commit 1db587c0d0
35 changed files with 284 additions and 635 deletions

View file

@ -41,8 +41,8 @@ else.
<A name="Subsystems"></A><h2>RSE Subsystem Layer</h2>
<p>
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 <a href="rse_int_subsystems.html">subsystem</a> 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 <a href="rse_int_subsystems.html">subsystem</a> is associated with one or more services from the service layer,
a <a href="rse_int_connectorservices.html">connector service</a> 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.
</p>
@ -61,6 +61,11 @@ such cases, only one subsystem is instantiated for each host, however that subsy
to DataStore and vice versa.
</p>
<p>
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 <strong>null</strong> when implementing getServiceType().
</p>
<p>
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 <a href="rse_int_filters.html">filters</a>. 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

View file

@ -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
}

View file

@ -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) {

View file

@ -100,7 +100,7 @@ These appear in configuration and properties pages for subsystems.
<annotation>
<documentation>
A class that implements &lt;samp&gt;org.eclipse.rse.core.subsystems.ISubSystemConfiguration&lt;/samp&gt;.
It is recommended to extend &lt;samp&gt;org.eclipse.rse.core.subsystems.SubSystemConfiguration&lt;/samp&gt; or &lt;samp&gt;org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration&lt;/samp&gt;.
It is recommended to extend &lt;samp&gt;org.eclipse.rse.core.subsystems.SubSystemConfiguration&lt;/samp&gt;.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.SubSystemConfiguration:org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
@ -154,7 +154,7 @@ For example, if listing database resources you might specify a category of &quot
<documentation>
This optional attribute determines the order in which subsystems appear in the New Connection wizard and RSE views. Integer values are allowed. Subsystems with lower number will appear first in the RSE tree. Subsystems that do not define the priority attribute will be appended last to the list of subsystems.
Note that ServiceSubSystems that share the same service should always use the same priority, since their service implementation can change at runtime. The following priorities are used by the predefined subsystems: files=100, processes=200, shells=300.
Note that service subsystems that share the same service should always use the same priority, since their service implementation can change at runtime. The following priorities are used by the predefined subsystems: files=100, processes=200, shells=300.
</documentation>
</annotation>
</attribute>

View file

@ -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
@ -21,7 +21,8 @@
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
* David McKnight (IBM) - [207100] adding ISystemRegistry.isRegisteredSystemRemoteChangeListener
* David Dykstal (IBM) - [197036] adding new createHost and getSubSystemConfigurationsBySYstemType which
* are able to delay the creation of subsystems.
* are able to delay the creation of subsystems.
* David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.core.model;
@ -267,7 +268,7 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
/**
* Get those subsystems that are registered against a given connection,
* which are an instance of ServiceSubSystem for the given serviceType.
* which are service subsystems with the given serviceType.
* </p>
* @param host the host to check
* @param serviceType the class of service to ask for

View file

@ -1,55 +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:
* David Dykstal (IBM) - [197036] added javadoc and canSwitchTo method.
*******************************************************************************/
package org.eclipse.rse.core.subsystems;
/**
* A service subsystem provides a common subsystem implementation defined on a
* service interface. The service itself may have various
* implementations determined by a subsystem configuration. A service subsystem
* may be asked to switch its subsystem configuration in order to switch the
* underlying service implementation.
*/
public interface IServiceSubSystem extends ISubSystem {
/**
* 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(IServiceSubSystemConfiguration)}.
* If the configuration is not compatible with this subsystem then this must do nothing and must answer
* false to {@link #canSwitchTo(IServiceSubSystemConfiguration)}.
* @param configuration the configuration to which to switch.
*/
public void switchServiceFactory(IServiceSubSystemConfiguration 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(IServiceSubSystemConfiguration configuration);
}

View file

@ -1,39 +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:
* {Name} (company) - description of contribution.
*******************************************************************************/
package org.eclipse.rse.core.subsystems;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.services.IService;
/**
* This is the interface for the class that is for subsystem-providers who desire not to use MOF.
*
* @lastgen interface DefaultSubSystemConfiguration extends SubSystemConfiguration {}
*/
public interface IServiceSubSystemConfiguration extends ISubSystemConfiguration {
public IConnectorService getConnectorService(IHost host);
public void setConnectorService(IHost host, IConnectorService connectorService);
public Class getServiceType();
public Class getServiceImplType();
public IService getService(IHost host);
} //DefaultSubSystemConfiguration

View file

@ -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) - [187218] Fix error reporting for connect()
* David McKnight (IBM) - [207095] Implicit connect needs to run in the same job as caller
* David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
* David Dykstal (IBM) - [217556] remove service subsystem types
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@ -446,7 +447,7 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
* Resolve multiple absolute filter strings. This is only applicable if the subsystem
* factory reports true for supportsFilters().
* <p>
* 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

View file

@ -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.

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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
}

View file

@ -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);

View file

@ -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
{
}

View file

@ -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

View file

@ -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()
{

View file

@ -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)
{

View file

@ -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();
}

View file

@ -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);

View file

@ -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));

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -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};

View file

@ -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;
}

View file

@ -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++)

View file

@ -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);

View file

@ -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
// -------------------------------------
/**
* <i>Optionally override in order to supply a property sub-page to the tabbed
* notebook in the owning connection's Properties page.</i>
*
* 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. <br>
* 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.
* <br>
* Returns null by default.
*/
public PropertyPage getPropertyPage(Composite parent)
{
return null;
}
// ----------------------------------
// METHODS THAT MUST BE OVERRIDDEN...
// ----------------------------------
/**
* <i>Remote-accessing method, that does nothing by default. <b>Override</b> if filter strings are supported.</i><br>
* Resolve an <i>absolute</i> 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.
* <p>
* When a user <u>expands a filter</u> 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.
* <p>
* The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
* There are <u>two requirements</u> on the returned objects:</p>
* <ol>
* <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
* <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
* for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#isVisible() visible}
* in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
* with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
* </ol>
* <p>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}.
* <p>
* Be sure to register your adapter factory in your plugin's startup method.
* <p>
* As per IRunnableWithProgress rules:
* <ul>
* <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
* <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
* <li>do not worry about calling monitor.done() ... caller will do that!
* </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
* @param filterString - one of the filter strings from the expanded filter
* @param monitor - the progress monitor in effect while this operation performs
*/
protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
return null;
}
/**
* <i>Remote-accessing method, that does nothing by default. <b>Override</b> if filter strings are supported.</i><br>
*
* Resolve a <i>relative</i> filter string.
* <p>
* When a user <u>expands a remote resource</u> 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.
* <p>
* The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
* There are <u>two requirements</u> on the returned objects:</p>
* <ol>
* <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
* <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
* for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#isVisible() visible}
* in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
* with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
* </ol>
* <p>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}.
* <p>
* Be sure to register your adapter factory in your plugin's startup method.
*
* <p>
* As per IRunnableWithProgress rules:
* <ul>
* <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
* <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
* <li>do not worry about calling monitor.done() ... caller will do that!
* </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
* @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
* @param monitor - the progress monitor in effect while this operation performs
*/
protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
return null;
}
// ------------------------
// MOF GENERATED METHODS...
// ------------------------
/**
* <i><b>Private</b> method. Do not override or call.</i><br>
* @see org.eclipse.emf.ecore.InternalEObject //GENERICRULES.JSED - replaces InternalEObject. Is this needed? // #refSetValueForEnumAttribute(EAttribute, EEnumLiteral, EEnumLiteral)
*
public void refSetValueForEnumAttribute(EAttribute arg0,EEnumLiteral arg1,EEnumLiteral arg2)
{
super.refSetValueForEnumAttribute(arg0, arg1, arg2);
}*/
} //DefaultSubSystemImpl

View file

@ -1,195 +0,0 @@
/********************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* 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) - Replace SystemRegistry by ISystemRegistry
* Martin Oberhuber (Wind River) - [190231] Remove UI-only code from SubSystemConfiguration
********************************************************************************/
package org.eclipse.rse.core.servicesubsystem;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
import org.eclipse.rse.core.subsystems.AbstractConnectorService;
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
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.SubSystemConfiguration;
/**
* This class is to be used by subsystem-providers that do not desire to use MOF/EMF. It is
* therefore recommended starting base class for subsystem providers.
* <br>
* To use this class, simply subclass it and override the appropriate methods in it, such as:</p>
* <ul>
* <li>any of the supportsXXX() configuration methods you wish to change.
* <li>{@link #createSubSystemInternal(org.eclipse.rse.core.model.IHost)}, to instantiate your subsystem class.
* </ul>
* <p>
* For additional customization of the subsystem, you may supply a {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter},
* which allows you to
* <li>supply your own New->Filter popup menu action via {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewFilterPoolFilterAction(ISubSystemConfiguration, ISystemFilterPool, org.eclipse.swt.widgets.Shell)}, and
* <li>supply your own Change Filter popup menu action via {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getChangeFilterAction(ISubSystemConfiguration, ISystemFilter, org.eclipse.swt.widgets.Shell)}.
* </ul>
* <p>
* This class is typically used together with:</p>
* <ul>
* <li>{@link org.eclipse.rse.core.servicesubsystem.ServiceSubSystem} for the subsystem
* <li>{@link AbstractConnectorService} for the connector service
* <li>{@link AbstractConnectorServiceManager} for the connector service manager
* <li>{@link org.eclipse.rse.core.subsystems.AbstractResource} for the individual remote resources
* </ul>
* <p>
* 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
// ------------------------------------------------------
/**
* <i>Overridable configuration method. Default is <b>false</b></i><br>
* Return true if instance of this subsystem configuration's subsystems support connect and disconnect actions.
*/
public boolean supportsSubSystemConnect()
{
return true;
}
/**
* <i>Overridable configuration method. Default is <b>true</b></i><br>
* Return true (default) or false to indicate if subsystems of this subsystem configuration support user-editable
* port numbers.
*/
public boolean isPortEditable()
{
return true;
}
/**
* <i>Overridable configuration method. Default is <b>true</b></i><br>
* 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;
}
/**
* <i>Overridable configuration method. Default is <b>false</b></i><br>
* Do we allow filters within filters?
*/
public boolean supportsNestedFilters()
{
return false;
}
/**
* <i>COverridable configuration method. Default is <b>false</b></i><br>
* 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;
}
/**
* <i>Overridable configuration method. Default is <b>false</b></i><br>
* Return true if you support user-defined/managed named file types
*/
public boolean supportsFileTypes()
{
return false;
}
/**
* <i>Overridable configuration method. Default is <b>false</b></i><br>
* Tell us if filter strings are case sensitive.
*/
public boolean isCaseSensitive()
{
return false;
}
/**
* <i>Overridable configuration method. Default is <b>false</b></i><br>
* 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
// ------------------------------------------------
/**
* <i>Overridable lifecycle method. Not typically overridden.</i><br>
* After a new subsystem instance is created, the framework calls this method
* to initialize it. This is your opportunity to set default attribute values.
*
* <p>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.
* </p>
*
* <p>
* If you override this, <i>PLEASE CALL SUPER TO DO DEFAULT INITIALIZATION!</i>
*
* @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...
// --------------------------------
/**
* <i>Optionally overridable method affecting the visual display of objects within subsystems created by this subsystem configuration.</i><br>
* 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.
* <p>
* Returns a default string, override if appropriate.
*/
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
{
return super.getTranslatedFilterTypeProperty(selectedFilter);
}
}

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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;