From c6a5434726c7ccd5994c6780656d5919acd0495b Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Fri, 28 Mar 2008 16:51:45 +0000
Subject: [PATCH] [cleanup] Add API "since" Javadoc tags
---
rse/plugins/org.eclipse.rse.core/.project | 6 +
.../eclipse/rse/core/IRSEPreferenceNames.java | 55 +-
.../org/eclipse/rse/core/IRSESystemType.java | 15 +-
.../rse/core/IRSESystemTypeConstants.java | 10 +-
.../eclipse/rse/core/IRSEUserIdConstants.java | 18 +-
.../rse/core/PasswordPersistenceManager.java | 299 +-
.../org/eclipse/rse/core/RSECorePlugin.java | 313 +-
.../rse/core/RSEPreferencesManager.java | 50 +-
.../core/events/ISystemModelChangeEvents.java | 45 +-
.../events/ISystemPreferenceChangeEvents.java | 11 +-
.../events/ISystemRemoteChangeEvents.java | 90 +-
.../events/ISystemResourceChangeEvents.java | 129 +-
.../rse/core/filters/ISystemFilter.java | 71 +-
.../core/filters/ISystemFilterContainer.java | 40 +-
.../rse/core/filters/ISystemFilterPool.java | 16 +-
.../filters/ISystemFilterPoolManager.java | 155 +-
.../ISystemFilterPoolReferenceManager.java | 19 +-
.../core/filters/ISystemFilterStartHere.java | 31 +-
.../rse/core/model/ISystemProfileManager.java | 25 +-
.../rse/core/model/ISystemRegistry.java | 59 +-
.../core/subsystems/IConnectorService.java | 81 +-
.../subsystems/IConnectorServiceManager.java | 15 +-
.../IDelegatingConnectorService.java | 8 +-
.../rse/core/subsystems/IFileConstants.java | 16 +-
.../subsystems/IRemoteObjectResolver.java | 119 +-
.../rse/core/subsystems/ISubSystem.java | 140 +-
.../subsystems/ISubSystemConfiguration.java | 79 +-
.../RemoteServerLauncherConstants.java | 29 +-
.../rse/core/subsystems/ServerLaunchType.java | 155 +-
.../rse/core/subsystems/SubSystemHelpers.java | 161 +-
.../core/SystemResourceConstants.java | 32 +-
.../rse/persistence/dom/IRSEDOMConstants.java | 15 +-
.../rse/core/subsystems/SubSystem.java | 3813 ++++++++---------
33 files changed, 3153 insertions(+), 2967 deletions(-)
diff --git a/rse/plugins/org.eclipse.rse.core/.project b/rse/plugins/org.eclipse.rse.core/.project
index c2582431cd8..8fbb720bf2d 100644
--- a/rse/plugins/org.eclipse.rse.core/.project
+++ b/rse/plugins/org.eclipse.rse.core/.project
@@ -20,9 +20,15 @@
- * Implementers of custom system types (which are registered by a SystemTypeProvider)
- * can override this method to provide more advanced enabled checks e.g. based on
- * license availability.
+ * Implementers of custom system types (which are registered by a
+ * SystemTypeProvider) can override this method to provide more advanced
+ * enabled checks e.g. based on license availability.
*
- * @return
- * To monitor, implement interface {@link org.eclipse.rse.core.events.ISystemModelChangeListener} and
+ * To monitor, implement interface {@link org.eclipse.rse.core.events.ISystemModelChangeListener} and
* call {@link org.eclipse.rse.core.model.ISystemRegistry#addSystemModelChangeListener(ISystemModelChangeListener)}
* and in your dispose method, call {@link org.eclipse.rse.core.model.ISystemRegistry#removeSystemModelChangeListener(ISystemModelChangeListener)}.
*
- * If you are interesting in firing model change events, see
+ * If you are interesting in firing model change events, see
* {@link org.eclipse.rse.core.model.ISystemRegistry#fireModelChangeEvent(int, int, Object, String)}.
- * These events will typically be signalled in an implementation of ISystemRegistry.
+ * These events will typically be signaled in an implementation of ISystemRegistry.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISystemModelChangeEvents {
@@ -82,21 +85,21 @@ public interface ISystemModelChangeEvents {
*/
public static final int SYSTEM_RESOURCETYPE_FILTERPOOLREF = 16;
/**
- * Resource Type: filter
+ * Resource Type: filter
*/
public static final int SYSTEM_RESOURCETYPE_FILTER = 32;
-// /**
-// * Resource Type: user action
-// */
-// public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
-// /**
-// * Resource Type: named type, which are used in user actions
-// */
-// public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
-// /**
-// * Resource Type: compile command
-// */
-// public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
+ // /**
+ // * Resource Type: user action
+ // */
+ // public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
+ // /**
+ // * Resource Type: named type, which are used in user actions
+ // */
+ // public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
+ // /**
+ // * Resource Type: compile command
+ // */
+ // public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
/**
* Resource Type: ALL. Used with SYSTEM_RESOURCE_ALL_RELOADED
*/
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
index d67bb212a17..e8a0a7cd537 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
@@ -1,23 +1,26 @@
/********************************************************************************
- * 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
+ * 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,
+ * 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) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.events;
/**
* Interface of event ID constants for preferences changed
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISystemPreferenceChangeEvents {
/**
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java
index c47ae75c3ca..5a03a3577c0 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java
@@ -1,122 +1,140 @@
/********************************************************************************
- * 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
+ * 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,
+ * 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [207100] Events for after a resource is downloaded and uploaded
+ * David McKnight (IBM) - [207100] Events for after a resource is downloaded and uploaded
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.events;
/**
- * The event IDs sent when remote resources in the model change
- * These IDs are used when creating ISystemRemoteChangeEvent objects.
+ * The event IDs sent when remote resources in the model change These IDs are
+ * used when creating ISystemRemoteChangeEvent objects.
*
+ * @noimplement This interface is not intended to be implemented by clients.
*/
-public interface ISystemRemoteChangeEvents
+public interface ISystemRemoteChangeEvents
{
/**
* Event Type: a remote resource was added
*
* The event stores the following event parameters:
- *
* You can optionally pass a child remote object, or string, or Vector of
* objects or strings, in the "parent" parameter of the event, and it/they
- * will be selected after the refresh. When passing a string, it must be
+ * will be selected after the refresh. When passing a string, it must be
* the result of {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}
* on the adapter.
*
@@ -219,7 +222,7 @@ public interface ISystemResourceChangeEvents
* A source RSE object and it's parent RSE object are the expected parameters
*/
public static final int EVENT_PROPERTY_CHANGE = 86;
-
+
/**
* The event is a request to update the property sheet of whatever is currently selected.
* A source RSE object and it's parent RSE object are the expected parameters
@@ -232,31 +235,31 @@ public interface ISystemResourceChangeEvents
* be collapsed)
* A source RSE object is the expected parameter
*/
- public static final int EVENT_MUST_COLLAPSE = 90;
-
+ public static final int EVENT_MUST_COLLAPSE = 90;
+
/**
* The event is a full collapse of the RSE tree
* Pass "false" for the src value to prevent the memory flush, else
* pass any dummy value for the src to prevent crash, but it is ignored
*/
- public static final int EVENT_COLLAPSE_ALL = 91;
-
+ public static final int EVENT_COLLAPSE_ALL = 91;
+
/**
* The event is a collapse of the selected elements in the tree
* Pass any dummy value for the src to prevent crash, but it is ignored
*/
public static final int EVENT_COLLAPSE_SELECTED = 92;
-
+
/**
* The event is an expand of the selected elements in the tree
* Pass any dummy value for the src to prevent crash, but it is ignored
*/
public static final int EVENT_EXPAND_SELECTED = 93;
-
+
/**
* The event is a generic notification that the children have changed
* and must be refreshed.
- * A source RSE object and (optionally) it's parent RSE object are the
+ * A source RSE object and (optionally) it's parent RSE object are the
* expected parameters
*/
public static final int EVENT_CHANGE_CHILDREN = 95;
@@ -274,7 +277,7 @@ public interface ISystemResourceChangeEvents
* objects or strings. When passing a string, it must be the result of
* {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}
* on the adapter of the object.
- * The "parent" parameter can optionally hold a model object that is
+ * The "parent" parameter can optionally hold a model object that is
* the parent of the objects to be refreshed, in order to optimize searches.
*/
public static final int EVENT_SELECT_REMOTE = 101;
@@ -290,7 +293,7 @@ public interface ISystemResourceChangeEvents
* A source RSE object is the expected parameter
*/
public static final int EVENT_COMMAND_RUN = 110;
-
+
/**
* The event is to log a message from a command that has been run
* A source RSE object and it's parent RSE object are the expected parameters
@@ -298,14 +301,14 @@ public interface ISystemResourceChangeEvents
public static final int EVENT_COMMAND_MESSAGE = 115;
/**
- * The event is to replace the children (similar to EVENT_ADD_MANY), it will
+ * The event is to replace the children (similar to EVENT_ADD_MANY), it will
* expand also
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
+ * An array of RSE objects (i.e. Object[]) is the multi-source
+ * parameter (the source is the first item in that array) and a parent
+ * RSE object is expected.
*/
public static final int EVENT_REPLACE_CHILDREN = 120;
-
+
/**
* The event is to log a command that has been run
* @deprecated
@@ -325,28 +328,28 @@ public interface ISystemResourceChangeEvents
* @deprecated use EVENT_COMMAND_SHELL_FINISHED
*/
public static final int EVENT_COMMAND_FINISHED = 140;
-
+
/**
* The event is to update the remote shell view when a command is finished
* A source RSE object is the expected parameter
*/
public static final int EVENT_COMMAND_SHELL_FINISHED = 140;
-
+
/**
* The event is to indicate that a shell has been removed
* A source RSE object is the expected parameter
*/
public static final int EVENT_COMMAND_SHELL_REMOVED = 141;
-
+
/**
* The event is to update the search view when a search is finished
* A IHostSearchResultConfiguration is the expected parameter
*/
public static final int EVENT_SEARCH_FINISHED = 150;
- /**
- * Predefined event object for a property sheet update.
- */
- public static final ISystemResourceChangeEvent PROPERTYSHEET_UPDATE_EVENT =
- new SystemResourceChangeEvent("dummy",EVENT_PROPERTYSHEET_UPDATE,null); //$NON-NLS-1$
+ /**
+ * Predefined event object for a property sheet update.
+ */
+ public static final ISystemResourceChangeEvent PROPERTYSHEET_UPDATE_EVENT =
+ new SystemResourceChangeEvent("dummy",EVENT_PROPERTYSHEET_UPDATE,null); //$NON-NLS-1$
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
index 63f2a423889..23e6645fb24 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
@@ -7,12 +7,13 @@
*
* 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,
+ * 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) - cleanup format and javadoc
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.filters;
@@ -23,8 +24,8 @@ import org.eclipse.rse.core.references.IRSEReferencedObject;
/**
* A filter consists of filter strings and may be contained in a filter pool.
* Filter pools are referenced by subsystems.
- * Subsystems are responsible for interpreting the filters. Filters, in and
- * of themselves, provide no interpretation of themselves when applied
+ * Subsystems are responsible for interpreting the filters. Filters, in and
+ * of themselves, provide no interpretation of themselves when applied
* to the resources managed by a subsystem.
*/
@@ -33,7 +34,7 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/**
* Returns the value of the 'Name' attribute.
*
- * This is the name of the filter. It may be present in the user interface and is also
+ * This is the name of the filter. It may be present in the user interface and is also
* used to refer to the filter when it is persisted.
*
- * Filters may be further typed for use by subsystems. The type is also uninterpreted by the
+ * Filters may be further typed for use by subsystems. The type is also uninterpreted by the
* filter. The type may be used to select a parser/interpreter for the filter strings.
*
* Specifies whether filters may be nested or not. If nested the intent is to apply this filter
- * to the results of the parent filter - further restricting the resources selected by the
+ * to the results of the parent filter - further restricting the resources selected by the
* parent filter. However, it is up to the subsystem to interpret exactly what "nesting" means.
*
* Specifies whether filters may be nested or not. If nested the intent is to apply this filter
- * to the results of the parent filter - further restricting the resources selected by the
+ * to the results of the parent filter - further restricting the resources selected by the
* parent filter. However, it is up to the subsystem to interpret exactly what "nesting" means.
*
- * An attribute that may be used by the subystems when interpreting the filter.
+ * An attribute that may be used by the subystems when interpreting the filter.
* Typically used to indicate whether or not some sort of prompting is to occur when the
* filter is used. Typically used when applying a filter in the UI to indicate
- * the start of a wizard or dialog. It may also have an effect on whether
+ * the start of a wizard or dialog. It may also have an effect on whether
* the state of the filter is saved when the workbench is shut down.
*
- * An attribute that may be used by the subystems when interpreting the filter.
+ * An attribute that may be used by the subystems when interpreting the filter.
* Typically used to indicate whether or not some sort of prompting is to occur when the
* filter is used. Typically used when applying a filter in the UI to indicate
- * the start of a wizard or dialog. It may also have an effect on whether
+ * the start of a wizard or dialog. It may also have an effect on whether
* the state of the filter is saved when the workbench is shut down.
*
- * This is an attribute specifying the release level of the
+ * This is an attribute specifying the release level of the
* filter. This will be persisted in the filter definition and
* can be used to migrate the internal form of the filter.
*
- * This is an attribute specifying the release level of the
+ * This is an attribute specifying the release level of the
* filter. This will be persisted in the filter definition and
* can be used to migrate the internal form of the filter.
*
- * This attribute specifies that the filter may contain only a single
- * filter string. Used by a filter manager to ensure that the
+ * This attribute specifies that the filter may contain only a single
+ * filter string. Used by a filter manager to ensure that the
* filter contains only one string. May, alternatively, be enforced
* by the filter implementation.
*
@@ -408,12 +409,12 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/**
* Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly Single Filter String Only}' attribute.
*
- * This attribute specifies that the filter may contain only a single
- * filter string. Used by a filter manager to ensure that the
+ * This attribute specifies that the filter may contain only a single
+ * filter string. Used by a filter manager to ensure that the
* filter contains only one string. May, alternatively, be enforced
* by the filter implementation.
*
- * This causes the attribute to be set for this filter, ignoring the value
+ * This causes the attribute to be set for this filter, ignoring the value
* specified for the parent filter pool.
*
- * If this filter can contain child filters this will return the list of children.
+ * If this filter can contain child filters this will return the list of
+ * children.
*
- * If this filter can be nested inside another this will return the parent filter. Will be
+ * If this filter can be nested inside another this will return the parent filter. Will be
* null if there is no parent.
*
* Does the following:
@@ -235,7 +238,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
* Calls back to provider to inform of the event (filterEventFilterCreated)
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * Creates a new system filter within the given filter container (either a
+ * filter pool, or a filter). This creates the filter, and then saves the
+ * filter pool.
+ *
+ * Calls back to provider to inform of the event (filterEventFilterCreated)
+ *
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings) throws Exception;
/**
- * Creates a new system filter within the given filter container (either a filter pool, or
- * a filter). This creates the filter, and then saves the filter pool.
- * Calls back to provider to inform of the event (filterEventFilterCreated)
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * Creates a new system filter within the given filter container (either a
+ * filter pool, or a filter). This creates the filter, and then saves the
+ * filter pool.
+ *
+ * Calls back to provider to inform of the event (filterEventFilterCreated)
+ *
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings) throws Exception;
/**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String, String[])} but
- * takes a filter type as an additional parameter.
+ * Creates a new system filter that is typed. Same as
+ * {@link #createSystemFilter(ISystemFilterContainer, String, String[])} but
+ * takes a filter type as an additional parameter.
*
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
+ * A filter's type is an arbitrary string that is not interpreted or used by
+ * the base framework. This is for use entirely by tools who wish to support
+ * multiple types of filters and be able to launch unique actions per type,
+ * say.
*
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
* @param type The type of this filter
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings, String type) throws Exception;
/**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String, String[])} but
- * takes a filter type as an additional parameter.
+ * Creates a new system filter that is typed. Same as
+ * {@link #createSystemFilter(ISystemFilterContainer, String, String[])} but
+ * takes a filter type as an additional parameter.
*
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
+ * A filter's type is an arbitrary string that is not interpreted or used by
+ * the base framework. This is for use entirely by tools who wish to support
+ * multiple types of filters and be able to launch unique actions per type,
+ * say.
*
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
* @param type The type of this filter
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings, String type) throws Exception;
/**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,String[], String)} but
- * takes a boolean indicating if it is promptable.
+ * Creates a new system filter that is typed and promptable Same as
+ * {@link #createSystemFilter(ISystemFilterContainer, String ,String[], String)}
+ * but takes a boolean indicating if it is promptable.
*
- * A promptable filter is one in which the user is prompted for information at expand time.
- * There is no base filter framework support for this, but tools can query this attribute and
- * do their own thing at expand time.
+ * A promptable filter is one in which the user is prompted for information
+ * at expand time. There is no base filter framework support for this, but
+ * tools can query this attribute and do their own thing at expand time.
*
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
* @param type The type of this filter
* @param promptable Pass true if this is a promptable filter
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings, String type, boolean promptable) throws Exception;
/**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,String[], String)} but
- * takes a boolean indicating if it is promptable.
+ * Creates a new system filter that is typed and promptable Same as
+ * {@link #createSystemFilter(ISystemFilterContainer, String ,String[], String)}
+ * but takes a boolean indicating if it is promptable.
*
- * A promptable filter is one in which the user is prompted for information at expand time.
- * There is no base filter framework support for this, but tools can query this attribute and
- * do their own thing at expand time.
+ * A promptable filter is one in which the user is prompted for information
+ * at expand time. There is no base filter framework support for this, but
+ * tools can query this attribute and do their own thing at expand time.
*
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
+ * @param parent The parent which is either a SystemFilterPool or a
+ * SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this
+ * pool.
+ * @param filterStrings The list of String objects that represent the filter
+ * strings.
* @param type The type of this filter
* @param promptable Pass true if this is a promptable filter
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings, String type, boolean promptable) throws Exception;
@@ -350,7 +385,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
public boolean deleteSystemFilter(ISystemFilter filter) throws Exception;
/**
- * Renames a filter. This is better than filter.setName(String newName) as it
+ * Renames a filter. This is better than filter.setName(String newName) as it
* saves the parent pool to disk.
*
* Does the following:
@@ -404,7 +439,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
/**
* Move existing filters a given number of positions in the same container.
- * If the delta is negative, they are all moved up by the given amount. If
+ * If the delta is negative, they are all moved up by the given amount. If
* positive, they are all moved down by the given amount.
*
* Does the following:
@@ -524,7 +559,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
/**
* Move existing filter strings a given number of positions in the same filter
- * If the delta is negative, they are all moved up by the given amount. If
+ * If the delta is negative, they are all moved up by the given amount. If
* positive, they are all moved down by the given amount.
*
* Does the following:
@@ -546,31 +581,31 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
public void suspendCallbacks(boolean suspend);
/**
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @return The value of the SupportsNestedFilters attribute
*/
boolean isSupportsNestedFilters();
/**
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @param value The new value of the StringsCaseSensitive attribute
*/
void setStringsCaseSensitive(boolean value);
/**
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @return The value of the SupportsDuplicateFilterStrings attribute
*/
boolean isSupportsDuplicateFilterStrings();
/**
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* Unsets the SupportsDuplicateFilterStrings attribute
*/
void unsetSupportsDuplicateFilterStrings();
/**
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @return true if the SupportsDuplicateFilterStrings attribute has been set
*/
boolean isSetSupportsDuplicateFilterStrings();
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
index 83daeecf138..705d303750e 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation and others.
+ * 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
@@ -7,8 +7,8 @@
*
* 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,
+ * 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:
@@ -26,9 +26,6 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
* offering convenience versions of the parent methods that are typed to the
* classes in the filters framework.
*/
-/**
- * @lastgen interface SystemFilterPoolReferenceManager extends SystemPersistableReferenceManager {}
- */
public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableReferenceManager {
/**
* Get the object which instantiated this instance of the filter pool reference manager.
@@ -54,7 +51,7 @@ public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableRe
/*
* Set the managers of the master list of filter pools, from which
* objects in this list reference.
- * NOW DELETED SO THAT WE DYNAMICALLY QUERY THIS LIST FROM THE
+ * NOW DELETED SO THAT WE DYNAMICALLY QUERY THIS LIST FROM THE
* ASSOCIATED SYSTEMFILTERPOOLMANAGER PROVIDER, SO IT IS ALWAYS UP
* TO DATE. psc.
*/
@@ -124,7 +121,7 @@ public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableRe
public void setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences, boolean deReference);
/**
- * Add a filter pool referencing object to the list.
+ * Add a filter pool referencing object to the list.
* @return the new count of referencing objects
*/
public int addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference);
@@ -160,7 +157,7 @@ public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableRe
/**
* Move existing filter pool references a given number of positions.
- * If the delta is negative, they are all moved up by the given amount. If
+ * If the delta is negative, they are all moved up by the given amount. If
* positive, they are all moved down by the given amount.
* Calls back to inform provider
* @param filterPoolRefs Array of SystemFilterPoolReferences to move.
@@ -243,14 +240,14 @@ public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableRe
/**
* Given a filter reference, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
+ * when you think of all filter references from all filter pool references as
* being concatenated
*/
public int getSystemFilterReferencePosition(ISystemFilterReference filterRef);
/**
* Given a filter, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
+ * when you think of all filter references from all filter pool references as
* being concatenated
*/
public int getSystemFilterReferencePosition(ISubSystem subSystem, ISystemFilter filter);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
index 6706e28484d..f730ff9dc95 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.filters;
@@ -16,7 +17,7 @@ import org.eclipse.rse.logging.Logger;
public interface ISystemFilterStartHere {
/**
- * Factory to create a filter pool manager, when you do NOT want it to worry about
+ * Factory to create a filter pool manager, when you do NOT want it to worry about
* saving and restoring the filter data to disk. Rather, you will save and restore
* yourself.
* @param logger A logging object into which to log errors as they happen in the framework
@@ -27,23 +28,27 @@ public interface ISystemFilterStartHere {
* @param name the name of the filter pool manager. Not currently used but you may
* find a use for it.
* @param allowNestedFilters true if filters inside filter pools in this manager are
- * to allow nested filters. This is the default, but can be overridden at the
+ * to allow nested filters. This is the default, but can be overridden at the
* individual filter pool level.
*/
public ISystemFilterPoolManager createSystemFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name, boolean allowNestedFilters);
/**
- * Create a SystemFilterPoolReferenceManager instance, when you do NOT want it
- * to be saved and restored to its own file. Rather, you will save and restore it
- * yourself.
+ * Create a SystemFilterPoolReferenceManager instance, when you do NOT want
+ * it to be saved and restored to its own file. Rather, you will save and
+ * restore it yourself.
+ *
* @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param relatedPoolMgrProvider The creator of the managers that own the master list of filter pools that
- * this manager will contain references to.
- * @param name the name of the filter pool reference manager. This is not currently
- * used, but you may find a use for it.
+ * SystemFilterPoolReferenceManagerProvider interface, and pass
+ * "this" for this parameter. Given any filter framework object,
+ * it is possible to retrieve the caller's object via the
+ * getProvider method call.
+ * @param relatedPoolMgrProvider The creator of the managers that own the
+ * master list of filter pools that this manager will contain
+ * references to.
+ * @param name the name of the filter pool reference manager. This is not
+ * currently used, but you may find a use for it.
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller, ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
String name);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
index 306f463a423..410eb582138 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
@@ -7,13 +7,14 @@
*
* 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,
+ * 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 commitSystemProfile operation to interface
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.model;
@@ -21,10 +22,12 @@ package org.eclipse.rse.core.model;
import org.eclipse.core.runtime.IStatus;
/**
- * Manages a list of SystemProfile objects. System profiles
- * should be created, deleted, restored, activated, and deactivated though
- * this interface if event processing is not desired. If events are necessary
- * then the system registry should be used.
+ * Manages a list of SystemProfile objects. System profiles should be created,
+ * deleted, restored, activated, and deactivated though this interface if event
+ * processing is not desired. If events are necessary then the system registry
+ * should be used.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISystemProfileManager {
@@ -101,7 +104,7 @@ public interface ISystemProfileManager {
/**
* Delete the given profile. The default private profile cannot be deleted and such a request will be ignored.
* @param profile the name of the profile to delete.
- * @param persist true if the deletion is meant to be persisted as well, false if the deletion is just in the
+ * @param persist true if the deletion is meant to be persisted as well, false if the deletion is just in the
* model.
*/
public void deleteSystemProfile(ISystemProfile profile, boolean persist);
@@ -113,11 +116,13 @@ public interface ISystemProfileManager {
* @return the new profile
*/
public ISystemProfile cloneSystemProfile(ISystemProfile profile, String newName);
-
+
/**
* Commit a system profile
+ *
* @param profile the profile to commit
* @return a status object indicating the result of the commit
+ * @since org.eclipse.rse.core 3.0
*/
public IStatus commitSystemProfile(ISystemProfile profile);
@@ -131,8 +136,8 @@ public interface ISystemProfileManager {
/**
* Adds a system profile to this profile manager.
- * @param profile The system profile to add.
+ * @param profile The system profile to add.
*/
public void addSystemProfile(ISystemProfile profile);
-
+
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
index 121ce9e0668..ba639a700dc 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
@@ -25,6 +25,7 @@
* David Dykstal (IBM) - [217556] remove service subsystem types
* Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.model;
@@ -102,24 +103,34 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
/**
* Return all subsystem configurations which support the given system type.
- * If the type is null, returns all subsystem confgurations.
- * Fully equivalent to getSubSystemConfigurationsBySystemType(systemType, filterDuplicates,
- * @param profileName Name of the system profile to which the host is to be added.
+ *
+ * @param profileName Name of the system profile to which the host is to be
+ * added.
* @param systemType system type of the new host.
* @param hostName unique host name within the profile.
* @param hostAddress ip name of host.
* @param description optional description of the connection. May be null.
- * @param createSubSystems
* A connector service manages a live connection to a remote system, with
* operations for connecting and disconnecting, and storing information
* typically cached from a subsystem: credentials (such as a userId/password),
* port, etc.
*
- * The SubSystem interface includes a method, getConnectorService(),
- * which returns an instance of an object that implements this interface
- * for that subsystem.
+ * The SubSystem interface includes a method, getConnectorService(), which
+ * returns an instance of an object that implements this interface for that
+ * subsystem.
*
* A single connector service object can be unique to a subsystem instance, but
* it can also be shared across multiple subsystems in a single host if those
- * subsystems share a physical connection to the remote system.
- * This sharing is done using implementers of {@link IConnectorServiceManager}
- * which are returned by another getter method in SubSystem.
+ * subsystems share a physical connection to the remote system. This sharing is
+ * done using implementers of {@link IConnectorServiceManager} which are
+ * returned by another getter method in SubSystem.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * Clients should subclass {@link AbstractConnectorService}
+ * instead.
*/
public interface IConnectorService extends IRSEModelObject {
@@ -121,7 +126,7 @@ public interface IConnectorService extends IRSEModelObject {
/**
* Sets the host used by this connector service.
- * @param host
+ * @param host
*/
public void setHost(IHost host);
@@ -150,13 +155,13 @@ public interface IConnectorService extends IRSEModelObject {
public void setPort(int port);
/**
- * @return true if this connector service will attempt to
+ * @return true if this connector service will attempt to
* use SSL when establishing its connection.
*/
public boolean isUsingSSL();
/**
- * @param flag true if the connector service should attempt to use SSL when
+ * @param flag true if the connector service should attempt to use SSL when
* establishing the connection.
*/
public void setIsUsingSSL(boolean flag);
@@ -170,7 +175,7 @@ public interface IConnectorService extends IRSEModelObject {
/**
* Determines if this connector service understand the concept of a password.
- * @return true if the connector service can use a password,
+ * @return true if the connector service can use a password,
* false if a password is irrelevant.
*/
public boolean supportsPassword();
@@ -195,7 +200,7 @@ public interface IConnectorService extends IRSEModelObject {
public void saveUserId();
/**
- * Causes the persisted (default) user id known to this
+ * Causes the persisted (default) user id known to this
* connector service, if any, to be forgotten.
*/
public void removeUserId();
@@ -210,25 +215,25 @@ public interface IConnectorService extends IRSEModelObject {
* @param propagate true if this password should be propagated to related connector services.
*/
public void setPassword(String matchingUserId, String password, boolean persist, boolean propagate);
-
+
/**
- * Causes the password known to this connector service, if any, to be
+ * Causes the password known to this connector service, if any, to be
* persisted.
*/
public void savePassword();
-
+
/**
- * Causes the persisted password known to this connector service, if any, to
+ * Causes the persisted password known to this connector service, if any, to
* be forgotten.
*/
public void removePassword();
-
+
/**
- * Clear password held by this service and optionally
- * clear its persistent form.
- * Called when user uses the property dialog to
- * change his userId.
- * @param persist if true, clears the persistent form of the password
+ * Clear password held by this service and optionally
+ * clear its persistent form.
+ * Called when user uses the property dialog to
+ * change his userId.
+ * @param persist if true, clears the persistent form of the password
* @param propagate true if this password should be cleared in related connector services.
*/
public void clearPassword(boolean persist, boolean propagate);
@@ -268,7 +273,7 @@ public interface IConnectorService extends IRSEModelObject {
* Implementations may retain a remembered credentials or
* use this acquire the credentials using some implementation defined means.
*
- * Throws InterruptedException if acquisition of the
+ * Throws InterruptedException if acquisition of the
* credentials is canceled or is being suppressed.
* @param refresh if true will force the connector service to discard
* any remembered value and reacquire the credentials.
@@ -285,9 +290,9 @@ public interface IConnectorService extends IRSEModelObject {
* Causes {@link #acquireCredentials(boolean)} to immediately
* throw an InterruptedException.
*
- * The intent is to allow tool writers to prevent multiple
+ * The intent is to allow tool writers to prevent multiple
* attempts to acquire credentials during a set period of time.
- * It is the responsibility of the caller to set this value
+ * It is the responsibility of the caller to set this value
* back to false when the tool no longer needs to suppress
* acquisition credentials.
*
@@ -315,7 +320,7 @@ public interface IConnectorService extends IRSEModelObject {
* called for this server launch type, then it is enabled by default.
* @param subsystem the subystem for which this may be enabled.
* @param serverLaunchType the type to check for enabledment.
- * @return true if the connector service supports server launching and
+ * @return true if the connector service supports server launching and
* this launch type is enabled.
* @see org.eclipse.rse.core.subsystems.ServerLaunchType
*/
@@ -334,7 +339,7 @@ public interface IConnectorService extends IRSEModelObject {
/**
* Set the properties for the remote server launcher
* This is an object containing
- * properties used to launch a remote server that
+ * properties used to launch a remote server that
* communicates with this client.
* @param value the new value of the 'Remote Server Launcher' containment reference.
*/
@@ -349,7 +354,7 @@ public interface IConnectorService extends IRSEModelObject {
* @return true if the connector service supports the concept of remote
* server launch properties.
* This will always return false {@link #supportsRemoteServerLaunching()}
- * is false.
+ * is false.
*/
boolean supportsServerLaunchProperties();
@@ -358,7 +363,7 @@ public interface IConnectorService extends IRSEModelObject {
* server launching.
*/
boolean supportsRemoteServerLaunching();
-
+
/**
* @return the server launcher. Will be null unless
* {@link #supportsRemoteServerLaunching()} is true.
@@ -367,14 +372,14 @@ public interface IConnectorService extends IRSEModelObject {
/**
* Test if this connector service requires a password.
- * @return true if this connector service supports passwords and
+ * @return true if this connector service supports passwords and
* requires a password to connect to its target system.
*/
boolean requiresPassword();
/**
* Test if this connector service requires a user id.
- * @return true if this connector service understands the concept of a
+ * @return true if this connector service understands the concept of a
* user id and requires one to connect to its target system.
*/
boolean requiresUserId();
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
index fdb5547242b..33619c855e0 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,18 +7,25 @@
*
* 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,
+ * 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.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.subsystems;
import org.eclipse.rse.core.model.IHost;
+/**
+ * Connector Service Manager Interface.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * Clients should subclass {@link AbstractConnectorServiceManager}
+ * instead.
+ */
public interface IConnectorServiceManager {
IConnectorService getConnectorService(IHost host, Class commonSSinterface);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java
index 1b2b89e788e..541ee1c197c 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java
@@ -1,7 +1,7 @@
/********************************************************************************
* Copyright (c) 2007 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
+ * 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:
@@ -14,10 +14,10 @@
package org.eclipse.rse.core.subsystems;
/**
- * A delegating connector service forwards all requests for infomation
- * to another connector service.
+ * A delegating connector service forwards all requests for information to
+ * another connector service.
*/
-public interface IDelegatingConnectorService extends IConnectorService
+public interface IDelegatingConnectorService extends IConnectorService
{
/**
* @return the connector service that this connector service will
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
index 8a651ef8127..43bc023cfde 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -7,24 +7,26 @@
*
* 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,
+ * 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.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.subsystems;
/**
- * Constants used in the remote file system support
+ * Constants used in the remote file system support.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface IFileConstants {
// ---------------------------------------
// UNIX FILE SYSTEM ATTRIBUTE CONSTANTS...
- // ---------------------------------------
+ // ---------------------------------------
/**
* Unix-style folder-name separator as a string: "/"
*/
@@ -48,7 +50,7 @@ public interface IFileConstants {
// ------------------------------------------
// WINDOWS FILE SYSTEM ATTRIBUTE CONSTANTS...
- // ------------------------------------------
+ // ------------------------------------------
/**
* Windows-style folder-name separator as a string: "\"
*/
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
index 7fbb1de0449..08dc7ccfcbe 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
@@ -1,18 +1,19 @@
/********************************************************************************
- * 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
+ * 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,
+ * 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) - [182454] improve getAbsoluteName() documentation
- * David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
+ * David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -32,65 +33,73 @@ public interface IRemoteObjectResolver {
* Return the remote object that corresponds to the specified unique ID.
*
* This must be implemented by subsystems in order to find remote objects
- * for drag and drop, clipboard, and other object retrieval mechanisms
- * in support of remote objects. It is the functional opposite of
+ * for drag and drop, clipboard, and other object retrieval mechanisms in
+ * support of remote objects. It is the functional opposite of
* {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}.
- *
- * Because each subsystem maintains it's own objects, it is the
- * responsibility of the subsystem to determine how an ID (or key)
- * for a given object maps to the real object. Subsystems also need
- * to ensure that objects of different type (such as filters, actual
- * resources or error messages) all have different IDs. See
- * {@link IRemoteObjectIdentifier#getAbsoluteName(Object)} for an
- * example.
- *
- * In case a cached copy of remote object is available locally,
- * this method will not contact the remote side
- * in order to check whether the cached copy is up-to-date.
- * Clients are responsible themselves for refreshing the remote
- * object when they think it is necessary.
- *
- * In case a cached local copy is not available, the remote system
- * may be contacted to retrieve the remote object. In this case,
- * this call may be a long-running operation and may throw an
- * exception. Note, however, that since keys used as IDs are
- * generated by a remote object adapter that implements
- * {@link IRemoteObjectIdentifier}, a cached copy of the remote
- * object will typically be in memory from generating the key.
- * A notable exception to this case is when the system view is
- * restored to its previous state during startup.
* Uniqueness and Multiple Contexts
+ * Because each subsystem maintains it's own objects, it is the
+ * responsibility of the subsystem to determine how an ID (or key) for a
+ * given object maps to the real object. Subsystems also need to ensure that
+ * objects of different type (such as filters, actual resources or error
+ * messages) all have different IDs. See
+ * {@link IRemoteObjectIdentifier#getAbsoluteName(Object)} for an example.
*
+ * In case a cached copy of remote object is available locally, this method
+ * will not contact the remote side in order to check
+ * whether the cached copy is up-to-date. Clients are responsible themselves
+ * for refreshing the remote object when they think it is necessary.
+ *
+ * In case a cached local copy is not available, the remote system may be
+ * contacted to retrieve the remote object. In this case, this call may be a
+ * long-running operation and may throw an exception. Note, however, that
+ * since keys used as IDs are generated by a remote object adapter that
+ * implements {@link IRemoteObjectIdentifier}, a cached copy of the remote
+ * object will typically be in memory from generating the key. A notable
+ * exception to this case is when the system view is restored to its
+ * previous state during startup.
+ *
+ * Uniqueness and Multiple Contexts
@@ -254,20 +267,20 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
/**
* Return true if the given filter string lists the contents of the given remote object.
* For example, if given a folder, return true if the given filter string
- * lists the contents of that folder. Used in impact analysis when a remote object is
+ * lists the contents of that folder. Used in impact analysis when a remote object is
* created, deleted, renamed, copied or moved, so as to establish which filters need to be
* refreshed or collapsed (if the folder is deleted, say).
*/
public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName);
/**
- * Return true if the given remote object name will pass the filtering criteria for any of
+ * Return true if the given remote object name will pass the filtering criteria for any of
* the filter strings in this filter.
*/
public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName);
/**
- * Return true if the given remote object name will pass the filtering criteria for the
+ * Return true if the given remote object name will pass the filtering criteria for the
* given filter string in this filter.
*/
public boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive);
@@ -334,11 +347,11 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
public boolean supportsCaching();
/**
- * Return the CacheManager for this subsystem. If the SubSystem returns true for
+ * Return the CacheManager for this subsystem. If the SubSystem returns true for
* supportsCaching() then it must return a valid CacheManager, otherwise it is free
* to return null.
*
- * @see #supportsCaching()
+ * @see #supportsCaching()
*/
public ICacheManager getCacheManager();
@@ -363,7 +376,7 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
*/
public boolean isOffline();
-
+
/**
* Synchronously connect to the remote system.
*
@@ -384,16 +397,16 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
/**
- * Asynchronously connect to the remote system, optionally forcing a signon prompt
+ * Asynchronously connect to the remote system, optionally forcing a signon prompt
* even if the password is cached in memory or on disk.
- *
* The server code is to be launched by calling a daemon that is listening on a port.
- *
- * The server code is to be launched using REXEC
- *
* The server code is to already running, and doesn't need to be launched.
- *
* The server code is to be launched using TELNET.
- *
* If the meaning of 'SSH' literal object isn't clear,
* there really should be more of a description here...
- *
- * The server code is to be launched using FTP
- *
- * The server code is to be launched using HTTP
- *
- * This is called AFTER the profile is renamed!
- */
- public void renamingProfile(String oldName, String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey!=null)
- userIdValue = getLocalUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(newName, getHostAliasName());
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
-
- // now we need to potentially rename any filter pool associated with this connection...
+ /**
+ * The profile is being renamed, so we are called to do our thing with
+ * any information stored that is keyed by the profile name.
+ *
+ * This is called AFTER the profile is renamed!
+ */
+ public void renamingProfile(String oldName, String newName)
+ {
+ String userIdValue = null;
+ if (previousUserIdKey!=null)
+ userIdValue = getLocalUserId(previousUserIdKey);
+ // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
+ // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
+ // value (the actual user id) the old keyed entry held.
+ String newKey = getPreferencesKey(newName, getHostAliasName());
+ if ((userIdValue != null) && (userIdValue.length()>0))
+ {
+ RSEPreferencesManager.clearUserId(previousUserIdKey);
+ RSEPreferencesManager.setUserId(newKey, userIdValue); // store old value with new preference key
+ }
+ previousUserIdKey = newKey;
+
+ // now we need to potentially rename any filter pool associated with this connection...
ISystemProfile profile = getSystemProfile();
ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(profile);
ISystemFilterPool[] pools = mgr.getSystemFilterPools();
@@ -310,8 +310,8 @@ public abstract class SubSystem extends RSEModelObject
{
for (int idx = 0; !done && (idx < pools.length); idx++)
{
- if ( (pools[idx].getOwningParentName()!=null) && // a connection-related pool
- (pools[idx].getOwningParentName().equals(getHostAliasName())) ) // this connection!
+ if ( (pools[idx].getOwningParentName()!=null) && // a connection-related pool
+ (pools[idx].getOwningParentName().equals(getHostAliasName())) ) // this connection!
{
done = true;
try
@@ -327,43 +327,43 @@ public abstract class SubSystem extends RSEModelObject
}
}
}
- }
- }
- /**
- * The connection is being renamed, so we are called to do our thing with
- * any information stored that is keyed by the connection name.
- */
- public void renamingConnection(String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey != null)
- userIdValue = getLocalUserId(previousUserIdKey); // see if we previous stored a value for this connection
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(getSystemProfileName(), newName);
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
-
- // rename the connection-private filter pool, if it exists:
- ISystemFilterPool privatePool = getConnectionPrivateFilterPool(false); // false => don't create if not found
- if (privatePool != null)
- {
- ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(getSystemProfile());
- privatePool.setOwningParentName(newName);
- try {
+ }
+ }
+ /**
+ * The connection is being renamed, so we are called to do our thing with
+ * any information stored that is keyed by the connection name.
+ */
+ public void renamingConnection(String newName)
+ {
+ String userIdValue = null;
+ if (previousUserIdKey != null)
+ userIdValue = getLocalUserId(previousUserIdKey); // see if we previous stored a value for this connection
+ // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
+ // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
+ // value (the actual user id) the old keyed entry held.
+ String newKey = getPreferencesKey(getSystemProfileName(), newName);
+ if ((userIdValue != null) && (userIdValue.length()>0))
+ {
+ RSEPreferencesManager.clearUserId(previousUserIdKey);
+ RSEPreferencesManager.setUserId(newKey, userIdValue); // store old value with new preference key
+ }
+ previousUserIdKey = newKey;
+
+ // rename the connection-private filter pool, if it exists:
+ ISystemFilterPool privatePool = getConnectionPrivateFilterPool(false); // false => don't create if not found
+ if (privatePool != null)
+ {
+ ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(getSystemProfile());
+ privatePool.setOwningParentName(newName);
+ try {
mgr.renameSystemFilterPool(privatePool, getConnectionOwnedFilterPoolName(getSystemProfileName(), newName));
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error renaming conection-private pool to: "+newName, exc); //$NON-NLS-1$
- }
- }
- }
+ }
+ catch (Exception exc)
+ {
+ SystemBasePlugin.logError("Error renaming conection-private pool to: "+newName, exc); //$NON-NLS-1$
+ }
+ }
+ }
/**
* Private method called when the parent connection is being deleted, so
* the subsystem can do any pre-death cleanup it needs to.
@@ -372,28 +372,28 @@ public abstract class SubSystem extends RSEModelObject
*/
public void deletingConnection()
{
- String oldUserId = null;
- if (previousUserIdKey != null)
- oldUserId = getLocalUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- if (oldUserId != null)
- {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- }
+ String oldUserId = null;
+ if (previousUserIdKey != null)
+ oldUserId = getLocalUserId(previousUserIdKey);
+ // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
+ // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
+ // value (the actual user id) the old keyed entry held.
+ if (oldUserId != null)
+ {
+ RSEPreferencesManager.clearUserId(previousUserIdKey);
+ }
// delete the connection-private filter pool, if it exists:
ISystemFilterPool privatePool = getConnectionPrivateFilterPool(false); // false => don't create if not found
if (privatePool != null)
{
ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(getSystemProfile());
- try {
+ try {
mgr.deleteSystemFilterPool(privatePool);
}
catch (Exception exc)
{
SystemBasePlugin.logError("Error deleting conection-private pool for: "+getHostAliasName(), exc); //$NON-NLS-1$
- }
+ }
}
}
@@ -401,106 +401,105 @@ public abstract class SubSystem extends RSEModelObject
* Returns the value of this subsystem's local user id if it is not null. If it
* is null, it returns the parent connection object's default user Id. It in turn
* queries the preferences if its local value is null.
- *
- * In fact, we now don't store the user Id in the subsystem object itself, but rather store it in the
- * user preferences, so that such things are not shared among the team on a synchronize operation.
- * This is transparent to callers of this method however, as this method resolves from the preferences.
- *
+ *
+ * In fact, we now don't store the user Id in the subsystem object itself, but rather store it in the
+ * user preferences, so that such things are not shared among the team on a synchronize operation.
+ * This is transparent to callers of this method however, as this method resolves from the preferences.
+ *
* @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
* @see #getLocalUserId()
* @see #clearLocalUserId()
* @return The value of the UserId attribute
*/
- public String getUserId()
- {
- String uid = getLocalUserId();
- if ((uid == null) || (uid.length()==0))
- {
- IHost conn = getHost();
- uid = conn.getDefaultUserId();
- }
- return uid;
- }
+ public String getUserId()
+ {
+ String uid = getLocalUserId();
+ if ((uid == null) || (uid.length()==0))
+ {
+ IHost conn = getHost();
+ uid = conn.getDefaultUserId();
+ }
+ return uid;
+ }
- /**
- * Helper method to compute a unique name for a given subsystem instance
- */
- protected String getPreferencesKey()
- {
- if ((_host==null) || (getName()==null))
- return null;
- return getPreferencesKey(getSystemProfileName(), getHostAliasName());
- }
- /**
- * Helper method to compute a unique name for a given subsystem instance, given a profile and connection name
- */
- protected String getPreferencesKey(String profileName, String connectionName)
- {
- String key = profileName + "." + connectionName + "." + getName(); //$NON-NLS-1$ //$NON-NLS-2$
- //System.out.println("in SubSystemImpl.getPreferencesKey(): Subsystem key name: " + key);
- return key;
- }
+ /**
+ * Helper method to compute a unique name for a given subsystem instance
+ */
+ protected String getPreferencesKey()
+ {
+ if ((_host==null) || (getName()==null))
+ return null;
+ return getPreferencesKey(getSystemProfileName(), getHostAliasName());
+ }
+ /**
+ * Helper method to compute a unique name for a given subsystem instance, given a profile and connection name
+ */
+ protected String getPreferencesKey(String profileName, String connectionName)
+ {
+ String key = profileName + "." + connectionName + "." + getName(); //$NON-NLS-1$ //$NON-NLS-2$
+ //System.out.println("in SubSystemImpl.getPreferencesKey(): Subsystem key name: " + key);
+ return key;
+ }
- /**
- * Internal-use method for getting the local user ID, without resolution.
- */
- protected String getLocalUserId(String key)
- {
- String uid = null;
- if ((key!=null) && (key.length()>0))
- {
- uid = RSEPreferencesManager.getUserId(key); // resolve from preferences
- }
- return uid;
- }
+ /**
+ * Internal-use method for getting the local user ID, without resolution.
+ */
+ protected String getLocalUserId(String key)
+ {
+ String uid = null;
+ if ((key!=null) && (key.length()>0))
+ {
+ uid = RSEPreferencesManager.getUserId(key); // resolve from preferences
+ }
+ return uid;
+ }
- /**
- * Alternative to getUserId when we don't want to resolve it from parent connection.
- * This is used when showing the properties.
- *
- * Unlike getUserId() this one does not defer to the connection's default user Id if
- * the subsystem's userId attribute is null.
- *
- * To set the local user Id, simply call setUserId(String id). To clear it, call
- * {@link #clearLocalUserId()}.
- *
+ /**
+ * Alternative to getUserId when we don't want to resolve it from parent connection.
+ * This is used when showing the properties.
+ *
+ * Unlike getUserId() this one does not defer to the connection's default user Id if
+ * the subsystem's userId attribute is null.
+ *
+ * To set the local user Id, simply call setUserId(String id). To clear it, call
+ * {@link #clearLocalUserId()}.
+ *
* @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
* @see #clearLocalUserId()
* @see #getUserId()
- */
- public String getLocalUserId()
- {
- return getLocalUserId(getPreferencesKey());
- }
+ */
+ public String getLocalUserId()
+ {
+ return getLocalUserId(getPreferencesKey());
+ }
- /**
- * Called to clear the local user Id such that subsequent requests to getUserId() will
- * return the parent connection's default user Id. Sets the user Id attribute for this
- * subsystem to null.
- *
+ /**
+ * Called to clear the local user Id such that subsequent requests to getUserId() will
+ * return the parent connection's default user Id. Sets the user Id attribute for this
+ * subsystem to null.
+ *
* @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
* @see #getUserId()
* @see #getLocalUserId()
- */
- public void clearLocalUserId()
- {
- if (previousUserIdKey != null)
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- IConnectorService system = getConnectorService();
- if (system != null)
- system.clearCredentials();
- }
+ */
+ public void clearLocalUserId()
+ {
+ if (previousUserIdKey != null)
+ RSEPreferencesManager.clearUserId(previousUserIdKey);
+ IConnectorService system = getConnectorService();
+ if (system != null)
+ system.clearCredentials();
+ }
- /**
- * This is a helper method you can call when performing actions that must be certain there
- * is a connection. If there is no connection it will attempt to connect, and if that fails
- * will throw a SystemMessageException you can easily display to the user by using a method
- * in it.
- */
- public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
- {
- if (!isConnected())
- {
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.rse.core.subsystems.ISubSystem#checkIsConnected(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
+ {
+ if (!isConnected())
+ {
try
{
if (monitor != null)
@@ -520,35 +519,35 @@ public abstract class SubSystem extends RSEModelObject
connect(new NullProgressMonitor(), false);
}
}
- }
- catch (Exception e)
- {
- if (e instanceof SystemMessageException)
- {
- throw (SystemMessageException) e;
- }
- else
- if (e instanceof InterruptedException)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELED, getHost().getAliasName());
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELED,
- IStatus.CANCEL, msgTxt);
- throw new SystemMessageException(msg);
- }
- else
- {
- String msgTxt = CommonMessages.MSG_DISCONNECT_FAILED;
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_FAILED,
- IStatus.ERROR, msgTxt);
- throw new SystemMessageException(msg);
- }
- }
- }
- }
+ }
+ catch (Exception e)
+ {
+ if (e instanceof SystemMessageException)
+ {
+ throw (SystemMessageException) e;
+ }
+ else
+ if (e instanceof InterruptedException)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELED, getHost().getAliasName());
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_CONNECT_CANCELED,
+ IStatus.CANCEL, msgTxt);
+ throw new SystemMessageException(msg);
+ }
+ else
+ {
+ String msgTxt = CommonMessages.MSG_DISCONNECT_FAILED;
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_DISCONNECT_FAILED,
+ IStatus.ERROR, msgTxt);
+ throw new SystemMessageException(msg);
+ }
+ }
+ }
+ }
- /**
+ /**
* This is the method required by the IAdaptable interface.
* Given an adapter class type, return an object castable to the type, or
* null if this is not possible.
@@ -557,10 +556,10 @@ public abstract class SubSystem extends RSEModelObject
* This in turn results in the default subsystem adapter SystemViewSubSystemAdapter,
* in package org.eclipse.rse.ui.view.
*/
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
+ public Object getAdapter(Class adapterType)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapterType);
+ }
/**
* Return the system profile object this subsystem is associated with.
@@ -568,9 +567,9 @@ public abstract class SubSystem extends RSEModelObject
public ISystemProfile getSystemProfile()
{
if (_host != null)
- return _host.getSystemProfile();
+ return _host.getSystemProfile();
else
- return null;
+ return null;
}
/**
@@ -580,9 +579,9 @@ public abstract class SubSystem extends RSEModelObject
{
ISystemProfile profile = getSystemProfile();
if (profile != null)
- return profile.getName();
+ return profile.getName();
else
- return null;
+ return null;
}
/**
@@ -600,23 +599,23 @@ public abstract class SubSystem extends RSEModelObject
{
IHost connection = getHost();
if (connection != null)
- return connection.getAliasName();
+ return connection.getAliasName();
else
- return null;
+ return null;
}
/**
* Return the owning filter pool that is unique to this provider.
- * From SystemFilterPoolReferenceManagerProvider interface. We map to
+ * From SystemFilterPoolReferenceManagerProvider interface. We map to
* a call to {@link #getConnectionPrivateFilterPool(boolean)}.
*/
public ISystemFilterPool getUniqueOwningSystemFilterPool(boolean createIfNotFound)
{
return getConnectionPrivateFilterPool(createIfNotFound);
}
-
+
/**
- * Find or create a new filter pool, unique to this subsystem's connection. This will be
+ * Find or create a new filter pool, unique to this subsystem's connection. This will be
* in the same profile as the connection and it will follow a naming convention that ties
* it to the connection.
* @param createIfNotFound - true to create the pool if it doesn't exist
@@ -657,16 +656,16 @@ public abstract class SubSystem extends RSEModelObject
}
return pool;
}
-
+
/**
* Constructs the name of a connection specific filter pool from its parts.
* @param profileName the name of the profile that contains this filter pool.
* @param connectionName the name of the connection the "owns" this filter pool.
- * @return the name for the connection-owned filter pool.
+ * @return the name for the connection-owned filter pool.
*/
public String getConnectionOwnedFilterPoolName(String profileName, String connectionName) {
/*
- * Need to keep this name short and not translatable
+ * Need to keep this name short and not translatable
* since it names a team sharable resource. Not qualified by the profile
* name since that is implicit by being in a profile.
*/
@@ -687,104 +686,104 @@ public abstract class SubSystem extends RSEModelObject
return true;
}
- /**
- * Return true if the given filter lists the contents of the given remote object.
- * For example, if given a folder, return true if any of the filter strings in this filter
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- *
- * Subclasses do not need to override this method. Rather, this method walks each
- * filter string and calls doesFilterStringListContentsOf(...), and that is the method
- * that child classes must override.
- */
- public boolean doesFilterListContentsOf(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- if (filter.isPromptable()) // || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
- return false;
- boolean would = false;
- ISystemFilterString[] strings = filter.getSystemFilterStrings();
- if (strings != null)
- for (int idx=0; !would && (idx
- * Subclasses should override this.
- */
- public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName)
- {
- return false;
- }
+ /**
+ * Return true if the given filter lists the contents of the given remote object.
+ * For example, if given a folder, return true if any of the filter strings in this filter
+ * lists the contents of that folder. Used in impact analysis when a remote object is
+ * created, deleted, renamed, copied or moved, so as to establish which filters need to be
+ * refreshed or collapsed (if the folder is deleted, say).
+ *
+ * Subclasses do not need to override this method. Rather, this method walks each
+ * filter string and calls doesFilterStringListContentsOf(...), and that is the method
+ * that child classes must override.
+ */
+ public boolean doesFilterListContentsOf(ISystemFilter filter, String remoteObjectAbsoluteName)
+ {
+ if (filter.isPromptable()) // || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
+ return false;
+ boolean would = false;
+ ISystemFilterString[] strings = filter.getSystemFilterStrings();
+ if (strings != null)
+ for (int idx=0; !would && (idx
+ * Subclasses should override this.
+ */
+ public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName)
+ {
+ return false;
+ }
+
+ /**
+ * Return true if the given remote object name will pass the filtering criteria for any of
+ * the filter strings in this filter.
+ *
+ * Subclasses do not need to override this method. Rather, this method walks each
+ * filter string and calls doesFilterStringMatch(...), and that is the method
+ * that child classes must override.
+ */
+ public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName)
+ {
+ if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
+ return false;
+ boolean would = false;
+
+ String[] strings = filter.getFilterStrings();
+ if (strings != null)
+ {
+ for (int idx=0; !would && (idx
- * Subclasses do not need to override this method. Rather, this method walks each
- * filter string and calls doesFilterStringMatch(...), and that is the method
- * that child classes must override.
- */
- public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
- return false;
- boolean would = false;
- String[] strings = filter.getFilterStrings();
- if (strings != null)
- {
- for (int idx=0; !would && (idx
* subsystem implementations must override this method
- * in order to resolve IDs for the remote objects they manage,
- * to support drag and drop, clipboard copy and other remote object
+ * in order to resolve IDs for the remote objects they manage,
+ * to support drag and drop, clipboard copy and other remote object
* resolving schemes.
* Extenders that want to support filters should call
*
- * Only the selected node should be expanded if not already. All other references to this filter will already
- * have been informed of the new addition, and will have refreshed their children but not expanded them.
- */
- public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString)
- {
- fireEvent(newFilterString, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, selectedObject);
- }
+ try {
+ getSubSystemConfiguration().saveSubSystem(this);
+ // fire model change event in case any BP code is listening...
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
+ }
+ catch (Exception exc)
+ {
+ SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
+ }
+ }
+ /**
+ * A single filter pool reference has been reset to reference a new pool
+ */
+ public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef)
+ {
+ fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, this); // we assume its a move operation so little impact
+ try {
+ getSubSystemConfiguration().saveSubSystem(this);
+ // fire model change event in case any BP code is listening...
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
+ }
+ catch (Exception exc)
+ {
+ SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
+ }
+ }
+ /**
+ * All filter pool references has been reset. Happens after SelectFilterPools dialog
+ */
+ public void filterEventFilterPoolReferencesReset()
+ {
+ fireEvent(this, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, this);
+ try
+ {
+ getSubSystemConfiguration().saveSubSystem(this);
+ ISystemFilterPoolReference[] poolRefs = getFilterPoolReferenceManager().getSystemFilterPoolReferences();
+ for (int idx=0; idx
+ * Only the selected node should be expanded if not already. All other references to this filter will already
+ * have been informed of the new addition, and will have refreshed their children but not expanded them.
+ */
+ public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString)
+ {
+ fireEvent(newFilterString, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, selectedObject);
+ }
- /**
- * Represents an operation that can be performed by the subsystem. Since this class
- * extends Job, it is run on a separate thread, but reports progress to the Main thread.
- * Takes care of some common error handling and Status creation for SubSystem Operations.
- * @author mjberger
- */
- protected abstract class SubSystemOperationJob extends Job
- {
- protected Object[] runOutputs;
- protected String[] runOutputStrings;
- protected boolean _hasStarted = false;
-
- public class ContextRunnable implements IRunnableWithProgress
- {
- private SubSystemOperationJob _job;
- private IStatus _status;
-
- public ContextRunnable(SubSystemOperationJob job)
- {
- _job = job;
- }
-
- public void run(IProgressMonitor monitor)
- {
- _status = _job.run(monitor);
- }
-
- public IStatus getStatus()
- {
- return _status;
- }
- }
-
- public SubSystemOperationJob(String operationName)
- {
- super(operationName + " (" + RSECoreMessages.RSESubSystemOperation_message + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ /**
+ * Represents an operation that can be performed by the subsystem. Since this class
+ * extends Job, it is run on a separate thread, but reports progress to the Main thread.
+ * Takes care of some common error handling and Status creation for SubSystem Operations.
+ * @author mjberger
+ */
+ protected abstract class SubSystemOperationJob extends Job
+ {
+ protected Object[] runOutputs;
+ protected String[] runOutputStrings;
+ protected boolean _hasStarted = false;
- /**
- * Override this method with the actual operation performed by your subsystem operation. Make sure to
- * report progress to the Progress monitor.
- * @throws InterruptedException if the user presses cancel
- * @throws InvocationTargetException if there is some error performing the operation
- * @throws Exception if there is some other error
- */
- public abstract void performOperation(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException, Exception;
-
- /**
- * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
- * using getOutputs() or getOutputStrings().
- */
- public Object[] getOutputs()
- {
- return runOutputs;
- }
+ public class ContextRunnable implements IRunnableWithProgress
+ {
+ private SubSystemOperationJob _job;
+ private IStatus _status;
- /**
- * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
- * using getOutputs() or getOutputStrings().
- */
- public String[] getOutputStrings()
- {
- return runOutputStrings;
- }
-
- public IStatus runInContext(IRunnableContext context)
- {
- _hasStarted = true;
- ContextRunnable conRun = new ContextRunnable(this);
- try
- {
- context.run(false, true, conRun);
- return conRun.getStatus();
- }
- catch (Exception e)
- {
- String excMsg = e.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + e.getClass().getName(); //$NON-NLS-1$
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
+ public ContextRunnable(SubSystemOperationJob job)
+ {
+ _job = job;
+ }
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, e);
- }
- }
-
- public boolean hasStarted()
- {
- return _hasStarted;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- _hasStarted = true;
- try
- {
- performOperation(monitor);
-
- if (monitor.isCanceled()) // sometimes our kids don't do this like they should!
- {
- return Status.CANCEL_STATUS;
- }
- monitor.done();
- return Status.OK_STATUS;
- }
- catch(java.lang.InterruptedException exc)
- {
- monitor.done();
- return Status.CANCEL_STATUS;
- }
- catch(InvocationTargetException exc)
- {
- //exc.printStackTrace();
- monitor.done();
- String excMsg = exc.getTargetException().getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getTargetException().getClass().getName(); //$NON-NLS-1$
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, excMsg, exc.getTargetException());
- }
- catch(Exception exc)
- {
- monitor.done();
- String excMsg = exc.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, exc);
- }
- }
- }
+ public void run(IProgressMonitor monitor)
+ {
+ _status = _job.run(monitor);
+ }
- /**
- * Represents the subsystem operation of resolving absolute filter strings.
- */
- protected class ResolveAbsoluteJob extends SubSystemOperationJob
- {
- protected String _filterString;
-
- /**
- * Create a new ResolveAbsoluteJob
- * @param filterString the absolute filter string to resolve
- */
- public ResolveAbsoluteJob(String filterString)
- {
- super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getResolvingMessage(_filterString);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterString(_filterString, mon);
- }
- }
+ public IStatus getStatus()
+ {
+ return _status;
+ }
+ }
- /**
- * Represents the subsystem operation of resolving a set of absolute filter strings.
- */
- protected class ResolveAbsolutesJob extends SubSystemOperationJob
- {
- protected String _filterString;
- protected String[] _filterStrings;
-
- /**
- * Create a new ResolveAbsolutesJob
- * @param filterStrings the set of absolute filter strings to resolve
- */
- public ResolveAbsolutesJob(String filterString, String[] filterStrings)
- {
- super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- _filterStrings = filterStrings;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getResolvingMessage(_filterString);
+ public SubSystemOperationJob(String operationName)
+ {
+ super(operationName + " (" + RSECoreMessages.RSESubSystemOperation_message + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterStrings(_filterStrings, mon);
- }
- }
+ /**
+ * Override this method with the actual operation performed by your subsystem operation. Make sure to
+ * report progress to the Progress monitor.
+ * @throws InterruptedException if the user presses cancel
+ * @throws InvocationTargetException if there is some error performing the operation
+ * @throws Exception if there is some other error
+ */
+ public abstract void performOperation(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException, Exception;
- /**
- * Represents the subsystem operation of resolving relative filter strings.
- */
- protected class ResolveRelativeJob extends SubSystemOperationJob
- {
- protected String _filterString;
- protected Object _parent;
+ /**
+ * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
+ * using getOutputs() or getOutputStrings().
+ */
+ public Object[] getOutputs()
+ {
+ return runOutputs;
+ }
- /**
- * Create a new ResolveRelativeJob
- * @param filterString the relative filter string to resolve
- * @param parent the object within which the relative filter string will be resolved
- */
- public ResolveRelativeJob(String filterString, Object parent)
- {
- super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- _parent = parent;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- if (_filterString == null)
- {
- // DKM - we shouldn't be using parent context for filter strings because
- // now we have multiple contexts for the same resources
- _filterString = "*"; //$NON-NLS-1$
- }
- msg = getResolvingMessage(_filterString);
+ /**
+ * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
+ * using getOutputs() or getOutputStrings().
+ */
+ public String[] getOutputStrings()
+ {
+ return runOutputStrings;
+ }
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterString(_parent, _filterString, mon);
- }
- }
+ public IStatus runInContext(IRunnableContext context)
+ {
+ _hasStarted = true;
+ ContextRunnable conRun = new ContextRunnable(this);
+ try
+ {
+ context.run(false, true, conRun);
+ return conRun.getStatus();
+ }
+ catch (Exception e)
+ {
+ String excMsg = e.getMessage();
+ if ((excMsg == null) || (excMsg.length()==0))
+ excMsg = "Exception " + e.getClass().getName(); //$NON-NLS-1$
+ String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
- /**
- * Represents the subsystem operation of getting a property value from a remote object.
- */
- protected class GetPropertyJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String _key;
+ return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, e);
+ }
+ }
- /**
- * Constructs a new GetPropertyJob
- * @param subject The object whose property will be queried
- * @param key The property to query
- */
- public GetPropertyJob(Object subject, String key)
- {
- super(RSECoreMessages.RSESubSystemOperation_Get_property_message);
- _subject = subject;
- _key = key;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getQueryingMessage(_key);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputStrings = new String[] {internalGetProperty(_subject, _key, mon)};
- }
- }
+ public boolean hasStarted()
+ {
+ return _hasStarted;
+ }
- /**
- * Represents the subsystem operation of setting a property of a remote object.
- */
- protected class SetPropertyJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String _key;
- protected String _value;
-
- /**
- * Constructs a new SetPropertyJob
- * @param subject the object whose property is to be set
- * @param key the property to set
- * @param value the new value for the property
- */
- public SetPropertyJob(Object subject, String key, String value)
- {
- super(RSECoreMessages.RSESubSystemOperation_Set_property_message);
- _subject = subject;
- _key = key;
- _value = value;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
- msg = getSettingMessage(_key);
+ public IStatus run(IProgressMonitor monitor)
+ {
+ _hasStarted = true;
+ try
+ {
+ performOperation(monitor);
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = new Object[] {internalSetProperty(_subject, _key, _value, mon)};
- }
- }
+ if (monitor.isCanceled()) // sometimes our kids don't do this like they should!
+ {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ }
+ catch(java.lang.InterruptedException exc)
+ {
+ monitor.done();
+ return Status.CANCEL_STATUS;
+ }
+ catch(InvocationTargetException exc)
+ {
+ //exc.printStackTrace();
+ monitor.done();
+ String excMsg = exc.getTargetException().getMessage();
+ if ((excMsg == null) || (excMsg.length()==0))
+ excMsg = "Exception " + exc.getTargetException().getClass().getName(); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, excMsg, exc.getTargetException());
+ }
+ catch(Exception exc)
+ {
+ monitor.done();
+ String excMsg = exc.getMessage();
+ if ((excMsg == null) || (excMsg.length()==0))
+ excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
+ String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
+ return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, exc);
+ }
+ }
+ }
- /**
- * Represents the subsystem operation of getting a set of property values from a remote object.
- */
- protected class GetPropertiesJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String[] _keys;
-
- /**
- * Constructs a new GetPropertiesJob
- * @param subject the object on which to perform the property query
- * @param keys the properties to query
- */
- public GetPropertiesJob(Object subject, String[] keys)
- {
- super(RSECoreMessages.RSESubSystemOperation_Get_properties_message);
- _subject = subject;
- _keys = keys;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
- msg = getQueryingMessage();
+ /**
+ * Represents the subsystem operation of resolving absolute filter strings.
+ */
+ protected class ResolveAbsoluteJob extends SubSystemOperationJob
+ {
+ protected String _filterString;
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputStrings = internalGetProperties(_subject, _keys, mon);
- }
- }
+ /**
+ * Create a new ResolveAbsoluteJob
+ * @param filterString the absolute filter string to resolve
+ */
+ public ResolveAbsoluteJob(String filterString)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
+ _filterString = filterString;
+ }
- /**
- * Represents the subsystem operation of setting a set of properties of a remote object.
- */
- protected class SetPropertiesJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String[] _keys;
- protected String[] _values;
-
- /**
- * Constructs a new SetPropertiesJob
- * @param subject the object whose properties are to be set
- * @param keys the set of properties to set
- * @param values the set of new values for the properties, corresponding with
- * When a user expands a filter this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
- * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- *
- * Be sure to register your adapter factory in your plugin's startup method.
- *
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you. Just override internalResolveFilterString.
- *
- * @param filterString filter pattern for objects to return.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
- {
-
- if (isConnected())
- {
- Object[] results = internalResolveFilterString(filterString, monitor);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
+ /**
+ * Sort the concatenated list of all objects returned by resolving one or more
+ * filter strings.
+ * The default implementation does nothing. Child classes can override if they wish
+ * to show their resulting objects sorted.
+ */
+ protected Object[] sortResolvedFilterStringObjects(Object[] input)
+ {
+ return input;
+ }
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- *
- * This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
- * filter strings versus a single filter string.
- *
- * The default implementation of this simply calls {@link #internalResolveFilterStrings(String[], IProgressMonitor)}.
- *
- * After successful resolve, the sort method is called to sort the concatenated results before
- * returning them.
- *
- * @param filterStrings array of filter patterns for objects to return.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
- throws Exception
- {
- if ((filterStrings == null) || (filterStrings.length == 0)) {
- SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
- return null;
- }
- if (isConnected())
- {
- Object[] results = internalResolveFilterStrings(filterStrings, monitor);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
- /**
- * Resolve a relative filter string.
- *
- * When a user expands a remote resource this method is invoked and the
- * results are potentially sorted and displayed to the user. You can affect the sorting
- * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
- * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- *
- * Be sure to register your adapter factory in your plugin's startup method.
- *
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you. Override internalResolveFilterString instead.
- *
- * @param parent Object that is being expanded.
- * @param filterString filter pattern for children of parent. Typically just "*".
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
+ /**
+ * Resolve an absolute filter string.
+ *
+ * This is only applicable if the subsystem
+ * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
+ * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
+ * is called when the subsystem itself is expanded.
+ *
+ * When a user expands a filter this method is invoked for each filter string and the
+ * results are concatenated and displayed to the user. You can affect the post-concatenated
+ * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
+ * sort the result, say, or pick our redundancies.
+ *
+ * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
+ * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
+ * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
+ * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
+ *
+ * Be sure to register your adapter factory in your plugin's startup method.
+ *
+ * You do not need to override this, as it does the progress monitor and error message
+ * displaying for you. Just override internalResolveFilterString.
+ *
+ * @param filterString filter pattern for objects to return.
+ * @param monitor the process monitor associated with this operation
+ *
+ * @return Array of objects that are the result of this filter string
+ */
+ public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
+ {
+
+ if (isConnected())
+ {
+ Object[] results = internalResolveFilterString(filterString, monitor);
+ if (sortResults && (results!=null))
+ results = sortResolvedFilterStringObjects(results);
+ return results;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Resolve multiple absolute filter strings. This is only applicable if the subsystem
+ * factory reports true for supportsFilters().
+ *
+ * This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
+ * filter strings versus a single filter string.
+ *
+ * The default implementation of this simply calls {@link #internalResolveFilterStrings(String[], IProgressMonitor)}.
+ *
+ * After successful resolve, the sort method is called to sort the concatenated results before
+ * returning them.
+ *
+ * @param filterStrings array of filter patterns for objects to return.
+ * @param monitor the process monitor associated with this operation
+ *
+ * @return Array of objects that are the result of this filter string
+ */
+ public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
+ throws Exception
+ {
+ if ((filterStrings == null) || (filterStrings.length == 0)) {
+ SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
+ return null;
+ }
+ if (isConnected())
+ {
+ Object[] results = internalResolveFilterStrings(filterStrings, monitor);
+ if (sortResults && (results!=null))
+ results = sortResolvedFilterStringObjects(results);
+ return results;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Resolve a relative filter string.
+ *
+ * When a user expands a remote resource this method is invoked and the
+ * results are potentially sorted and displayed to the user. You can affect the sorting
+ * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
+ * sort the result, say, or pick our redundancies.
+ *
+ * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
+ * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
+ * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
+ * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
+ *
+ * Be sure to register your adapter factory in your plugin's startup method.
+ *
+ * You do not need to override this, as it does the progress monitor and error message
+ * displaying for you. Override internalResolveFilterString instead.
+ *
+ * @param parent Object that is being expanded.
+ * @param filterString filter pattern for children of parent. Typically just "*".
+ * @param monitor the process monitor associated with this operation
+ *
+ * @return Array of objects that are the result of this filter string
+ */
public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
- throws Exception
- {
- if (isConnected())
- {
- Object[] results= internalResolveFilterString(parent, filterString, monitor);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
-
+ throws Exception
+ {
+ if (isConnected())
+ {
+ Object[] results= internalResolveFilterString(parent, filterString, monitor);
+ if (sortResults && (results!=null))
+ results = sortResolvedFilterStringObjects(results);
+ return results;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
/**
* Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
- * true for supportsCommands().
+ * true for supportsCommands().
*/
public String[] getExecutedCommands()
{
return null;
}
-
- /**
- * Set a remote property. Subsystems interpret as they wish. Eg, this might be to set
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to set
- * @param value Value to set property to
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new value for confirmation.
- *
- * @deprecated this shouldn't be used
- */
- public Object setProperty(Object subject, String key, String value)
- throws Exception
- {
- return null;
- }
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to get value of
- * @return String The value of the requested key.
- *
- * @deprecated this shouldn't be used
- */
- public String getProperty(Object subject, String key)
- throws Exception
- {
- return null;
- }
+ /**
+ * Set a remote property. Subsystems interpret as they wish. Eg, this might be to set
+ * a remote environment variable. This is only applicable if the subsystem factory reports
+ * true for supportsProperties().
+ * @param subject Identifies which object to get the properties of
+ * @param key Identifies property to set
+ * @param value Value to set property to
+ * @return Object interpretable by subsystem. Might be a Boolean, or the might be new value for confirmation.
+ *
+ * @deprecated this shouldn't be used
+ */
+ public Object setProperty(Object subject, String key, String value)
+ throws Exception
+ {
+ return null;
+ }
- /**
- * Set multiple remote properties. Subsystems interpret as they wish. Eg, this might be to set
- * a number of remote environment variables. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject identifies which object to get the properties of.
- * @param keys the array of propertie keys to set.
- * @param values the array of values to set. The value at a certain index corresponds to the property key at the same index.
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new values for confirmation.
- *
- * @deprecated this shouldn't be used
- */
- public Object setProperties(Object subject, String[] keys, String[] values)
- throws Exception
- {
- return null;
- }
+ /**
+ * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
+ * a remote environment variable. This is only applicable if the subsystem factory reports
+ * true for supportsProperties().
+ * @param subject Identifies which object to get the properties of
+ * @param key Identifies property to get value of
+ * @return String The value of the requested key.
+ *
+ * @deprecated this shouldn't be used
+ */
+ public String getProperty(Object subject, String key)
+ throws Exception
+ {
+ return null;
+ }
- /**
- * Initialize this subsystem instance after the corresponding {@link IConnectorService} connect method finishes.
- * This method should be overridden if any initialization for the subsystem needs
- * to occur at this time
- * The default implementation currently does nothing, but overriding methods should call super.
- * @param monitor a monitor that can be used to show progress or provide cancellation.
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- }
-
- /**
- * Uninitialize this subsystem just after disconnect.
- * The default implementation currently does nothing.
- * Overriding methods should call super.
- * @param monitor a progress monitor that can be used to show uninitialization progress can provide cancellation.
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- }
+ /**
+ * Set multiple remote properties. Subsystems interpret as they wish. Eg, this might be to set
+ * a number of remote environment variables. This is only applicable if the subsystem factory reports
+ * true for supportsProperties().
+ * @param subject identifies which object to get the properties of.
+ * @param keys the array of propertie keys to set.
+ * @param values the array of values to set. The value at a certain index corresponds to the property key at the same index.
+ * @return Object interpretable by subsystem. Might be a Boolean, or the might be new values for confirmation.
+ *
+ * @deprecated this shouldn't be used
+ */
+ public Object setProperties(Object subject, String[] keys, String[] values)
+ throws Exception
+ {
+ return null;
+ }
+
+ /**
+ * Initialize this subsystem instance after the corresponding {@link IConnectorService} connect method finishes.
+ * This method should be overridden if any initialization for the subsystem needs
+ * to occur at this time
+ * The default implementation currently does nothing, but overriding methods should call super.
+ * @param monitor a monitor that can be used to show progress or provide cancellation.
+ */
+ public void initializeSubSystem(IProgressMonitor monitor) {
+ }
+
+ /**
+ * Uninitialize this subsystem just after disconnect.
+ * The default implementation currently does nothing.
+ * Overriding methods should call super.
+ * @param monitor a progress monitor that can be used to show uninitialization progress can provide cancellation.
+ */
+ public void uninitializeSubSystem(IProgressMonitor monitor) {
+ }
@@ -2288,22 +2287,22 @@ public abstract class SubSystem extends RSEModelObject
* Required for Bug 176603
* @see org.eclipse.rse.core.subsystems.ISubSystem#connect(org.eclipse.core.runtime.IProgressMonitor, boolean)
*/
- public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception
- {
- if (!isConnected())
+ public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception
+ {
+ if (!isConnected())
{
String msg = null;
- msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
- SystemBasePlugin.logInfo(msg);
- monitor.beginTask(msg, 10);
- final boolean promptForPassword = forcePrompt;
-
+ msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
+ SystemBasePlugin.logInfo(msg);
+ monitor.beginTask(msg, 10);
+ final boolean promptForPassword = forcePrompt;
+
final Exception[] exception=new Exception[1];
exception[0]=null;
Display.getDefault().syncExec(new Runnable() {
public void run() {
- try
+ try
{
promptForPassword(promptForPassword);
} catch(Exception e) {
@@ -2329,14 +2328,14 @@ public abstract class SubSystem extends RSEModelObject
}
}
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystem#connect(boolean, org.eclipse.rse.core.model.IRSECallback)
*/
public void connect(boolean forcePrompt, IRSECallback callback) throws Exception {
// yantzi: artemis60, (defect 53082) check that the connection has not been deleted before continuing,
- // this is a defenisve measure to protect against code that stores a handle to subsystems but does
+ // this is a defenisve measure to protect against code that stores a handle to subsystems but does
// not do this check
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
IHost host = getHost();
@@ -2344,8 +2343,8 @@ public abstract class SubSystem extends RSEModelObject
ISystemProfile profile = getSystemProfile();
if (registry.getHost(profile, hostName) == null) { // connection no longer exists
String msgTxt = NLS.bind(RSECoreMessages.MSG_CONNECTION_DELETED, hostName);
-
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
SystemResourceConstants.MSG_CONNECTION_DELETED,
IStatus.ERROR, msgTxt);
throw new SystemMessageException(msg);
@@ -2354,8 +2353,8 @@ public abstract class SubSystem extends RSEModelObject
if (isOffline()) {
String msgTxt = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT, hostName);
String msgDetails = RSECoreMessages.MSG_OFFLINE_CANT_CONNECT_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
SystemResourceConstants.MSG_OFFLINE_CANT_CONNECT,
IStatus.ERROR, msgTxt, msgDetails);
@@ -2364,145 +2363,145 @@ public abstract class SubSystem extends RSEModelObject
//DY operation = OPERATION_CONNECT;
if (!isConnected() && supportsConnecting) {
getRunnableContext(/*shell*/); // needed only for side effect of setting shell to the shell for the active workbench window
-//dwd IRunnableContext runnableContext = getRunnableContext(shell);
-//dwd if (runnableContext instanceof ProgressMonitorDialog) {
-//dwd ((ProgressMonitorDialog) runnableContext).setCancelable(true);
-//dwd }
+ //dwd IRunnableContext runnableContext = getRunnableContext(shell);
+ //dwd if (runnableContext instanceof ProgressMonitorDialog) {
+ //dwd ((ProgressMonitorDialog) runnableContext).setCancelable(true);
+ //dwd }
getConnectorService().acquireCredentials(forcePrompt); // prompt for userid and password
//FIXME Error reporting from the ConnectJob? How is the exception thrown?
ConnectJob job = new ConnectJob(this, callback);
scheduleJob(job, null);
}
}
-
- /**
- * A convenience method, fully equivalent to promptForPassword(false).
- */
- public boolean promptForPassword() throws Exception
- {
- return promptForPassword(false);
- }
- /**
- * Prompt the user for a password to the remote system. The primary request was something else,
- * but we have detected the user is not connected so we prompt for password outside
- * of the progress monitor, then set a flag to do the connection within the progress
- * monitor.
- * @param force true if the prompting should be forced, false if prompting can be skipped if credentials have been stored.
- * @return true if the credentials are obtained
- */
- public boolean promptForPassword(boolean force) throws Exception
- {
- boolean ok = false;
- if (!supportsConnecting)
- return true;
-
- if (isOffline())
- {
- // offline so don't bother prompting
- doConnection = true; // this gets handled later when it comes time to connect
- return true;
- }
- else if (supportsCaching() && getCacheManager().isRestoreFromMemento())
- {
+ /**
+ * A convenience method, fully equivalent to promptForPassword(false).
+ */
+ public boolean promptForPassword() throws Exception
+ {
+ return promptForPassword(false);
+ }
+
+ /**
+ * Prompt the user for a password to the remote system. The primary request was something else,
+ * but we have detected the user is not connected so we prompt for password outside
+ * of the progress monitor, then set a flag to do the connection within the progress
+ * monitor.
+ * @param force true if the prompting should be forced, false if prompting can be skipped if credentials have been stored.
+ * @return true if the credentials are obtained
+ */
+ public boolean promptForPassword(boolean force) throws Exception
+ {
+ boolean ok = false;
+ if (!supportsConnecting)
+ return true;
+
+ if (isOffline())
+ {
+ // offline so don't bother prompting
doConnection = true; // this gets handled later when it comes time to connect
- return true;
- }
-
+ return true;
+ }
+ else if (supportsCaching() && getCacheManager().isRestoreFromMemento())
+ {
+ doConnection = true; // this gets handled later when it comes time to connect
+ return true;
+ }
+
+ try
+ {
+ getConnectorService().acquireCredentials(force); // prompt for password
+ doConnection = true;
+ ok = true;
+ }
+ catch (InterruptedException exc) // user cancelled
+ {
+ throw exc;
+ }
+ catch (Exception exc)
+ {
+ showConnectErrorMessage(shell, getHostName(), getConnectorService().getPort(), exc);
+ }
+ return ok;
+ }
+
+ /**
+ * Disconnect from the remote system
+ * You do not need to override this, as it does the progress monitor and error message
+ * displaying for you.
+ *
+ * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
+ *
+ */
+ public void disconnect() throws Exception
+ {
+ disconnect(true);
+ }
+
+ /**
+ * Disconnect from the remote system
+ * You do not need to override this, as it does the progress monitor and error message
+ * displaying for you.
+ *
+ * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
+ *
+ * @param collapseTree collapse the tree in the system view
+ */
+ public void disconnect(boolean collapseTree) throws Exception
+ {
+ _disconnecting = true;
+ if (!isConnected() || !supportsConnecting)
+ {
+ // disconnected but may not have notified viewers (i.e. network problem)
+ ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
+ sr.connectedStatusChange(this, false, true, collapseTree);
+ return;
+ }
+ /*
try
{
- getConnectorService().acquireCredentials(force); // prompt for password
- doConnection = true;
- ok = true;
- }
- catch (InterruptedException exc) // user cancelled
- {
- throw exc;
- }
- catch (Exception exc)
- {
- showConnectErrorMessage(shell, getHostName(), getConnectorService().getPort(), exc);
- }
- return ok;
- }
+ */
- /**
- * Disconnect from the remote system
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- *
- * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
- *
- */
- public void disconnect() throws Exception
- {
- disconnect(true);
- }
-
- /**
- * Disconnect from the remote system
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- *
- * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
- *
- * @param collapseTree collapse the tree in the system view
- */
- public void disconnect(boolean collapseTree) throws Exception
- {
- _disconnecting = true;
- if (!isConnected() || !supportsConnecting)
- {
- // disconnected but may not have notified viewers (i.e. network problem)
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.connectedStatusChange(this, false, true, collapseTree);
- return;
- }
- /*
- try
- {
- */
-
- DisconnectJob job = new DisconnectJob(collapseTree, this);
- job.schedule();
- /*
+ DisconnectJob job = new DisconnectJob(collapseTree, this);
+ job.schedule();
+ /*
}
catch (InterruptedException exc)
{
- if (shell != null)
+ if (shell != null)
showDisconnectCancelledMessage(shell, getHostName(), getConnectorService().getPort());
throw exc;
- }
+ }
finally
{
_disconnecting = false;
_connectionError = false;
}
- */
- }
+ */
+ }
+
+ /**
+ * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
+ * a remote environment variable. This is only applicable if the subsystem factory reports
+ * true for supportsProperties().
+ * @param subject Identifies which object to get the properties of
+ * @param keys the array of property keys.
+ * @return the values for the given property keys.
+ *
+ * @deprecated this shouldn't be used
+ */
+ public String[] getProperties(Object subject, String[] keys)
+ throws Exception
+ {
+ return null;
+ }
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param keys the array of property keys.
- * @return the values for the given property keys.
- *
- * @deprecated this shouldn't be used
- */
- public String[] getProperties(Object subject, String[] keys)
- throws Exception
- {
- return null;
- }
-
/**
* Return the {@link org.eclipse.rse.core.subsystems.IConnectorService IConnectorService} object that represents the live connection for this system.
* This must return an object that implements {@link IConnectorService}. A good starting point for that
* is the base class {@link AbstractConnectorService}.
- *
+ *
* The connector service gets passed in to the constructor for the subsystem so there's normally no reason
* to override this method.
*
@@ -2511,7 +2510,7 @@ public abstract class SubSystem extends RSEModelObject
{
return _connectorService;
}
-
+
/**
* Sets the {@link org.eclipse.rse.core.subsystems.IConnectorService IConnectorService} object that represents the live connection for this system.
*
@@ -2524,19 +2523,19 @@ public abstract class SubSystem extends RSEModelObject
_connectorService = connectorService;
_connectorService.registerSubSystem(this);
setDirty(true);
- }
+ }
else
{
// register the subsystem
_connectorService.registerSubSystem(this);
}
}
-
- // ----------------------------------
+
+ // ----------------------------------
// METHODS THAT MUST BE OVERRIDDEN...
// ----------------------------------
-
+
/**
* Check if the SubSystem supports caching. This is the default implementation
* which returns false. Subclasses must override to support caching.
@@ -2545,18 +2544,18 @@ public abstract class SubSystem extends RSEModelObject
{
return false;
}
-
+
/**
* Return the CacheManager for this subsystem. This is the default implementation
* which just returns null.
*
- * @see #supportsCaching()
+ * @see #supportsCaching()
*/
public ICacheManager getCacheManager()
{
return null;
- }
-
+ }
+
/**
* Connect to the remote host. This is called by the implicitConnect(boolean, IProgressMonitor, String, int) method.
* Rather, this calls connect(IProgressMonitor) in the IConnectorService class that is returned from getConnectorService().
@@ -2564,18 +2563,18 @@ public abstract class SubSystem extends RSEModelObject
* Your connect method in your IConnectorService class must follow these IRunnableWithProgress rules:
*
- * You DO NOT OVERRIDE THIS. Rather, this calls connect(IProgressMonitor) in your
+ * You DO NOT OVERRIDE THIS. Rather, this calls connect(IProgressMonitor) in your
* IConnectorService class that is returned from getConnectorService(). That is where your code to disconnect should go!
*
* Your disconnect method in your IConnectorService class must follow these IRunnableWithProgress rules:
@@ -2604,11 +2603,11 @@ public abstract class SubSystem extends RSEModelObject
*
- * When a user expands a filter this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
- * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- *
- * Be sure to register your adapter factory in your plugin's startup method.
+ * Resolve an absolute filter string. This is only applicable if the subsystem
+ * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
+ * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
+ * is called when the subsystem itself is expanded.
+ *
+ * When a user expands a filter this method is invoked for each filter string and the
+ * results are concatenated and displayed to the user. You can affect the post-concatenated
+ * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
+ * sort the result, say, or pick our redundancies.
+ *
+ * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
+ * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
+ * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
+ * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
+ *
+ * Be sure to register your adapter factory in your plugin's startup method.
*
* Actually resolve an absolute filter string. This is called by the
* run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
@@ -2659,89 +2658,89 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*/
protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- *
- * This is the same as {@link #internalResolveFilterString(Object, String, IProgressMonitor)} but takes an array of
- * filter strings versus a single filter string.
- *
- * The default implementation of this simply calls {@link #internalResolveFilterString(String, IProgressMonitor)}
- * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject
- * is called on the concatenated result, given subclasses an opportunity to sort the result.
- *
- * After successful resolve, the sort method is called to sort the concatenated results before
- * returning them.
- * @param filterStrings array of filter patterns for objects to return.
- * @param monitor the progress monitor we are running under
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- Object[] children = null;
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
+ /**
+ * Resolve multiple absolute filter strings. This is only applicable if the subsystem
+ * factory reports true for supportsFilters().
+ *
+ * This is the same as {@link #internalResolveFilterString(Object, String, IProgressMonitor)} but takes an array of
+ * filter strings versus a single filter string.
+ *
+ * The default implementation of this simply calls {@link #internalResolveFilterString(String, IProgressMonitor)}
+ * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject
+ * is called on the concatenated result, given subclasses an opportunity to sort the result.
+ *
+ * After successful resolve, the sort method is called to sort the concatenated results before
+ * returning them.
+ * @param filterStrings array of filter patterns for objects to return.
+ * @param monitor the progress monitor we are running under
+ * @return Array of objects that are the result of resolving all the filter strings
+ */
+ public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ Object[] children = null;
Vector vChildren = new Vector();
- for (int idx=0; idx
- * When a user expands a remote resource this method is invoked and the
- * results are potentially sorted and displayed to the user. You can affect the sorting
- * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
- * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- *
- * Be sure to register your adapter factory in your plugin's startup method.
- *
+ * Overridable extension point for adding the results of a filter string
+ * to the overall list of results.
+ *
+ * Can be used to filter out redundant entries in the concatenated list, if this
+ * is desired.
+ */
+ protected void addResolvedFilterStringObjects(Vector allChildrenSoFar, Object[] childrenForThisFilterString,
+ String[] allFilterStrings, int currFilterStringIndex)
+ {
+ for (int jdx = 0; jdx
+ * When a user expands a remote resource this method is invoked and the
+ * results are potentially sorted and displayed to the user. You can affect the sorting
+ * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
+ * sort the result, say, or pick our redundancies.
+ *
+ * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
+ * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
+ * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
+ * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
+ *
+ * Be sure to register your adapter factory in your plugin's startup method.
+ *
* This is called by the run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
*
* As per IRunnableWithProgress rules:
@@ -2753,21 +2752,21 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*/
protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
- /**
- * Called by resolveFilterString when given null for the filter string, meaning we defer
- * getting a filter string until later, where we query it from the parent. In this case
- * we need the first filter string for the progress monitor msg.true
if the system type is currently enabled, or false
otherwise.
+ * @return true
if the system type is currently enabled, or
+ * false
otherwise.
+ * @since org.eclipse.rse.core 3.0
*/
public boolean isEnabled();
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
index 8d5c78568ea..1501e39e768 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
@@ -1,19 +1,21 @@
/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. 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
*
* Contributors:
* Kushal Munir (IBM) - Initial API and implementation.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core;
/**
- * These constants define the set of properties that the UI expects to
- * be available via IRSESystemType.getProperty(String)
.
- *
+ * These constants define the set of properties that the UI expects to be
+ * available via IRSESystemType.getProperty(String)
.
+ *
* @see org.eclipse.rse.core.IRSESystemType#getProperty(String)
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface IRSESystemTypeConstants {
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
index 00b3bed8aa8..3965bf400ff 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
@@ -1,24 +1,26 @@
/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2000, 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
+ * 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,
+ * 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.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core;
/**
- * Constants for user id management. Used when specifying the scope of a user id when
- * setting a user id.
+ * Constants for user id management. Used when specifying the scope of a user id
+ * when setting a user id.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface IRSEUserIdConstants {
@@ -28,7 +30,7 @@ public interface IRSEUserIdConstants {
public static final int USERID_LOCATION_NOTSET = 0;
/**
- * Value 1. Location of user id is scoped to the connector service inside the host.
+ * Value 1. Location of user id is scoped to the connector service inside the host.
*/
public static final int USERID_LOCATION_CONNECTORSERVICE = 1;
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
index 6ef29e7ac33..974b9fb5470 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
@@ -1,13 +1,13 @@
/********************************************************************************
* 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
+ * 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,
+ * 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:
@@ -15,8 +15,9 @@
* - updated to use new RSEPreferencesManager
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
+ * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core;
@@ -37,10 +38,14 @@ import org.eclipse.rse.internal.core.RSECoreMessages;
/**
- * PasswordPersistenceManager manages the saving and retreiving of user ID / passwords
- * to the Eclipse keyring for registered system types.
+ * PasswordPersistenceManager manages the saving and retrieving of user ID /
+ * passwords to the Eclipse keyring for registered system types.
*
* @author yantzi
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients. Use
+ * the {@link #getInstance()} method to get the singleton
+ * instance.
*/
public class PasswordPersistenceManager {
@@ -50,26 +55,26 @@ public class PasswordPersistenceManager {
private static final String SERVER_URL = "file://rse"; //$NON-NLS-1$
private static final String AUTH_SCHEME = ""; // no authorization scheme specified for apis //$NON-NLS-1$
-
+
// Add return codes
public static final int RC_OK = 0;
public static final int RC_ALREADY_EXISTS = 1;
- public static final int RC_ERROR = -1;
-
+ public static final int RC_ERROR = -1;
+
// Default System Type, on a lookup if the specified system type and hostname is not found
// then the call will automatically lookup the default system type and hostname
public static final IRSESystemType DEFAULT_SYSTEM_TYPE = new DefaultSystemType();
-
+
// Default user name
public static final String DEFAULT_USER_NAME = "DEFAULT_USER"; //$NON-NLS-1$
-
+
// New URL to store password map
private String newURL = null;
-
+
/*
* Singleton instance
*/
- private static PasswordPersistenceManager _instance;
+ private static PasswordPersistenceManager _instance;
/*
* Instance variables
@@ -99,9 +104,9 @@ public class PasswordPersistenceManager {
return true;
}
}
-
+
/**
- * Inner class used for storing registered system types
+ * Inner class used for storing registered system types
*/
private class RegisteredSystemType
{
@@ -112,8 +117,8 @@ public class PasswordPersistenceManager {
{
_systemType = systemType;
_userIDCaseSensitive = caseSensitive;
- }
-
+ }
+
/**
* Returns the system type.
* @return the system type.
@@ -129,23 +134,23 @@ public class PasswordPersistenceManager {
public boolean isUserIDCaseSensitive() {
return _userIDCaseSensitive;
}
- }
+ }
/**
* Singleton so private constructor
*/
private PasswordPersistenceManager(){
String userName = System.getProperty("user.name"); //$NON-NLS-1$
-
+
if (userName == null) {
userName = DEFAULT_USER_NAME;
}
-
+
newURL = SERVER_URL + userName;
}
-
+
/**
- * Retrieve the singleton isntance of the PasswordPersistenceManger
+ * Retrieve the singleton instance of the PasswordPersistenceManger
*/
public static final synchronized PasswordPersistenceManager getInstance()
{
@@ -166,12 +171,12 @@ public class PasswordPersistenceManager {
{
IRSESystemType[] sysTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
systemTypes = new RegisteredSystemType[sysTypes.length];
-
+
for (int i = 0; i < sysTypes.length; i++) {
systemTypes[i] = new RegisteredSystemType(sysTypes[i], true);
}
}
-
+
/**
* Remove the entry from the keyring that matches the systemtype, hostname and
* user ID from the SystemSignonInfo parameter.
@@ -179,8 +184,8 @@ public class PasswordPersistenceManager {
public void remove(SystemSignonInformation info)
{
remove(info.getSystemType(), info.getHostname(), info.getUserId());
- }
-
+ }
+
/**
* Remove the entry from the keyring that matches the hostname, userid and
* system type parameters.
@@ -198,14 +203,14 @@ public class PasswordPersistenceManager {
}
Map passwords = getPasswordMap(systemtype);
-
+
if (passwords != null)
{
if (removePassword(passwords, hostname, userid))
{
savePasswordMap(systemtype.getId(), passwords);
}
- }
+ }
else
{
// yantzi: RSE6.2 check for default system type entry with this hostname and user ID
@@ -215,14 +220,14 @@ public class PasswordPersistenceManager {
}
}
}
-
+
/**
* Check if a password entry exists for the specified system type, hostname
* and userid.
*/
public boolean passwordExists(IRSESystemType systemtype, String hostname, String userid)
{
-
+
return passwordExists(systemtype, hostname, userid, true);
}
@@ -249,7 +254,7 @@ public class PasswordPersistenceManager {
* @param info The signon information to store
* @param overwrite Whether to overwrite any existing entry
*
- * @return
+ * @return
* RC_OK if the password was successfully stored
* RC_ALREADY_EXISTS if the password already exists and overwrite was false
*/
@@ -257,7 +262,7 @@ public class PasswordPersistenceManager {
{
return add(info, overwrite, false);
}
-
+
/**
* Add a new persisted password to the password database. This method assumes
* the encrypted password is already stored in the SystemSignonInformation
@@ -267,14 +272,14 @@ public class PasswordPersistenceManager {
* @param overwrite Whether to overwrite any existing entry
* @param updateDefault Whether or not to update the default entry for the specified hostname / user ID if one exists.
*
- * @return
+ * @return
* RC_OK if the password was successfully stored
* RC_ALREADY_EXISTS if the password already exists and overwrite was false
*/
public int add(SystemSignonInformation info, boolean overwrite, boolean updateDefault)
{
IRSESystemType systemtype = info.getSystemType();
-
+
// Convert userid to upper case if required
if (!isUserIDCaseSensitive(systemtype))
{
@@ -285,13 +290,13 @@ public class PasswordPersistenceManager {
String userid = info.getUserId();
Map passwords = getPasswordMap(systemtype);
String passwordKey = getPasswordKey(hostname, userid);
-
+
if (passwords != null)
{
String password = getPassword(passwords, hostname, userid);
if (password != null)
- {
+ {
if (!overwrite)
{
return RC_ALREADY_EXISTS;
@@ -327,36 +332,36 @@ public class PasswordPersistenceManager {
else
{
// password map did not exists yet so create a new one
- passwords = new HashMap(5);
+ passwords = new HashMap(5);
}
-
+
passwords.put(passwordKey, info.getPassword());
-
- savePasswordMap(systemtype.getId(), passwords);
-
+
+ savePasswordMap(systemtype.getId(), passwords);
+
return RC_OK;
}
-
+
/*
* Retrieve the password map from the keyring for the specified system type
- */
+ */
private Map getPasswordMap(IRSESystemType systemType)
{
Map passwords = null;
String systemTypeId = systemType.getId();
-
+
try
{
URL serverURL = new URL(newURL);
passwords = Platform.getAuthorizationInfo(serverURL, systemTypeId, AUTH_SCHEME);
-
+
// if no passwords found with new URL, check old URL
if (passwords == null) {
-
+
URL oldServerURL1 = new URL(SERVER_URL + ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString());
passwords = Platform.getAuthorizationInfo(oldServerURL1, systemTypeId, AUTH_SCHEME);
-
+
// passwords found, so migrate to using new URL
if (passwords != null) {
savePasswordMap(systemTypeId, passwords);
@@ -365,10 +370,10 @@ public class PasswordPersistenceManager {
else {
URL oldServerURL2 = new URL(SERVER_URL);
passwords = Platform.getAuthorizationInfo(oldServerURL2, systemTypeId, AUTH_SCHEME);
-
+
// passwords found, so migrate to using new URL
if (passwords != null) {
- savePasswordMap(systemTypeId, passwords);
+ savePasswordMap(systemTypeId, passwords);
}
}
}
@@ -376,13 +381,13 @@ public class PasswordPersistenceManager {
catch (MalformedURLException e) {
RSECorePlugin.getDefault().getLogger().logError("PasswordPersistenceManager.getPasswordMap", e); //$NON-NLS-1$
}
-
- return passwords;
+
+ return passwords;
}
/*
* Retrieve the password map from the keyring for the specified system type
- */
+ */
private void savePasswordMap(String systemTypeId, Map passwords)
{
try
@@ -396,84 +401,34 @@ public class PasswordPersistenceManager {
}
catch (CoreException e) {
RSECorePlugin.getDefault().getLogger().logError("PasswordPersistenceManager.savePasswordMap", e); //$NON-NLS-1$
- }
+ }
}
/**
- * Find the persisted password for the specified systemtype, hostname and userid.
+ * Find the persisted password for the specified systemtype, hostname and userid.
*/
public SystemSignonInformation find(IRSESystemType systemtype, String hostname, String userid)
{
return find(systemtype, hostname, userid, true);
}
-
-
+
+
private boolean removePassword(Map passwords, String hostname, String userid)
{
boolean removed = false;
String password = null;
-
- String passwordKey = getPasswordKey(hostname, userid);
- password =(String) passwords.get(passwordKey);
- if (password != null)
- {
- passwords.remove(passwordKey);
- removed = true;
- }
- else
- {
- String phostname = hostname.toUpperCase();
-
- // DKM - fallback for different case uids, hostnames or qualified/unqualified hostnames
- Iterator keys = passwords.keySet().iterator();
- while (keys.hasNext() && password == null)
- {
- String key = (String)keys.next();
- if (key.equalsIgnoreCase(passwordKey))
- {
- password = (String) passwords.get(key);
- }
- else
- {
- String khostname = getHostnameFromPasswordKey(key).toUpperCase();
- String kuid = getUserIdFromPasswordKey(key);
- if (kuid.equalsIgnoreCase(userid))
- {
- // uid matches, check if hosts are the same
- if (khostname.startsWith(phostname) || phostname.startsWith(khostname))
- {
- String qkhost = RSECorePlugin.getQualifiedHostName(khostname);
- String qphost = RSECorePlugin.getQualifiedHostName(phostname);
- if (qkhost.equals(qphost))
- {
- password = (String)passwords.get(key);
- }
- }
- }
- }
- if (password != null)
- {
- passwords.remove(key);
- removed = true;
-
- }
- }
+
+ String passwordKey = getPasswordKey(hostname, userid);
+ password =(String) passwords.get(passwordKey);
+ if (password != null)
+ {
+ passwords.remove(passwordKey);
+ removed = true;
}
- return removed;
+ else
+ {
+ String phostname = hostname.toUpperCase();
- }
-
- private String getPassword(Map passwords, String hostname, String userid)
- {
- String password = null;
-
- String passwordKey = getPasswordKey(hostname, userid);
- password =(String) passwords.get(passwordKey);
- if (password != null)
- return password;
-
- String phostname = hostname.toUpperCase();
-
// DKM - fallback for different case uids, hostnames or qualified/unqualified hostnames
Iterator keys = passwords.keySet().iterator();
while (keys.hasNext() && password == null)
@@ -501,15 +456,65 @@ public class PasswordPersistenceManager {
}
}
}
+ if (password != null)
+ {
+ passwords.remove(key);
+ removed = true;
+
+ }
}
-
+ }
+ return removed;
+
+ }
+
+ private String getPassword(Map passwords, String hostname, String userid)
+ {
+ String password = null;
+
+ String passwordKey = getPasswordKey(hostname, userid);
+ password =(String) passwords.get(passwordKey);
+ if (password != null)
+ return password;
+
+ String phostname = hostname.toUpperCase();
+
+ // DKM - fallback for different case uids, hostnames or qualified/unqualified hostnames
+ Iterator keys = passwords.keySet().iterator();
+ while (keys.hasNext() && password == null)
+ {
+ String key = (String)keys.next();
+ if (key.equalsIgnoreCase(passwordKey))
+ {
+ password = (String) passwords.get(key);
+ }
+ else
+ {
+ String khostname = getHostnameFromPasswordKey(key).toUpperCase();
+ String kuid = getUserIdFromPasswordKey(key);
+ if (kuid.equalsIgnoreCase(userid))
+ {
+ // uid matches, check if hosts are the same
+ if (khostname.startsWith(phostname) || phostname.startsWith(khostname))
+ {
+ String qkhost = RSECorePlugin.getQualifiedHostName(khostname);
+ String qphost = RSECorePlugin.getQualifiedHostName(phostname);
+ if (qkhost.equals(qphost))
+ {
+ password = (String)passwords.get(key);
+ }
+ }
+ }
+ }
+ }
+
return password;
}
-
+
/**
* Find the persisted password for the specified systemtype, hostname and userid.
- *
+ *
* @param systemtype The system type to check for.
* @param hname The hostname to check for.
* @param userid The user ID to check for.
@@ -525,7 +530,7 @@ public class PasswordPersistenceManager {
}
Map passwords = getPasswordMap(systemtype);
-
+
if (passwords != null)
{
String password = getPassword(passwords, hostname, userid);
@@ -534,20 +539,20 @@ public class PasswordPersistenceManager {
{
return new SystemSignonInformation(hostname, userid, password, systemtype);
}
- }
-
+ }
+
// yantzi: RSE6.2 check for default system type entry with this hostname and user ID
if (checkDefault && !DEFAULT_SYSTEM_TYPE.equals(systemtype))
{
return find(DEFAULT_SYSTEM_TYPE, hostname, userid, false);
}
-
- return null;
+
+ return null;
}
-
+
/**
* Helper class for building the key to lookup the password for a specific
- * userid and hostname in the Map
+ * userid and hostname in the Map
*/
private String getPasswordKey(String hname, String userid)
{
@@ -557,19 +562,19 @@ public class PasswordPersistenceManager {
buffer.append(userid);
return buffer.toString();
}
-
+
private static String getHostnameFromPasswordKey(String passwordKey)
{
int sepIndex = passwordKey.indexOf("//"); //$NON-NLS-1$
return passwordKey.substring(0,sepIndex);
}
-
+
private static String getUserIdFromPasswordKey(String passwordKey)
{
int sepIndex = passwordKey.indexOf("//"); //$NON-NLS-1$
return passwordKey.substring(sepIndex + 2, passwordKey.length());
}
-
+
/**
* Helper method for determining if system type uses case sensitive user IDs
*/
@@ -577,41 +582,41 @@ public class PasswordPersistenceManager {
{
// First find the correct provider
for (int i = 0; i < systemTypes.length; i++)
- {
-
+ {
+
if (systemTypes[i].getSystemType().equals(systemType))
{
return systemTypes[i].isUserIDCaseSensitive();
}
}
-
+
//Not found: Default system type is case sensitive
return true;
}
/**
* Retrieve the list of registered system types
- */
+ */
public IRSESystemType[] getRegisteredSystemTypes()
{
// yantzi: artemis 6.2, added default system type to list
IRSESystemType[] types = new IRSESystemType[systemTypes.length + 1];
-
+
types[0] = DEFAULT_SYSTEM_TYPE;
-
+
for (int i = 0; i < systemTypes.length; i++)
{
types[i + 1] = systemTypes[i].getSystemType();
}
-
+
return types;
}
-
+
/**
* Retrieve a list of the stored user IDs.
*
* @return List A list of the stored user IDs as SystemSignonInformation instances
- * without the saved passwords.
+ * without the saved passwords.
*/
public List getSavedUserIDs()
{
@@ -619,7 +624,7 @@ public class PasswordPersistenceManager {
Map passwords;
String key;
int separator;
-
+
for (int i = 0; i < systemTypes.length; i++)
{
passwords = getPasswordMap(systemTypes[i].getSystemType());
@@ -630,13 +635,13 @@ public class PasswordPersistenceManager {
{
key = (String) keys.next();
separator = key.indexOf("//"); //$NON-NLS-1$
- savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
- key.substring(separator + 2), // userid
- systemTypes[i].getSystemType())); // system type
+ savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
+ key.substring(separator + 2), // userid
+ systemTypes[i].getSystemType())); // system type
}
}
}
-
+
// yantzi: RSE 6.2 Get DEFAULT system types too
passwords = getPasswordMap(DEFAULT_SYSTEM_TYPE);
if (passwords != null)
@@ -646,12 +651,12 @@ public class PasswordPersistenceManager {
{
key = (String) keys.next();
separator = key.indexOf("//"); //$NON-NLS-1$
- savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
- key.substring(separator + 2), // userid
- DEFAULT_SYSTEM_TYPE)); // system type
+ savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
+ key.substring(separator + 2), // userid
+ DEFAULT_SYSTEM_TYPE)); // system type
}
}
-
+
return savedUserIDs;
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
index aaab4eb7d60..decc88b6ead 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
@@ -21,6 +21,7 @@
* Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by priority then Id
* Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
* David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core;
@@ -39,8 +40,8 @@ import org.eclipse.rse.core.comm.SystemKeystoreProviderManager;
import org.eclipse.rse.core.model.ISystemProfileManager;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.core.RSEInitJob;
import org.eclipse.rse.internal.core.RSECoreRegistry;
+import org.eclipse.rse.internal.core.RSEInitJob;
import org.eclipse.rse.internal.core.model.SystemProfileManager;
import org.eclipse.rse.internal.core.model.SystemRegistry;
import org.eclipse.rse.internal.core.subsystems.SubSystemConfigurationProxy;
@@ -53,17 +54,22 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
- * RSECorePlugin provides the activation for the RSE core and acts as the primary
- * registry for logging, persistence, and the main RSE service registries.
- * It should not be extended by other classes.
+ * RSECorePlugin provides the activation for the RSE core and acts as the
+ * primary registry for logging, persistence, and the main RSE service
+ * registries.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
*/
public class RSECorePlugin extends Plugin {
/**
* The plugin id for this plugin. Value "org.eclipse.rse.core".
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final String PLUGIN_ID = "org.eclipse.rse.core"; //$NON-NLS-1$
-
+
/**
* Current release as a number (multiplied by 100). E.g. 300 is for release 3.0.0
*/
@@ -75,29 +81,32 @@ public class RSECorePlugin extends Plugin {
public static final String CURRENT_RELEASE_NAME = "2.0.0"; //$NON-NLS-1$
/**
- * Value 0.
- * Used in isInitComplete(int) which will return true if all phases of
- * initialization are complete.
- * Clients must not assume any particular ordering
- * among phases based on the value.
+ * Initialization phase constant, value 0. Used in
+ * {@link #isInitComplete(int)} which will return true if all phases of
+ * initialization are complete. Clients must not assume any particular
+ * ordering among phases based on the value.
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final int INIT_ALL = 0;
-
+
/**
- * Value 1.
- * Used in isInitComplete(int) which will return true if the model phase of the
- * initialization is complete.
- * Clients must not assume any particular ordering
- * among phases based on the value.
+ * Initialization phase constant, value 1. Used in
+ * {@link #isInitComplete(int)} which will return true if the model phase of
+ * the initialization is complete. Clients must not assume any particular
+ * ordering among phases based on the value.
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final int INIT_MODEL = 1;
-
+
/**
- * Value 2.
- * Used in isInitComplete(int) which will return true if the initializer phase of the
- * initialization is complete.
- * Clients must not assume any particular ordering
- * among phases based on the value.
+ * Initialization phase constant, value 2. Used in
+ * {@link #isInitComplete(int)} which will return true if the initializer
+ * phase of the initialization is complete. Clients must not assume any
+ * particular ordering among phases based on the value.
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final int INIT_INITIALIZER = 2;
@@ -106,7 +115,7 @@ public class RSECorePlugin extends Plugin {
private ISystemRegistry _systemRegistry = null;
private IRSEPersistenceManager _persistenceManager = null;
private ISubSystemConfigurationProxy[] _subsystemConfigurations = null;
-
+
/**
* Returns the singleton instance of RSECorePlugin.
* @return the singleton instance.
@@ -114,115 +123,133 @@ public class RSECorePlugin extends Plugin {
public static RSECorePlugin getDefault() {
return plugin;
}
-
+
/**
- * Waits until the RSE model has been fully restored from its persistent form. Should be used
- * before accessing pieces of the model.
+ * Waits until the RSE model has been fully restored from its persistent
+ * form. Should be used before accessing pieces of the model.
+ *
* @return an IStatus indicating how the initialization ended.
- * @throws InterruptedException if this wait was interrupted for some reason.
+ * @throws InterruptedException if this wait was interrupted for some
+ * reason.
+ * @since org.eclipse.rse.core 3.0
*/
public static IStatus waitForInitCompletion() throws InterruptedException {
return RSEInitJob.getInstance().waitForCompletion();
}
-
+
/**
* Waits until the RSE has completed a specific phase of its initialization.
+ *
* @param phase the phase to wait for completion.
- * @throws InterruptedException if this wait was interrupted for some reason.
+ * @throws InterruptedException if this wait was interrupted for some
+ * reason.
* @throws IllegalArgumentException if the phase is undefined.
* @see #INIT_ALL
* @see #INIT_INITIALIZER
* @see #INIT_MODEL
+ * @since org.eclipse.rse.core 3.0
*/
public static void waitForInitCompletion(int phase) throws InterruptedException {
RSEInitJob.getInstance().waitForCompletion(phase);
}
-
+
/**
+ * Check whether the initialization of the RSE model is complete for a given
+ * phase.
+ *
* @param phase the phase identifier.
- * @return true if initialization of the RSE model is complete for that phase.
- * It will return true if the
- * initialization for that phase has completed regardless its status of that completion.
+ * @return true
if the initialization for the given phase has
+ * completed regardless of its status of that completion.
* @throws IllegalArgumentException if the phase is undefined.
* @see #INIT_ALL
* @see #INIT_INITIALIZER
* @see #INIT_MODEL
+ * @since org.eclipse.rse.core 3.0
*/
public static boolean isInitComplete(int phase) {
return RSEInitJob.getInstance().isComplete(phase);
}
-
+
/**
- * Adds a new listener to the set of listeners to be notified when initialization phases complete.
- * If the listener is added after the phase has completed it will not be invoked.
- * If the listener is already in the set it will not be added again.
- * Listeners may be notified in any order.
+ * Adds a new listener to the set of listeners to be notified when
+ * initialization phases complete. If the listener is added after the phase
+ * has completed it will not be invoked. If the listener is already in the
+ * set it will not be added again. Listeners may be notified in any order.
+ *
* @param listener the listener to be added
+ * @since org.eclipse.rse.core 3.0
*/
public static void addInitListener(IRSEInitListener listener) {
RSEInitJob.getInstance().addInitListener(listener);
}
-
+
/**
- * Removes a listener to the set of listeners to be notified when phases complete.
- * If the listener is not in the set this does nothing.
+ * Removes a listener to the set of listeners to be notified when phases
+ * complete. If the listener is not in the set this does nothing.
+ *
* @param listener the listener to be removed
+ * @since org.eclipse.rse.core 3.0
*/
public static void removeInitListener(IRSEInitListener listener) {
RSEInitJob.getInstance().removeInitListener(listener);
}
/**
- * A static convenience method - fully equivalent to
+ * A static convenience method - fully equivalent to
* RSECorePlugin.getDefault().getRegistry()
.
* @return the RSE Core Registry.
*/
public static IRSECoreRegistry getTheCoreRegistry() {
return getDefault().getCoreRegistry();
}
-
+
/**
- * A static convenience method - fully equivalent to
+ * A static convenience method - fully equivalent to
* RSECorePlugin.getDefault().getPersistenceManager()
.
* @return the persistence manager currently in use for RSE
*/
public static IRSEPersistenceManager getThePersistenceManager() {
return getDefault().getPersistenceManager();
}
-
+
/**
* Return the master profile manager singleton.
+ *
* @return the RSE Profile Manager Singleton.
+ * @since org.eclipse.rse.core 3.0
*/
public static ISystemProfileManager getTheSystemProfileManager() {
return SystemProfileManager.getDefault();
}
- /**
- * Check if the SystemRegistry has been instantiated already.
- * Use this when you don't want to start the system registry as a
- * side effect of retrieving it.
- * @return true
if the System Registry has been instantiated already.
- */
- public static boolean isTheSystemRegistryActive()
- {
- if (plugin == null) {
- return false;
- }
- return getDefault().isSystemRegistryActive();
- }
+ /**
+ * Check if the SystemRegistry has been instantiated already. Use this when
+ * you don't want to start the system registry as a side effect of
+ * retrieving it.
+ *
+ * @return true
if the System Registry has been instantiated
+ * already.
+ * @since org.eclipse.rse.core 3.0
+ */
+ public static boolean isTheSystemRegistryActive()
+ {
+ if (plugin == null) {
+ return false;
+ }
+ return getDefault().isSystemRegistryActive();
+ }
/**
- * A static convenience method - fully equivalent to
+ * A static convenience method - fully equivalent to
* RSECorePlugin.getDefault().getSystemRegistry()
.
* The SystemRegistry is used to gain access to the basic services
- * and components used in RSE.
+ * and components used in RSE.
* @return the RSE System Registry.
*/
public static ISystemRegistry getTheSystemRegistry() {
return getDefault().getSystemRegistry();
}
-
+
/**
* @return the IP host name of this machine
*/
@@ -304,36 +331,36 @@ public class RSECorePlugin extends Plugin {
return _persistenceManager;
}
- /**
- * Test if the SystemRegistry has been instantiated already.
- * Use this when you don't want to start the system registry as a
- * side effect of retrieving it.
- * @return true
if the system registry has been instantiated already.
- */
- private boolean isSystemRegistryActive()
- {
- return (_systemRegistry != null);
- }
-
/**
- * Return the SystemRegistry singleton.
- * Clients should use static @{link getTheSystemRegistry()} instead.
+ * Test if the SystemRegistry has been instantiated already.
+ * Use this when you don't want to start the system registry as a
+ * side effect of retrieving it.
+ * @return true
if the system registry has been instantiated already.
+ */
+ private boolean isSystemRegistryActive()
+ {
+ return (_systemRegistry != null);
+ }
+
+ /**
+ * Return the SystemRegistry singleton.
+ * Clients should use static @{link getTheSystemRegistry()} instead.
* @return the RSE system registry
*/
public ISystemRegistry getSystemRegistry() {
- if (_systemRegistry == null) {
- synchronized(this) {
- if (_systemRegistry == null) {
- String logfilePath = getStateLocation().toOSString();
- SystemRegistry sr = SystemRegistry.getInstance(logfilePath);
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- if (proxies != null) {
- sr.setSubSystemConfigurationProxies(proxies);
- }
- _systemRegistry = sr;
- }
- }
- }
+ if (_systemRegistry == null) {
+ synchronized(this) {
+ if (_systemRegistry == null) {
+ String logfilePath = getStateLocation().toOSString();
+ SystemRegistry sr = SystemRegistry.getInstance(logfilePath);
+ ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
+ if (proxies != null) {
+ sr.setSubSystemConfigurationProxies(proxies);
+ }
+ _systemRegistry = sr;
+ }
+ }
+ }
return _systemRegistry;
}
@@ -349,12 +376,12 @@ public class RSECorePlugin extends Plugin {
public IRSECoreRegistry getCoreRegistry() {
return RSECoreRegistry.getInstance();
}
-
+
/**
- * Returns an instance of the logger being used by the core. All core services, or extensions to
- * core services, should use this logger to log any messages. The RSE logger provides run-time
+ * Returns an instance of the logger being used by the core. All core services, or extensions to
+ * core services, should use this logger to log any messages. The RSE logger provides run-time
* filtering according to user preference and uses the platform's logging capabilities. RSE services
- * should use this logger rather than a platform logger. The logger is defined at plugin start and
+ * should use this logger rather than a platform logger. The logger is defined at plugin start and
* should always be available.
* @return the instance of System#Logger used by the core RSE
*/
@@ -362,7 +389,7 @@ public class RSECorePlugin extends Plugin {
if (logger == null) logger = LoggerFactory.getLogger(this);
return logger;
}
-
+
/**
* Log an unexpected exception that occurs during the functioning of this class.
* @param t the exception to log
@@ -378,68 +405,68 @@ public class RSECorePlugin extends Plugin {
{
// Get reference to the plug-in registry
IExtensionRegistry registry = Platform.getExtensionRegistry();
-
+
// Get configured extenders
IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.core", "keystoreProviders"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
+
+ for (int i = 0; i < systemTypeExtensions.length; i++)
{
// get the name space of the declaring extension
- String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespaceIdentifier();
- String keystoreProviderType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
-
+ String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespaceIdentifier();
+ String keystoreProviderType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
+
// use the name space to get the bundle
- Bundle bundle = Platform.getBundle(nameSpace);
- if (bundle.getState() != Bundle.UNINSTALLED)
- {
- SystemKeystoreProviderManager.getInstance().registerKeystoreProvider(bundle, keystoreProviderType);
- }
+ Bundle bundle = Platform.getBundle(nameSpace);
+ if (bundle.getState() != Bundle.UNINSTALLED)
+ {
+ SystemKeystoreProviderManager.getInstance().registerKeystoreProvider(bundle, keystoreProviderType);
+ }
}
}
- /**
- * Return all elements that extend the org.eclipse.rse.core.subsystemConfigurations extension point
- */
- private IConfigurationElement[] getSubSystemConfigurationPlugins()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] subsystemConfigurationExtensions =
- registry.getConfigurationElementsFor("org.eclipse.rse.core","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * Return all elements that extend the org.eclipse.rse.core.subsystemConfigurations extension point
+ */
+ private IConfigurationElement[] getSubSystemConfigurationPlugins()
+ {
+ // Get reference to the plug-in registry
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ // Get configured extenders
+ IConfigurationElement[] subsystemConfigurationExtensions =
+ registry.getConfigurationElementsFor("org.eclipse.rse.core","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
- return subsystemConfigurationExtensions;
- }
+ return subsystemConfigurationExtensions;
+ }
- /**
- * Return an array of SubSystemConfigurationProxy objects.
- * These represent all extensions to our subsystemConfigurations extension point.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
- {
- if (_subsystemConfigurations != null) // added by PSC
- return _subsystemConfigurations;
+ /**
+ * Return an array of SubSystemConfigurationProxy objects.
+ * These represent all extensions to our subsystemConfigurations extension point.
+ */
+ public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
+ {
+ if (_subsystemConfigurations != null) // added by PSC
+ return _subsystemConfigurations;
- IConfigurationElement[] factoryPlugins = getSubSystemConfigurationPlugins();
- if (factoryPlugins != null)
- {
- List l = new ArrayList();
- for (int idx=0; idx
+ *
*
*/
- public static final int SYSTEM_REMOTE_RESOURCE_CREATED = 1;
+ public static final int SYSTEM_REMOTE_RESOURCE_CREATED = 1;
/**
* Event Type: a remote resource was removed
*
* The event stores the following event parameters:
- *
+ *
*
*/
- public static final int SYSTEM_REMOTE_RESOURCE_DELETED = 2;
+ public static final int SYSTEM_REMOTE_RESOURCE_DELETED = 2;
/**
* Event Type: a remote resource was changed
*
* The event stores the following event parameters:
- *
+ *
*
*/
- public static final int SYSTEM_REMOTE_RESOURCE_CHANGED = 4;
+ public static final int SYSTEM_REMOTE_RESOURCE_CHANGED = 4;
/**
* Event Type: a remote resource was renamed
*
* The event stores the following event parameters:
- *
+ *
*
*/
public static final int SYSTEM_REMOTE_RESOURCE_RENAMED = 8;
-
+
/**
* Event Type: a remote resource was uploaded
*
* The event stores the following event parameters:
- *
- *
+ *
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final int SYSTEM_REMOTE_RESOURCE_UPLOADED = 20;
-
+
/**
* Event Type: a remote resource was downloaded
*
* The event stores the following event parameters:
- *
- *
+ *
+ *
+ * @since org.eclipse.rse.core 3.0
*/
public static final int SYSTEM_REMOTE_RESOURCE_DOWNLOADED = 24;
-
+
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
index c2e1ce93b70..c07fb130bb2 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
@@ -1,25 +1,28 @@
/********************************************************************************
- * 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
+ * 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,
+ * 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) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.events;
import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-
+
/**
* Interface of event ID constants
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISystemResourceChangeEvents
{
@@ -27,26 +30,26 @@ public interface ISystemResourceChangeEvents
* The event is specifically a filter reference add (filter added)
* An ISystemFilter is expected as a parameter of this event
*/
- public static final int EVENT_ADD_FILTER_REFERENCE = 10;
+ public static final int EVENT_ADD_FILTER_REFERENCE = 10;
/**
* The event is specifically a filter reference rename (filter renamed)
* An ISystemFilter is expected as a parameter of this event
*/
- public static final int EVENT_RENAME_FILTER_REFERENCE = 15;
+ public static final int EVENT_RENAME_FILTER_REFERENCE = 15;
/**
* The event is specifically a filter reference delete (filter deleted)
* An ISystemFilter is expected as a parameter of this event
*/
- public static final int EVENT_DELETE_FILTER_REFERENCE = 20;
+ public static final int EVENT_DELETE_FILTER_REFERENCE = 20;
/**
* The event is specifically a filter reference change (filter strings changes)
* An ISystemFilter is expected as a parameter of this event
*/
public static final int EVENT_CHANGE_FILTER_REFERENCE = 25;
-
+
/**
* The event is specifically a filter reference move (filters reordered)
- * An array of ISystemFilter[] is the expected multi-source
+ * An array of ISystemFilter[] is the expected multi-source
* parameter. The source is the first item in that array.
*/
public static final int EVENT_MOVE_FILTER_REFERENCES = 30;
@@ -55,23 +58,23 @@ public interface ISystemResourceChangeEvents
* The event is specifically a filter string reference add (filterstring added)
* An ISystemFilterString is expected as a parameter of this event
*/
- public static final int EVENT_ADD_FILTERSTRING_REFERENCE = 41;
-
+ public static final int EVENT_ADD_FILTERSTRING_REFERENCE = 41;
+
/**
* The event is specifically a filter string reference delete (filterstring deleted)
* An ISystemFilterString is expected as a parameter of this event
*/
- public static final int EVENT_DELETE_FILTERSTRING_REFERENCE = 42;
-
+ public static final int EVENT_DELETE_FILTERSTRING_REFERENCE = 42;
+
/**
* The event is specifically a filter string reference change (filterstring changed)
* An ISystemFilterString is expected as a parameter of this event
*/
public static final int EVENT_CHANGE_FILTERSTRING_REFERENCE = 43;
-
+
/**
* The event is specifically a filter string reference move (filterstrings reordered)
- * An array of ISystemFilterString[] is the expected multi-source
+ * An array of ISystemFilterString[] is the expected multi-source
* parameter. The source is the first item in that array.
*/
public static final int EVENT_MOVE_FILTERSTRING_REFERENCES = 44;
@@ -81,12 +84,12 @@ public interface ISystemResourceChangeEvents
* Any RSE object is the expected parameter
*/
public static final int EVENT_ADD = 50;
-
+
/**
* The event is a multi-resource add.
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
+ * An array of RSE objects (i.e. Object[]) is the multi-source
+ * parameter (the source is the first item in that array) and a parent
+ * RSE object is expected.
*/
public static final int EVENT_ADD_MANY = 51;
@@ -102,35 +105,35 @@ public interface ISystemResourceChangeEvents
* The expected parameters are an RSE object and the selected object
*/
public static final int EVENT_REVEAL_AND_SELECT = 52;
-
+
/**
* The event is a single resource deletion.
* An RSE object is the expected parameter
*/
- public static final int EVENT_DELETE = 55;
+ public static final int EVENT_DELETE = 55;
/**
- * The event is a multiple resource deletion.
- * An array of RSE objects (i.e. Object[]) is the expected multi-source
+ * The event is a multiple resource deletion.
+ * An array of RSE objects (i.e. Object[]) is the expected multi-source
* parameter. The source is the first item in that array.
*/
- public static final int EVENT_DELETE_MANY = 60;
+ public static final int EVENT_DELETE_MANY = 60;
/**
* The event is a resource rename.
* An RSE object is the expected parameter
*/
- public static final int EVENT_RENAME = 65;
+ public static final int EVENT_RENAME = 65;
/**
* The event is a multiple resource move within the same children set
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
+ * An array of RSE objects (i.e. Object[]) is the multi-source
+ * parameter (the source is the first item in that array) and a parent
+ * RSE object is expected.
*/
public static final int EVENT_MOVE_MANY = 75;
- /**
+ /**
* The event is an icon change event
* A source RSE object and it's parent RSE object are the expected parameters
*/
@@ -149,7 +152,7 @@ public interface ISystemResourceChangeEvents
/**
* Refresh the items currently selected in the SystemView.
- *
+ *
* All expanded sub-nodes are re-queried for their children, unexpanded nodes
* lose their children cache. After refreshing, selection of the currently selected
* elements is restored if possible (in case an absoluteName is available).
@@ -177,7 +180,7 @@ public interface ISystemResourceChangeEvents
public static final int EVENT_REFRESH_SELECTED_PARENT = 84;
/**
- * Refresh the filter under which the first item currently selected in the
+ * Refresh the filter under which the first item currently selected in the
* SystemView is found.
*
* From the filter level, all expanded sub-nodes are re-queried
@@ -192,21 +195,21 @@ public interface ISystemResourceChangeEvents
public static final int EVENT_REFRESH_SELECTED_FILTER = 135;
/**
- * Refresh a remote object in the SystemView, given either the remote
+ * Refresh a remote object in the SystemView, given either the remote
* object or a string that will match on getAbsoluteName, and optionally
* (re)select a list of objects after refreshing.
*
* An object is considered remote if it has an adapter that implements
- * {@link ISystemViewElementAdapter} where the adapter returns true for
- * the isRemote(Object) call. This method refreshes all occurrences of
- * the remote object, even under multiple filters. The tricky part about
- * remote objects is their actual memory object changes on each refresh,
- * so to find one in the tree we must use something more permanent: hence
- * the use of getAbsoluteName to find it.
+ * {@link ISystemViewElementAdapter} where the adapter returns true for
+ * the isRemote(Object) call. This method refreshes all occurrences of
+ * the remote object, even under multiple filters. The tricky part about
+ * remote objects is their actual memory object changes on each refresh,
+ * so to find one in the tree we must use something more permanent: hence
+ * the use of getAbsoluteName to find it.
*
*
true
)
- * which is preferred since we do not want to load subsystem configurations unless necessary.
+ * If the type is null, returns all subsystem configurations. Fully
+ * equivalent to getSubSystemConfigurationsBySystemType(systemType,
+ * filterDuplicates, true
) which is preferred since we do
+ * not want to load subsystem configurations unless necessary.
+ *
* @param systemType system type to filter
- * @param filterDuplicates if true and the subsystem configuration uses services then return only one
- * subsystem configuration that supports this service. Which configuration is returned is undefined.
+ * @param filterDuplicates if true and the subsystem configuration uses
+ * services then return only one subsystem configuration that
+ * supports this service. Which configuration is returned is
+ * undefined.
* @return an array of subsystem configurations meeting the criteria
*/
public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, boolean filterDuplicates);
/**
* Return all subsystem configurations which support the given system type.
- * If the type is null, returns all subsystem confgurations.
+ * If the type is null, returns all subsystem configurations.
+ *
* @param systemType system type to filter
- * @param filterDuplicates if true and the subsystem configuration uses services then return only one
- * subsystem configuration that supports this service. Which configuration is returned is undefined.
- * @param activate if true activate the respective configurations if not already active, if false return only those that are already active.
+ * @param filterDuplicates if true and the subsystem configuration uses
+ * services then return only one subsystem configuration that
+ * supports this service. Which configuration is returned is
+ * undefined.
+ * @param activate if true activate the respective configurations if not
+ * already active, if false return only those that are already
+ * active.
* @return an array of subsystem configurations meeting the criteria
+ * @since org.eclipse.rse.core 3.0
*/
public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, boolean filterDuplicates, boolean activate);
@@ -496,22 +507,28 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
public IHost createHost(IRSESystemType systemType, String connectionName, String hostAddress, String description) throws Exception;
/**
- * Create a host object. The resulting host object is added to the list of existing host objects
- * in the specified profile.
+ * Create a host object. The resulting host object is added to the list of
+ * existing host objects in the specified profile.
*
*
* true
to create subsystems for the host, false
otherwise.
- * @return IHost object, or null if it failed to create. This is typically because the hostName is not unique. Call getLastException() if necessary.
- * @since 3.0
+ * @param createSubSystems true
to create subsystems for the
+ * host, false
otherwise.
+ * @return IHost object, or null if it failed to create. This is typically
+ * because the hostName is not unique. Call getLastException() if
+ * necessary.
+ * @since org.eclipse.rse.core 3.0
*/
public IHost createHost(String profileName, IRSESystemType systemType, String hostName, String hostAddress, String description, boolean createSubSystems) throws Exception;
@@ -735,13 +752,17 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l);
/**
- * De-Register your interest in being told when a remote resource is changed.
+ * Unregister your interest in being told when a remote resource is changed.
*/
public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l);
/**
- * Query if the ISystemRemoteChangeListener is already listening for SystemRemoteChange events
+ * Query if the ISystemRemoteChangeListener is already listening for
+ * SystemRemoteChange events.
+ *
+ * @param l the listener instance to check
+ * @since org.eclipse.rse.core 3.0
*/
public boolean isRegisteredSystemRemoteChangeListener(ISystemRemoteChangeListener l);
@@ -792,7 +813,7 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l);
/**
- * De-Register your interest in being told when a system preference changes
+ * Unregister your interest in being told when a system preference changes
*/
public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
index bb841c8e1f1..db294a1e3b6 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
@@ -1,20 +1,21 @@
/********************************************************************************
- * 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
+ * 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,
+ * 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) - 168977: refactoring IConnectorService
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType()
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
+ * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType()
+ * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -25,23 +26,27 @@ import org.eclipse.rse.core.model.IRSEModelObject;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
/**
- * A connector service provides the means of establishing a connection from
- * a subsystem (or a number of subsystems) to a target system (a host).
+ * A connector service provides the means of establishing a connection from a
+ * subsystem (or a number of subsystems) to a target system (a host).
*
- * The RSE SystemView allows the same remote object to be displayed
- * in multiple different contexts, i.e. under multiple different
- * filters. In this case, each occurrence of the same object must
- * return the same absolute name. For the reverse mapping, however,
- * this method may return only one context object even though
- * multiple different ones are shown in the SystemView.
+ *
The RSE
+ * SystemView allows the same remote object to be displayed in multiple
+ * different contexts, i.e. under multiple different filters. In this case,
+ * each occurrence of the same object must return the same absolute name.
+ * For the reverse mapping, however, this method may return only one context
+ * object even though multiple different ones are shown in the SystemView.
+ * null
.
+ * @param key the unique id of the remote object. Must not be
+ * null
.
* @param monitor the progress monitor
- * @return the remote object instance, or null
if no
- * object is found with the given id.
- * @throws Exception in case an error occurs contacting the remote
- * system while retrieving the requested remote object.
- * Extenders are encouraged to throw {@link SystemMessageException}
- * in order to support good user feedback in case of errors.
- * Since exceptions should only occur while retrieving new
- * remote objects during startup, clients are typically allowed
- * to ignore these exceptions and treat them as if the remote
- * object were simply not there.
+ * @return the remote object instance, or null
if no object
+ * is found with the given id.
+ * @throws Exception in case an error occurs contacting the remote system
+ * while retrieving the requested remote object. Extenders are
+ * encouraged to throw {@link SystemMessageException} in order
+ * to support good user feedback in case of errors. Since
+ * exceptions should only occur while retrieving new remote
+ * objects during startup, clients are typically allowed to
+ * ignore these exceptions and treat them as if the remote
+ * object were simply not there.
+ * @since org.eclipse.rse.core 3.0
*/
public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception;
-
+
/**
- * @deprecated - use getObjectwithAbsoluteName(String key, IProgressMonitor monitor)
- * @param key
- * @return
- * @throws Exception
+ * Return the remote object that corresponds to the specified unique ID.
+ *
+ * @param key the unique id of the remote object. Must not be
+ * null
.
+ * @return the remote object instance, or null
if no object
+ * is found with the given id.
+ * @throws Exception in case an error occurs contacting the remote system
+ * while retrieving the requested remote object.
+ * @deprecated - use getObjectwithAbsoluteName(String key, IProgressMonitor
+ * monitor)
*/
public Object getObjectWithAbsoluteName(String key) throws Exception;
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
index ea798ca8720..cb9a8b9f23f 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
@@ -1,22 +1,23 @@
/********************************************************************************
* 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
+ * 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,
+ * 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) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * 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()
+ * 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
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -38,12 +39,16 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
/**
* Interface implemented by SubSystem objects.
*
- * While connections contain information to identify a particular remote
- * system, it is the subsystem objects within a connection that contain
- * information unique to a particular tool for that remote system, such as
- * the port the tool uses and the user ID for making the connection.
- * There are a set of default properties, but these can be extended by
- * subsystem providers, by extending SubSystem.
+ * While connections contain information to identify a particular remote system,
+ * it is the subsystem objects within a connection that contain information
+ * unique to a particular tool for that remote system, such as the port the tool
+ * uses and the user ID for making the connection. There are a set of default
+ * properties, but these can be extended by subsystem providers, by extending
+ * SubSystem.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * Clients must extend the abstract SubSystem
class
+ * instead.
*/
public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, IRemoteObjectResolver, ISchedulingRule, IRSEModelObject {
// -------------------------------------
@@ -66,7 +71,8 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
/**
* Set the connector service for this subsystem
- * @param connectorService
+ *
+ * @param connectorService connector service object to set
*/
public void setConnectorService(IConnectorService connectorService);
@@ -82,7 +88,7 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
public IHost getHost();
/**
- * Called on each subsystem associated with a particular {@link IConnectorService} after it connects.
+ * Called on each subsystem associated with a particular {@link IConnectorService} after it connects.
* @param monitor A progress monitor supporting progress reporting and cancellation.
*/
public void initializeSubSystem(IProgressMonitor monitor);
@@ -133,17 +139,24 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
public void deletingConnection();
/**
- * This is a helper method you can call when performing actions that must be certain there
- * is a connection. If there is no connection it will attempt to connect, and if that fails
- * will throw a SystemMessageException you can easily display to the user by using a method
- * in it.
+ * Check if the subsystem is connected, and connect if it's not.
+ *
+ * This is a convenience method which first checks whether the subsystem is
+ * already connected. If not, it automatically checks if it's running on the
+ * dispatch thread or not, and calls the right connect()
+ * method as appropriate. It also performs some exception parsing,
+ * converting Exceptions from connect() into SystemMessageException that can
+ * be displayed to the user by using a method in it.
+ *
+ * @throws SystemMessageException in case of an error connecting
+ * @since org.eclipse.rse.core 3.0
*/
public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException;
// ---------------------------------------------------
- // Methods for business partners to add their own
+ // Methods for business partners to add their own
// persisted attributes to the subsystem object...
- // ---------------------------------------------------
+ // ---------------------------------------------------
/**
* For business partners defining their own subsystems.
@@ -153,7 +166,7 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
* getConnectorService().connect(IProgressMonitor)
.
*
* @param forcePrompt forces the prompt dialog even if the password is in mem
@@ -560,7 +573,7 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
* Return true if this subsystem is to be hidden so it doesn't show in the Remote Systems
* view when a connection is expanded. If so, this subsystem is for programmatic use only,
* or is exposed in alternative view. Such is the case for command subsystems, for example.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @return The value of the Hidden attribute
*/
boolean isHidden();
@@ -570,26 +583,26 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
* Specify true if this subsystem is to be hidden so it doesn't show in the Remote Systems
* view when a connection is expanded. If so, this subsystem is for programmatic use only,
* or is exposed in alternative view. Such is the case for command subsystems, for example.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @param value The new value of the Hidden attribute
*/
void setHidden(boolean value);
/**
* Generated persistent property method
- * Return the object that manages the list of
+ * Return the object that manages the list of
* filter pools referenced by this subsystem.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @return The FilterPoolReferenceManager reference
*/
ISystemFilterPoolReferenceManager getFilterPoolReferenceManager();
/**
* Generated persistent property method
- * Set the object that manages the list of
+ * Set the object that manages the list of
* filter pools referenced by this subsystem. This is called by the subsystem factory
* when creating or restoring subsystems.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* @param l The new value of the FilterPoolReferenceManager reference
*/
void setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager value);
@@ -601,41 +614,52 @@ 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.
+ * 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
.
+ * @since org.eclipse.rse.core 3.0
*/
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)}.
+ * 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.
+ * @since org.eclipse.rse.core 3.0
*/
public void switchServiceFactory(ISubSystemConfiguration configuration);
-
+
/**
- * Determine is this subsystem is compatible with this specified 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.
+ * @return true if the subsystem can switch to this configuration, false
+ * otherwise. Subsystems which are not service subsystems must
+ * return false.
+ * @since org.eclipse.rse.core 3.0
*/
public boolean canSwitchTo(ISubSystemConfiguration configuration);
-
+
//// -------------------------------------
- // // GUI methods
+ // // GUI methods
// // -------------------------------------
// /**
// * Return the single property page to show in the tabbed notebook for the
- // * for SubSystem property of the parent Connection. Return null if no
+ // * for SubSystem property of the parent Connection. 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
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
index ebbd33232d8..e8d0cf5f288 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
@@ -17,7 +17,8 @@
* 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
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
+ * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -38,8 +39,8 @@ import org.eclipse.rse.services.IService;
*
* @noimplement This interface is not intended to be implemented by clients.
* Subsystem configuration implementations must subclass
- * SubSystemConfiguration rather than implementing this interface
- * directly.
+ * SubSystemConfiguration
rather than implementing
+ * this interface directly.
*/
public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvider, IRSEPersistableContainer {
// ---------------------------------
@@ -397,39 +398,55 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
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.
+ * Set the connector service for a particular host. This is usually managed
+ * 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.
+ * @since org.eclipse.rse.core 3.0
*/
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.
+ * 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, or null
+ * if this is not a service subsystem configuration.
+ * @since org.eclipse.rse.core 3.0
*/
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()}.
+ * 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()}, or null
if this is
+ * not a service subsystem configuration.
+ * @since org.eclipse.rse.core 3.0
*/
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.
+ * 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.
+ * @return The instance of {@link IService} which is associated with this
+ * host, or null
if this is not a service subsystem
+ * configuration.
+ * @since org.eclipse.rse.core 3.0
*/
public IService getService(IHost host);
@@ -522,20 +539,24 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
// FILTER POOL METHODS...
// ---------------------------------
/**
- * A subsystem configuration has a filter pool manager for each profile.
- * Get the filter pool manager for the given profile.
+ * Get the filter pool manager for the given profile. A subsystem
+ * configuration has a filter pool manager for each profile.
+ *
* @param profile The system profile for which to get the manager.
- * @param force if true then create the default filters for this subsystem configuration in this profile. This should only be
- * done during initial subsystem creation, not during subsystem restore.
+ * @param force if true then create the default filters for this subsystem
+ * configuration in this profile. This should only be done during
+ * initial subsystem creation, not during subsystem restore.
* @return a filter pool manager
+ * @since org.eclipse.rse.core 3.0
*/
public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile, boolean force);
/**
- * A subsystem configuration has a filter pool manager for each profile.
- * Get the filter pool manager for the given profile.
- * Do not force the creation of default filter pools.
- * Fully equivalent to getFilterPoolManager(profile, false).
+ * Get the filter pool manager for the given profile. A subsystem
+ * configuration has a filter pool manager for each profile. Do not force
+ * the creation of default filter pools. Fully equivalent to
+ * getFilterPoolManager(profile, false).
+ *
* @param profile The system profile for which to get the manager.
* @return a filter pool manager
*/
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java
index 05c72a98258..4fcd70c34bf 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java
@@ -1,52 +1,55 @@
/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation. 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
+ * 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,
+ * 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) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
********************************************************************************/
package org.eclipse.rse.core.subsystems;
/**
* This interface defines constants for the Remote Server Launcher.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
-public interface RemoteServerLauncherConstants
+public interface RemoteServerLauncherConstants
{
-
+
/**
- * Default daemon port, 4075.
+ * Default daemon port, 4075.
*/
public static final int DEFAULT_DAEMON_PORT = 4075;
-
- /**
+
+ /**
* Default REXEC port, 512.
*/
public static final int DEFAULT_REXEC_PORT = 512;
-
+
/**
* Default REXEC path, "/opt/rseserver/".
*/
public static final String DEFAULT_REXEC_PATH = "/opt/rseserver/"; //$NON-NLS-1$
-
+
/**
* Linux REXEC script command, "perl ./server.pl".
*/
public static final String LINUX_REXEC_SCRIPT = "sh -c \"PATH=/opt/j2sdk1.4.2/bin:$PATH; export PATH; perl ./server.pl\""; //$NON-NLS-1$
-
+
/**
* Unix REXEC script command, "./server.sh".
*/
public static final String UNIX_REXEC_SCRIPT = "sh -c \"PATH=/opt/j2sdk1.4.2/bin:$PATH; export PATH; sh server.sh\""; //$NON-NLS-1$
-
+
/**
* Default REXEC script command. TIt is equivalent to LINUX_REXEC_SCRIPT
.
*/
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
index 396d09edd52..477fe15b1d0 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 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
@@ -7,12 +7,12 @@
*
* 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,
+ * 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.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -20,188 +20,126 @@ package org.eclipse.rse.core.subsystems;
import java.util.Arrays;
import java.util.List;
+/**
+ * Server Launch Type Enum type.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients. Use
+ * the {@link #get(int)} or {@link #get(String)} factory methods
+ * instead.
+ */
public final class ServerLaunchType {
/**
- * The 'Daemon' literal value.
- *
- * The server code is to be launched by calling a daemon that is listening on a port.
- *
+ * The 'Daemon' literal value (value 0). The server
+ * code is to be launched by calling a daemon that is listening on a port.
+ *
* @see #DAEMON_LITERAL
- * @model name="Daemon"
- * @generated
- * @ordered
*/
public static final int DAEMON = 0;
/**
- * The 'Rexec' literal value.
- *
- * The server code is to be launched using REXEC
- *
+ * The 'Rexec' literal value (value 1). The server code
+ * is to be launched using REXEC
+ *
* @see #REXEC_LITERAL
- * @model name="Rexec"
- * @generated
- * @ordered
*/
public static final int REXEC = 1;
/**
- * The 'Running' literal value.
- *
- * The server code is to already running, and doesn't need to be launched.
- *
+ * The 'Running' literal value (value 2). The server
+ * code is to already running, and doesn't need to be launched.
+ *
* @see #RUNNING_LITERAL
- * @model name="Running"
- * @generated
- * @ordered
*/
public static final int RUNNING = 2;
/**
- * The 'Telnet' literal value.
- *
- * The server code is to be launched using TELNET.
- *
+ * The 'Telnet' literal value (value 3). The server
+ * code is to be launched using TELNET.
+ *
* @see #TELNET_LITERAL
- * @model name="Telnet"
- * @generated
- * @ordered
*/
public static final int TELNET = 3;
/**
- * The 'SSH' literal value.
- *
- * The server code is to be launched using SSH.
- *
+ * The 'SSH' literal value (value 4). The server code
+ * is to be launched using SSH.
+ *
* @see #SSH_LITERAL
- * @model
- * @generated
- * @ordered
*/
public static final int SSH = 4;
/**
- * The 'FTP' literal value.
- *
- * The server code is to be launched using FTP
- *
+ * The 'FTP' literal value (value 5). The server code
+ * is to be launched using FTP
+ *
* @see #FTP_LITERAL
- * @model
- * @generated
- * @ordered
*/
public static final int FTP = 5;
/**
- * The 'HTTP' literal value.
- *
- * The server code is to be launched using HTTP
- *
+ * The 'HTTP' literal value (value 6). The server code
+ * is to be launched using HTTP
+ *
* @see #HTTP_LITERAL
- * @model
- * @generated
- * @ordered
*/
public static final int HTTP = 6;
/**
* The 'Daemon' literal object.
- *
- *
.
- */
- public static ISubSystem getParentSubSystem(ISystemFilterPoolReference poolReference)
- {
- return (ISubSystem)poolReference.getProvider();
- }
+ /**
+ * Give a filter pool reference, return parent subsystem
+ * Returns this: (SubSystem)poolReference.getProvider()
.
+ */
+ public static ISubSystem getParentSubSystem(ISystemFilterPoolReference poolReference)
+ {
+ return (ISubSystem)poolReference.getProvider();
+ }
+
+ /**
+ * Give a filter pool, return parent subsystem factory
+ */
+ public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPool pool)
+ {
+ return (ISubSystemConfiguration)pool.getProvider();
+ }
+
+ /**
+ * Give a filter, return parent subsystem factory
+ */
+ public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilter filter)
+ {
+ return (ISubSystemConfiguration)filter.getProvider();
+ }
+
+ /**
+ * Give a filter pool or filter, return parent subsystem factory
+ */
+ public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterContainer container)
+ {
+ if (container instanceof ISystemFilterPool)
+ return getParentSubSystemConfiguration((ISystemFilterPool)container);
+ else
+ return getParentSubSystemConfiguration((ISystemFilter)container);
+ }
-
+ /**
+ * Give a filter pool reference, return parent subsystem factory
+ */
+ public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPoolReference poolRef)
+ {
+ ISystemFilterPool pool = poolRef.getReferencedFilterPool();
+ if (pool != null)
+ return getParentSubSystemConfiguration(pool);
+ else
+ return null;
+ }
+ /**
+ * Give a filter reference, return parent subsystem factory
+ */
+ public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterReference filterRef)
+ {
+ ISystemFilter filter = filterRef.getReferencedFilter();
+ if (filter != null)
+ return getParentSubSystemConfiguration(filter);
+ else
+ return null;
+ }
- /**
- * Give a filter pool, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPool pool)
- {
- return (ISubSystemConfiguration)pool.getProvider();
- }
-
- /**
- * Give a filter, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilter filter)
- {
- return (ISubSystemConfiguration)filter.getProvider();
- }
-
- /**
- * Give a filter pool or filter, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterContainer container)
- {
- if (container instanceof ISystemFilterPool)
- return getParentSubSystemConfiguration((ISystemFilterPool)container);
- else
- return getParentSubSystemConfiguration((ISystemFilter)container);
- }
+ /**
+ * Give a filter pool, return its parent filter pool manager
+ */
+ public static ISystemFilterPoolManager getParentSystemFilterPoolManager(ISystemFilterPool pool)
+ {
+ return pool.getSystemFilterPoolManager();
+ }
+ /**
+ * Give a filter pool, return its parent profile
+ */
+ public static ISystemProfile getParentSystemProfile(ISystemFilterPool pool)
+ {
+ return getParentSubSystemConfiguration(pool).getSystemProfile(pool);
+ }
-
- /**
- * Give a filter pool reference, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPoolReference poolRef)
- {
- ISystemFilterPool pool = poolRef.getReferencedFilterPool();
- if (pool != null)
- return getParentSubSystemConfiguration(pool);
- else
- return null;
- }
-
- /**
- * Give a filter reference, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterReference filterRef)
- {
- ISystemFilter filter = filterRef.getReferencedFilter();
- if (filter != null)
- return getParentSubSystemConfiguration(filter);
- else
- return null;
- }
-
- /**
- * Give a filter pool, return its parent filter pool manager
- */
- public static ISystemFilterPoolManager getParentSystemFilterPoolManager(ISystemFilterPool pool)
- {
- return pool.getSystemFilterPoolManager();
- }
- /**
- * Give a filter pool, return its parent profile
- */
- public static ISystemProfile getParentSystemProfile(ISystemFilterPool pool)
- {
- return getParentSubSystemConfiguration(pool).getSystemProfile(pool);
- }
-
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java
index d5771ceb192..f5d0d15862c 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java
@@ -1,13 +1,13 @@
/********************************************************************************
* Copyright (c) 2002, 2007 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
+ * 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,
+ * 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:
@@ -20,24 +20,26 @@ package org.eclipse.rse.internal.core;
/**
* Constants related to project and folder names.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
-public interface SystemResourceConstants
+public interface SystemResourceConstants
{
-
- public static final String RESOURCE_PROJECT_NAME = "RemoteSystemsConnections"; //$NON-NLS-1$
- public static final String RESOURCE_TEMPFILES_PROJECT_NAME= "RemoteSystemsTempFiles"; //$NON-NLS-1$
- public static final String RESOURCE_CONNECTIONS_FOLDER_NAME = "Connections"; //$NON-NLS-1$
- public static final String RESOURCE_FILTERS_FOLDER_NAME = "Filters"; //$NON-NLS-1$
- public static final String RESOURCE_TYPE_FILTERS_FOLDER_NAME = "TypeFilters"; //$NON-NLS-1$
- public static final String RESOURCE_USERACTIONS_FOLDER_NAME = "UserActions"; //$NON-NLS-1$
- public static final String RESOURCE_COMPILECOMMANDS_FOLDER_NAME = "CompileCommands"; //$NON-NLS-1$
-
-
+
+ public static final String RESOURCE_PROJECT_NAME = "RemoteSystemsConnections"; //$NON-NLS-1$
+ public static final String RESOURCE_TEMPFILES_PROJECT_NAME= "RemoteSystemsTempFiles"; //$NON-NLS-1$
+ public static final String RESOURCE_CONNECTIONS_FOLDER_NAME = "Connections"; //$NON-NLS-1$
+ public static final String RESOURCE_FILTERS_FOLDER_NAME = "Filters"; //$NON-NLS-1$
+ public static final String RESOURCE_TYPE_FILTERS_FOLDER_NAME = "TypeFilters"; //$NON-NLS-1$
+ public static final String RESOURCE_USERACTIONS_FOLDER_NAME = "UserActions"; //$NON-NLS-1$
+ public static final String RESOURCE_COMPILECOMMANDS_FOLDER_NAME = "CompileCommands"; //$NON-NLS-1$
+
+
// yantzi: artemis 6.0, offline messages
public static final String MSG_OFFLINE_CANT_CONNECT = "RSEC3001"; //$NON-NLS-1$
// Connection doesn't exist
public static final String MSG_CONNECTION_DELETED = "RSEF5011"; //$NON-NLS-1$
-
+
public static final String MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED = "RSEG1068"; //$NON-NLS-1$
public static final String MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED = "RSEG1069"; //$NON-NLS-1$
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
index ec1b0dd9f9e..80f6ab8fcbd 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,16 +7,21 @@
*
* 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,
+ * 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.
+ * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
*******************************************************************************/
package org.eclipse.rse.persistence.dom;
+/**
+ * Constants used in RSE DOMs.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
public interface IRSEDOMConstants {
// node types
public static final String TYPE_PROFILE = "Profile"; //$NON-NLS-1$
@@ -45,7 +50,7 @@ public interface IRSEDOMConstants {
public static final String ATTRIBUTE_TYPE = "type"; //$NON-NLS-1$
public static final String ATTRIBUTE_DESCRIPTION = "description"; //$NON-NLS-1$
- // host attributes
+ // host attributes
public static final String ATTRIBUTE_HOSTNAME = "hostname"; //$NON-NLS-1$
public static final String ATTRIBUTE_OFFLINE = "offline"; //$NON-NLS-1$
public static final String ATTRIBUTE_SYSTEM_TYPE = "systemType"; //$NON-NLS-1$
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
index a2051ce849a..040274f65b1 100644
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
+++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
@@ -1,35 +1,35 @@
/********************************************************************************
* 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
+ * 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,
+ * 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) - 141803: Fix cpu usage 100% while connecting
* David Dykstal (IBM) - 168870: moved SystemPreferencesManager to a new package
* David Dykstal (IBM) - 168870: created and used RSEPreferencesManager
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
+ * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* David Dykstal (IBM) - 142806: refactoring persistence framework
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
+ * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
+ * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
* Xuan Chen (IBM) - [187342] Open in New Window expand failed error when not connected
* David McKnight (IBM) - [186363] remove deprecated calls in checkIsConnected
* David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
* David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
* David McKnight (IBM) - [212403] [apidoc][breaking] Fixing docs of SubSystem#getConnectorService() and making internalConnect() private
* 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
+ * implemented IServiceSubSystem here so that subsystem configuration switching can be
* made common among all service subsystems.
* David Dykstal (IBM) - [217556] remove service subsystem types
* David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
@@ -123,7 +123,7 @@ import org.eclipse.ui.progress.WorkbenchJob;
* are supplied as empty, so you only override those you want to support).
* These are required:
* (SubSystem)poolReference.getProvider()
- *
* These are optional:
*
@@ -139,53 +139,53 @@ import org.eclipse.ui.progress.WorkbenchJob;
*/
public abstract class SubSystem extends RSEModelObject
- implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
+implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
{
protected static final String SUBSYSTEM_FILE_NAME = "subsystem"; //$NON-NLS-1$
- //protected transient SubSystemConfiguration parentFactory = null;
- protected static final int OPERATION_RESOLVE_ABSOLUTE = 0;
- protected static final int OPERATION_RESOLVE_ABSOLUTES= 1;
- protected static final int OPERATION_RESOLVE_RELATIVE = 2;
- protected static final int OPERATION_RUN_COMMAND = 3;
- protected static final int OPERATION_GET_PROPERTY = 4;
- protected static final int OPERATION_SET_PROPERTY = 5;
- protected static final int OPERATION_GET_PROPERTIES = 6;
- protected static final int OPERATION_SET_PROPERTIES = 7;
- protected static final int OPERATION_CONNECT = 8;
- protected static final int OPERATION_DISCONNECT = 9;
+ //protected transient SubSystemConfiguration parentFactory = null;
+ protected static final int OPERATION_RESOLVE_ABSOLUTE = 0;
+ protected static final int OPERATION_RESOLVE_ABSOLUTES= 1;
+ protected static final int OPERATION_RESOLVE_RELATIVE = 2;
+ protected static final int OPERATION_RUN_COMMAND = 3;
+ protected static final int OPERATION_GET_PROPERTY = 4;
+ protected static final int OPERATION_SET_PROPERTY = 5;
+ protected static final int OPERATION_GET_PROPERTIES = 6;
+ protected static final int OPERATION_SET_PROPERTIES = 7;
+ protected static final int OPERATION_CONNECT = 8;
+ protected static final int OPERATION_DISCONNECT = 9;
protected static final int OPERATION_RUN_SHELL = 10;
protected static final int OPERATION_SEND_COMMAND_TO_SHELL = 11;
protected static final int OPERATION_CANCEL_SHELL = 12;
protected static final int OPERATION_REMOVE_SHELL = 13;
-
- protected ISubSystemConfiguration parentSubSystemConfiguration;
- protected String previousUserIdKey;
-
- protected Shell shell = null;
- protected boolean supportsConnecting = true;
- protected boolean sortResults = true;
- protected boolean runInThread = true;
-
- protected boolean cancelable = true;
- protected boolean doConnection = false;
- protected ProgressMonitorDialog pmDialog;
- protected String saveFileName;
+
+ protected ISubSystemConfiguration parentSubSystemConfiguration;
+ protected String previousUserIdKey;
+
+ protected Shell shell = null;
+ protected boolean supportsConnecting = true;
+ protected boolean sortResults = true;
+ protected boolean runInThread = true;
+
+ protected boolean cancelable = true;
+ protected boolean doConnection = false;
+ protected ProgressMonitorDialog pmDialog;
+ protected String saveFileName;
protected IConnectorService _connectorService = null;
-
+
protected boolean _connectionError = false;
protected boolean _disconnecting = false;
protected IHost _host;
-
+
protected String _name = null;
protected String _subsystemConfigurationId = null;
protected boolean _hidden = false;
-
+
/**
* @generated This field/method will be replaced during code generation.
*/
@@ -199,7 +199,7 @@ public abstract class SubSystem extends RSEModelObject
runnable.run(monitor);
}
}
-
+
public class SystemMessageDialogRunnable implements Runnable
{
@@ -208,14 +208,14 @@ public abstract class SubSystem extends RSEModelObject
{
_dlg = dlg;
}
-
+
public void run()
{
_dlg.open();
}
}
- protected SubSystem(IHost host, IConnectorService connectorService)
+ protected SubSystem(IHost host, IConnectorService connectorService)
{
super();
_host = host;
@@ -223,85 +223,85 @@ public abstract class SubSystem extends RSEModelObject
_connectorService.registerSubSystem(this);
}
- /**
- * Internal method to select the appropriate command subsystem when there are multiple defined for this connection.
- * The default implementation is to return the first, but child classes can refine this. Input is always an array of
- * length greater than one.
- */
- protected ISubSystem selectCommandSubSystem(ISubSystem[] allCmdSubSystems)
- {
- if (allCmdSubSystems != null && allCmdSubSystems.length > 0)
- return allCmdSubSystems[0];
- return null;
- }
-
- /**
- * Return the parent subsystem factory that owns this subsystem.
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- return parentSubSystemConfiguration;
- }
- /**
- * Return the parent subsystem factory that owns this subsystem.
- */
- public void setSubSystemConfiguration(ISubSystemConfiguration ssf)
- {
- parentSubSystemConfiguration = ssf;
- supportsConnecting = ssf.supportsSubSystemConnect();
- //System.out.println("subsystem supports connecting? " + supportsConnecting);
- }
- /**
- * Set the parent connection that owns this subsystem.
- */
- public void setHost(IHost conn)
- {
- _host = conn;
- previousUserIdKey = getPreferencesKey();
- }
+ /**
+ * Internal method to select the appropriate command subsystem when there are multiple defined for this connection.
+ * The default implementation is to return the first, but child classes can refine this. Input is always an array of
+ * length greater than one.
+ */
+ protected ISubSystem selectCommandSubSystem(ISubSystem[] allCmdSubSystems)
+ {
+ if (allCmdSubSystems != null && allCmdSubSystems.length > 0)
+ return allCmdSubSystems[0];
+ return null;
+ }
- /**
- * Return true if userId and password should be forced to uppercase.
- * INTERACTIVEcut to calling same method in parent connection.
- */
- public boolean forceUserIdToUpperCase()
- {
- /* defect 43219
+ /**
+ * Return the parent subsystem factory that owns this subsystem.
+ */
+ public ISubSystemConfiguration getSubSystemConfiguration()
+ {
+ return parentSubSystemConfiguration;
+ }
+ /**
+ * Return the parent subsystem factory that owns this subsystem.
+ */
+ public void setSubSystemConfiguration(ISubSystemConfiguration ssf)
+ {
+ parentSubSystemConfiguration = ssf;
+ supportsConnecting = ssf.supportsSubSystemConnect();
+ //System.out.println("subsystem supports connecting? " + supportsConnecting);
+ }
+ /**
+ * Set the parent connection that owns this subsystem.
+ */
+ public void setHost(IHost conn)
+ {
+ _host = conn;
+ previousUserIdKey = getPreferencesKey();
+ }
+
+ /**
+ * Return true if userId and password should be forced to uppercase.
+ * INTERACTIVEcut to calling same method in parent connection.
+ */
+ public boolean forceUserIdToUpperCase()
+ {
+ /* defect 43219
if (parentSubSystemConfiguration != null)
return parentSubSystemConfiguration.forceUserIdToUpperCase();
else
return true;
- */
- IHost currConn = getHost();
- if (currConn != null)
- return currConn.getForceUserIdToUpperCase();
- else
- return false;
- }
+ */
+ IHost currConn = getHost();
+ if (currConn != null)
+ return currConn.getForceUserIdToUpperCase();
+ else
+ return false;
+ }
- /**
- * The profile is being renamed, so we are called to do our thing with
- * any information stored that is keyed by the profile name.
- *
*/
protected void internalDisconnect(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- try
- {
- getConnectorService().disconnect(monitor);
+ throws InvocationTargetException, InterruptedException
+ {
+ try
+ {
+ getConnectorService().disconnect(monitor);
}
catch (InterruptedException exc) {
throw exc;
@@ -2617,35 +2616,35 @@ public abstract class SubSystem extends RSEModelObject
throw exc;
}
catch(Exception exc) {
- throw new InvocationTargetException(exc);
+ throw new InvocationTargetException(exc);
}
- }
+ }
/**
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- * super.getObjectWithAbsoluteName(key)
@@ -809,15 +808,15 @@ public abstract class SubSystem extends RSEModelObject
* @param key the unique id of the remote object.
* Must not be null
.
* @param monitor the progress monitor
- * @return the remote object instance, or null
if no
+ * @return the remote object instance, or null
if no
* object is found with the given id.
- * @throws Exception in case an error occurs contacting the remote
+ * @throws Exception in case an error occurs contacting the remote
* system while retrieving the requested remote object.
* Extenders are encouraged to throw {@link SystemMessageException}
* in order to support good user feedback in case of errors.
- * Since exceptions should only occur while retrieving new
- * remote objects during startup, clients are typically allowed
- * to ignore these exceptions and treat them as if the remote
+ * Since exceptions should only occur while retrieving new
+ * remote objects during startup, clients are typically allowed
+ * to ignore these exceptions and treat them as if the remote
* object were simply not there.
*/
public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
@@ -826,7 +825,7 @@ public abstract class SubSystem extends RSEModelObject
// Return null when no such filter is found.
return getFilterReferenceWithAbsoluteName(key);
}
-
+
/**
* @deprecated use getObjectWithAbsoluteName(String key, IProgressMonitor monitor)
*/
@@ -868,13 +867,13 @@ public abstract class SubSystem extends RSEModelObject
{
ISystemFilter filter = filterPool.getSystemFilter(filterName);
ISystemFilterReference ref = filterMgr.getSystemFilterReference(this, filter);
- if (ref != null)
+ if (ref != null)
{
// if we get here, it's a filter
return ref;
}
}
- }
+ }
}
}
catch (Exception e)
@@ -882,13 +881,13 @@ public abstract class SubSystem extends RSEModelObject
}
return null;
}
-
-
+
+
// ---------------------------------------------------
- // Methods for business partners to add their own
+ // Methods for business partners to add their own
// persisted attributes to the subsystem object...
- // ---------------------------------------------------
-
+ // ---------------------------------------------------
+
/**
* @deprecated use property sets directly now
*/
@@ -915,14 +914,14 @@ public abstract class SubSystem extends RSEModelObject
{
return null;
}
- }
+ }
+
-
// ---------------------------------------------------
- // Methods for ISVs to add their own
+ // Methods for ISVs to add their own
// persisted attributes to the subsystem object...
- // ---------------------------------------------------
-
+ // ---------------------------------------------------
+
/**
* @deprecated
*/
@@ -936,7 +935,7 @@ public abstract class SubSystem extends RSEModelObject
set.addProperty(attributeName, attributeValue);
}
/**
- * @deprecated
+ * @deprecated
*/
public String getRemoteAttribute(String attributeName)
{
@@ -949,27 +948,27 @@ public abstract class SubSystem extends RSEModelObject
{
return null;
}
- }
-
-
-
-
-
- // ------------------
- // Utility methods...
- // ------------------
-
- /**
- * Return the host name for the connection this system's subsystem is associated with
- */
- public String getHostName()
- {
- IHost conn = getHost();
- if (conn == null)
- return null;
- else
- return conn.getHostName();
- }
+ }
+
+
+
+
+
+ // ------------------
+ // Utility methods...
+ // ------------------
+
+ /**
+ * Return the host name for the connection this system's subsystem is associated with
+ */
+ public String getHostName()
+ {
+ IHost conn = getHost();
+ if (conn == null)
+ return null;
+ else
+ return conn.getHostName();
+ }
/**
* Display message on message thread
@@ -985,11 +984,11 @@ public abstract class SubSystem extends RSEModelObject
* Nested class which extends WorkbenchJob to allow us to show an error message, which is a GUI operation,
* from a non-GUI thread. This is done by creating an instance of this class and then scheduling it.
*/
- public static class DisplayErrorMessageJob extends WorkbenchJob
+ public static class DisplayErrorMessageJob extends WorkbenchJob
{
private Shell shell;
private SystemMessageException msgExc;
-
+
/**
* Constructor
*/
@@ -999,17 +998,17 @@ public abstract class SubSystem extends RSEModelObject
this.shell = shell; //FIXME remove this
this.msgExc = msgExc;
}
-
+
/**
* @see UIJob#run(IProgressMonitor monitor)
*/
- public IStatus runInUIThread(IProgressMonitor monitor)
+ public IStatus runInUIThread(IProgressMonitor monitor)
{
if ((shell != null) && (shell.isDisposed() || !shell.isEnabled() || !shell.isVisible()))
- shell = null;
+ shell = null;
if (shell == null)
{
- Shell[] shells = Display.getCurrent().getShells();
+ Shell[] shells = Display.getCurrent().getShells();
for (int i = 0; i < shells.length && shell == null; i++)
if (!shells[i].isDisposed() && shells[i].isVisible() && shells[i].isEnabled())
shell = shells[i];
@@ -1017,9 +1016,9 @@ public abstract class SubSystem extends RSEModelObject
if (shell != null)
SystemMessageDialog.displayMessage(shell, msgExc);
return Status.OK_STATUS;
- }
+ }
}
-
+
// ---------------------------------------------------
// SystemFilterPoolReferenceManagerProvider methods...
// ---------------------------------------------------
@@ -1030,58 +1029,58 @@ public abstract class SubSystem extends RSEModelObject
public ISystemFilterPoolReferenceManager getSystemFilterPoolReferenceManager()
{
return getFilterPoolReferenceManager();
- }
- /*
- * Helper method to fire an event...
- */
- protected void fireEvent(SystemResourceChangeEvent event)
- {
- RSECorePlugin.getTheSystemRegistry().fireEvent(event);
- }
- /*
- * Helper method to fire a reference event...
- */
- protected void fireEvent(SystemResourceChangeEvent event, Object grandParent)
- {
- event.setGrandParent(grandParent);
- RSECorePlugin.getTheSystemRegistry().fireEvent(event);
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object src, int eventId, Object parent)
- {
- fireEvent(new SystemResourceChangeEvent(src, eventId, parent));
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object[] multiSrc, int eventId, Object parent)
- {
- fireEvent(new SystemResourceChangeEvent(multiSrc, eventId, parent));
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object[] src, int eventId, Object parent, int position)
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(src, eventId, parent);
- event.setPosition(position);
- fireEvent(event);
- }
+ }
+ /*
+ * Helper method to fire an event...
+ */
+ protected void fireEvent(SystemResourceChangeEvent event)
+ {
+ RSECorePlugin.getTheSystemRegistry().fireEvent(event);
+ }
+ /*
+ * Helper method to fire a reference event...
+ */
+ protected void fireEvent(SystemResourceChangeEvent event, Object grandParent)
+ {
+ event.setGrandParent(grandParent);
+ RSECorePlugin.getTheSystemRegistry().fireEvent(event);
+ }
+ /*
+ * Helper method to create and then fire an event...
+ */
+ protected void fireEvent(Object src, int eventId, Object parent)
+ {
+ fireEvent(new SystemResourceChangeEvent(src, eventId, parent));
+ }
+ /*
+ * Helper method to create and then fire an event...
+ */
+ protected void fireEvent(Object[] multiSrc, int eventId, Object parent)
+ {
+ fireEvent(new SystemResourceChangeEvent(multiSrc, eventId, parent));
+ }
+ /*
+ * Helper method to create and then fire an event...
+ */
+ protected void fireEvent(Object[] src, int eventId, Object parent, int position)
+ {
+ SystemResourceChangeEvent event = new SystemResourceChangeEvent(src, eventId, parent);
+ event.setPosition(position);
+ fireEvent(event);
+ }
- /*
- * Helper method to create and then fire a reference event...
- */
- protected void fireEvent(Object src, int eventId, Object parent, Object grandParent)
- {
- fireEvent(new SystemResourceChangeEvent(src, eventId, parent), grandParent);
- }
- // -------------------------------
- // FILTER POOL REFERENCE EVENTS...
- // -------------------------------
+ /*
+ * Helper method to create and then fire a reference event...
+ */
+ protected void fireEvent(Object src, int eventId, Object parent, Object grandParent)
+ {
+ fireEvent(new SystemResourceChangeEvent(src, eventId, parent), grandParent);
+ }
+ // -------------------------------
+ // FILTER POOL REFERENCE EVENTS...
+ // -------------------------------
- /**
+ /**
* A new filter pool reference has been created. Fire the appropriate events for this.
*/
public void filterEventFilterPoolReferenceCreated(ISystemFilterPoolReference newPoolRef) {
@@ -1104,860 +1103,860 @@ public abstract class SubSystem extends RSEModelObject
}
/**
- * A filter pool reference has been deleted
- */
- public void filterEventFilterPoolReferenceDeleted(ISystemFilterPoolReference filterPoolRef)
- {
- if (getSubSystemConfiguration().showFilterPools())
- {
- fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_DELETE, this);
- }
- else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
- {
- ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
- fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
- }
+ * A filter pool reference has been deleted
+ */
+ public void filterEventFilterPoolReferenceDeleted(ISystemFilterPoolReference filterPoolRef)
+ {
+ if (getSubSystemConfiguration().showFilterPools())
+ {
+ fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_DELETE, this);
+ }
+ else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
+ {
+ ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
+ fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
+ }
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * A single filter pool reference has been reset to reference a new pool
- */
- public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef)
- {
- fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, this); // we assume its a move operation so little impact
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * All filter pool references has been reset. Happens after SelectFilterPools dialog
- */
- public void filterEventFilterPoolReferencesReset()
- {
- fireEvent(this, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, this);
- try
- {
- getSubSystemConfiguration().saveSubSystem(this);
- ISystemFilterPoolReference[] poolRefs = getFilterPoolReferenceManager().getSystemFilterPoolReferences();
- for (int idx=0; idxkeys
- */
- public SetPropertiesJob(Object subject, String[] keys, String[] values)
- {
- super(RSECoreMessages.RSESubSystemOperation_Set_properties_message);
- _subject = subject;
- _keys = keys;
- _values = values;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getSettingMessage();
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
- if (!implicitConnect(false, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = new Object[] {internalSetProperties(_subject, _keys, _values, mon)};
- }
- }
+ msg = getResolvingMessage(_filterString);
- /**
- * Represents the subsystem operation of connecting the subsystem to the remote machine.
- */
- public class ConnectJob extends SubSystemOperationJob
- {
- private SubSystem _ss;
- private IRSECallback _callback;
-
- public ConnectJob(SubSystem ss, IRSECallback callback)
- {
- super(RSECoreMessages.RSESubSystemOperation_Connect_message);
- _ss = ss;
- _callback = callback;
- }
-
- public IStatus run(IProgressMonitor monitor) {
- IStatus status = super.run(monitor);
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputs = internalResolveFilterString(_filterString, mon);
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of resolving a set of absolute filter strings.
+ */
+ protected class ResolveAbsolutesJob extends SubSystemOperationJob
+ {
+ protected String _filterString;
+ protected String[] _filterStrings;
+
+ /**
+ * Create a new ResolveAbsolutesJob
+ * @param filterStrings the set of absolute filter strings to resolve
+ */
+ public ResolveAbsolutesJob(String filterString, String[] filterStrings)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
+ _filterString = filterString;
+ _filterStrings = filterStrings;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+
+ msg = getResolvingMessage(_filterString);
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputs = internalResolveFilterStrings(_filterStrings, mon);
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of resolving relative filter strings.
+ */
+ protected class ResolveRelativeJob extends SubSystemOperationJob
+ {
+ protected String _filterString;
+ protected Object _parent;
+
+ /**
+ * Create a new ResolveRelativeJob
+ * @param filterString the relative filter string to resolve
+ * @param parent the object within which the relative filter string will be resolved
+ */
+ public ResolveRelativeJob(String filterString, Object parent)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Resolve_filter_strings_message);
+ _filterString = filterString;
+ _parent = parent;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+
+ if (_filterString == null)
+ {
+ // DKM - we shouldn't be using parent context for filter strings because
+ // now we have multiple contexts for the same resources
+ _filterString = "*"; //$NON-NLS-1$
+ }
+ msg = getResolvingMessage(_filterString);
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputs = internalResolveFilterString(_parent, _filterString, mon);
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of getting a property value from a remote object.
+ */
+ protected class GetPropertyJob extends SubSystemOperationJob
+ {
+ protected Object _subject;
+ protected String _key;
+
+ /**
+ * Constructs a new GetPropertyJob
+ * @param subject The object whose property will be queried
+ * @param key The property to query
+ */
+ public GetPropertyJob(Object subject, String key)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Get_property_message);
+ _subject = subject;
+ _key = key;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+
+ msg = getQueryingMessage(_key);
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputStrings = new String[] {internalGetProperty(_subject, _key, mon)};
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of setting a property of a remote object.
+ */
+ protected class SetPropertyJob extends SubSystemOperationJob
+ {
+ protected Object _subject;
+ protected String _key;
+ protected String _value;
+
+ /**
+ * Constructs a new SetPropertyJob
+ * @param subject the object whose property is to be set
+ * @param key the property to set
+ * @param value the new value for the property
+ */
+ public SetPropertyJob(Object subject, String key, String value)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Set_property_message);
+ _subject = subject;
+ _key = key;
+ _value = value;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+ msg = getSettingMessage(_key);
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputs = new Object[] {internalSetProperty(_subject, _key, _value, mon)};
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of getting a set of property values from a remote object.
+ */
+ protected class GetPropertiesJob extends SubSystemOperationJob
+ {
+ protected Object _subject;
+ protected String[] _keys;
+
+ /**
+ * Constructs a new GetPropertiesJob
+ * @param subject the object on which to perform the property query
+ * @param keys the properties to query
+ */
+ public GetPropertiesJob(Object subject, String[] keys)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Get_properties_message);
+ _subject = subject;
+ _keys = keys;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+ msg = getQueryingMessage();
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputStrings = internalGetProperties(_subject, _keys, mon);
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of setting a set of properties of a remote object.
+ */
+ protected class SetPropertiesJob extends SubSystemOperationJob
+ {
+ protected Object _subject;
+ protected String[] _keys;
+ protected String[] _values;
+
+ /**
+ * Constructs a new SetPropertiesJob
+ * @param subject the object whose properties are to be set
+ * @param keys the set of properties to set
+ * @param values the set of new values for the properties, corresponding with keys
+ */
+ public SetPropertiesJob(Object subject, String[] keys, String[] values)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Set_properties_message);
+ _subject = subject;
+ _keys = keys;
+ _values = values;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
+
+ msg = getSettingMessage();
+
+ if (!implicitConnect(false, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ runOutputs = new Object[] {internalSetProperties(_subject, _keys, _values, mon)};
+ }
+ }
+
+ /**
+ * Represents the subsystem operation of connecting the subsystem to the remote machine.
+ */
+ public class ConnectJob extends SubSystemOperationJob
+ {
+ private SubSystem _ss;
+ private IRSECallback _callback;
+
+ public ConnectJob(SubSystem ss, IRSECallback callback)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Connect_message);
+ _ss = ss;
+ _callback = callback;
+ }
+
+ public IStatus run(IProgressMonitor monitor) {
+ IStatus status = super.run(monitor);
if (_callback != null)
{
_callback.done(status, null);
}
return status;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
- SystemBasePlugin.logInfo(msg);
+ }
- if (!implicitConnect(true, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- internalConnect(mon);
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
+ {
+ String msg = null;
+ int totalWorkUnits = IProgressMonitor.UNKNOWN;
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
+ SystemBasePlugin.logInfo(msg);
+
+ if (!implicitConnect(true, mon, msg, totalWorkUnits)){
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
+ throw new Exception(msgTxt);
+ }
+ internalConnect(mon);
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
registry.connectedStatusChange(_ss, true, false);
- }
- }
+ }
+ }
- /**
- * Represents the subsystem operation of disconnecting the subsystem to the remote machine.
- */
- protected class DisconnectJob extends SubSystemOperationJob
- {
- public class PostDisconnect implements Runnable
- {
-
- public void run()
- {
- getConnectorService().reset();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.connectedStatusChange(_subsystem, false, true, _collapseTree);
- }
-
- }
-
- private boolean _collapseTree;
- private SubSystem _subsystem;
- public DisconnectJob(boolean collapseTree, SubSystem subsystem)
- {
- super(RSECoreMessages.RSESubSystemOperation_Disconnect_message);
- _collapseTree = collapseTree;
- _subsystem = subsystem;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
- {
- internalDisconnect(mon);
- _disconnecting = false;
- _connectionError = false;
- Display.getDefault().asyncExec(new PostDisconnect());
- }
-
- }
+ /**
+ * Represents the subsystem operation of disconnecting the subsystem to the remote machine.
+ */
+ protected class DisconnectJob extends SubSystemOperationJob
+ {
+ public class PostDisconnect implements Runnable
+ {
- /**
- * Represents the operation of changing the connection status of this subsystem.
- */
- protected class ChangeStatusJob extends UIJob
- {
- private final ISubSystem _subsystem;
-
- public ChangeStatusJob(ISubSystem ss)
- {
- super(RSECoreMessages.RSESubSystemOperation_Notifying_registry_message);
- _subsystem = ss;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- final ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.connectedStatusChange(_subsystem, true, false);
- return Status.OK_STATUS;
- }
- }
-
- protected boolean implicitConnect(boolean isConnectOperation, IProgressMonitor mon, String msg, int totalWorkUnits) throws SystemMessageException, InvocationTargetException, InterruptedException
- {
+ public void run()
+ {
+ getConnectorService().reset();
+ ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
+ sr.connectedStatusChange(_subsystem, false, true, _collapseTree);
+ }
+
+ }
+
+ private boolean _collapseTree;
+ private SubSystem _subsystem;
+ public DisconnectJob(boolean collapseTree, SubSystem subsystem)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Disconnect_message);
+ _collapseTree = collapseTree;
+ _subsystem = subsystem;
+ }
+
+ public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
+ {
+ internalDisconnect(mon);
+ _disconnecting = false;
+ _connectionError = false;
+ Display.getDefault().asyncExec(new PostDisconnect());
+ }
+
+ }
+
+ /**
+ * Represents the operation of changing the connection status of this subsystem.
+ */
+ protected class ChangeStatusJob extends UIJob
+ {
+ private final ISubSystem _subsystem;
+
+ public ChangeStatusJob(ISubSystem ss)
+ {
+ super(RSECoreMessages.RSESubSystemOperation_Notifying_registry_message);
+ _subsystem = ss;
+ }
+
+ public IStatus runInUIThread(IProgressMonitor monitor)
+ {
+ final ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
+ sr.connectedStatusChange(_subsystem, true, false);
+ return Status.OK_STATUS;
+ }
+ }
+
+ protected boolean implicitConnect(boolean isConnectOperation, IProgressMonitor mon, String msg, int totalWorkUnits) throws SystemMessageException, InvocationTargetException, InterruptedException
+ {
boolean didConnection = false;
- if ( doConnection && !isConnected())// caller wants to do connection first as part operation
- {
+ if ( doConnection && !isConnected())// caller wants to do connection first as part operation
+ {
if (isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
{
if (!supportsCaching())
{
- // offline and no caching support so throw exception
+ // offline and no caching support so throw exception
String msgTxt = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT,getHost().getAliasName());
String msgDetails = RSECoreMessages.MSG_OFFLINE_CANT_CONNECT_DETAILS;
- SystemMessage sMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- SystemResourceConstants.MSG_OFFLINE_CANT_CONNECT,
- IStatus.INFO, msgTxt, msgDetails);
- throw new SystemMessageException(sMsg);
+ SystemMessage sMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ SystemResourceConstants.MSG_OFFLINE_CANT_CONNECT,
+ IStatus.INFO, msgTxt, msgDetails);
+ throw new SystemMessageException(sMsg);
}
-
- // we are not either offline or we support caching and are restoring from memento so
+
+ // we are not either offline or we support caching and are restoring from memento so
// postpone connecting until we determine the information cannot be retrieved from the cache,
- // it is left to individual api calls to determine this
+ // it is left to individual api calls to determine this
doConnection = false;
}
- else
- {
- doConnection = false; // reset
+ else
+ {
+ doConnection = false; // reset
didConnection = true;
mon.beginTask(SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort()), totalWorkUnits);
internalConnect(mon);
mon.worked(1);
-
- ChangeStatusJob job = new ChangeStatusJob(this);
+
+ ChangeStatusJob job = new ChangeStatusJob(this);
job.setSystem(true);
job.setPriority(Job.INTERACTIVE);
- job.schedule();
- }
- }
- else
- {
- doConnection = false;
- }
-
- if (isConnected() || isConnectOperation || isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
- {
- if (!didConnection)
- mon.beginTask(msg, (totalWorkUnits==1) ? IProgressMonitor.UNKNOWN : totalWorkUnits);
- else
- mon.setTaskName(msg);
- return true;
- }
- else // the implicit connect must have failed
- {
- mon.done();
- return false;
- }
- }
-
+ job.schedule();
+ }
+ }
+ else
+ {
+ doConnection = false;
+ }
+
+ if (isConnected() || isConnectOperation || isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
+ {
+ if (!didConnection)
+ mon.beginTask(msg, (totalWorkUnits==1) ? IProgressMonitor.UNKNOWN : totalWorkUnits);
+ else
+ mon.setTaskName(msg);
+ return true;
+ }
+ else // the implicit connect must have failed
+ {
+ mon.done();
+ return false;
+ }
+ }
+
protected void showOperationMessage(Exception exc, Shell shell)
{
if (exc instanceof java.lang.InterruptedException)
- showOperationCancelledMessage(shell);
+ showOperationCancelledMessage(shell);
else if (exc instanceof java.lang.reflect.InvocationTargetException)
- showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
+ showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
else
- showOperationErrorMessage(shell, exc);
+ showOperationErrorMessage(shell, exc);
+ }
+
+ /**
+ * Show an error message when the connection fails.
+ * Shows a common message by default.
+ * Overridable.
+ */
+ protected void showConnectErrorMessage(Shell shell, String hostName, int port, Throwable exc)
+ {
+ SystemMessage msg = null;
+ if (exc instanceof SystemMessageException)
+ {
+ SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
+ msg = ((SystemMessageException) exc).getSystemMessage();
+ }
+ else if (exc instanceof java.net.UnknownHostException)
+ {
+ SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_UNKNOWNHOST, hostName);
+ msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_CONNECT_UNKNOWNHOST,
+ IStatus.ERROR, msgTxt, exc);
+ }
+ else
+ {
+ SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, hostName);
+ msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_CONNECT_FAILED,
+ IStatus.ERROR, msgTxt, exc);
+ }
+
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
+ msgDlg.setException(exc);
+ msgDlg.open();
+ }
+ /**
+ * Show an error message when the user cancels the connection.
+ * Shows a common message by default.
+ * Overridable.
+ */
+ protected void showConnectCancelledMessage(Shell shell, String hostName, int port)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELED, hostName);
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_CONNECT_CANCELED,
+ IStatus.CANCEL, msgTxt);
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
+ msgDlg.open();
+ }
+ /**
+ * Show an error message when the disconnection fails.
+ * Shows a common message by default.
+ * Overridable.
+ */
+ protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName);
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_DISCONNECT_FAILED,
+ IStatus.CANCEL, msgTxt, exc);
+
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
+ msgDlg.setException(exc);
+ msgDlg.open();
+ }
+ /**
+ * Show an error message when the user cancels the disconnection.
+ * Shows a common message by default.
+ * Overridable.
+ */
+ protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELED, hostName);
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_DISCONNECT_CANCELED,
+ IStatus.CANCEL, msgTxt);
+
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
+ msgDlg.open();
}
-
- /**
- * Show an error message when the connection fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showConnectErrorMessage(Shell shell, String hostName, int port, Throwable exc)
- {
- SystemMessage msg = null;
- if (exc instanceof SystemMessageException)
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- msg = ((SystemMessageException) exc).getSystemMessage();
- }
- else if (exc instanceof java.net.UnknownHostException)
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_UNKNOWNHOST, hostName);
- msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_UNKNOWNHOST,
- IStatus.ERROR, msgTxt, exc);
- }
- else
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, hostName);
- msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_FAILED,
- IStatus.ERROR, msgTxt, exc);
- }
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
- /**
- * Show an error message when the user cancels the connection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showConnectCancelledMessage(Shell shell, String hostName, int port)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELED,
- IStatus.CANCEL, msgTxt);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
- /**
- * Show an error message when the disconnection fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_FAILED,
- IStatus.CANCEL, msgTxt, exc);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
- /**
- * Show an error message when the user cancels the disconnection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_CANCELED,
- IStatus.CANCEL, msgTxt);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- msgDlg.open();
- }
- /**
- * Helper method to return the message "Resolving to &1..."
- */
- protected static String getResolvingMessage(String filterString)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_RESOLVE_PROGRESS, filterString);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Running command &1..."
- */
- protected static String getRunningMessage(String cmd)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_RUN_PROGRESS, cmd);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Querying &1..."
- */
- protected static String getQueryingMessage(String key)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_QUERY_PROGRESS, key);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Setting &1..."
- */
- protected static String getSettingMessage(String key)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_SET_PROGRESS, key);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Querying properties..."
- */
- protected static String getQueryingMessage()
- {
- return CommonMessages.MSG_QUERY_PROPERTIES_PROGRESS;
- }
- /**
- * Helper method to return the message "Setting properties..."
- */
- protected static String getSettingMessage()
- {
- return CommonMessages.MSG_SET_PROPERTIES_PROGRESS;
- }
+ /**
+ * Helper method to return the message "Resolving to &1..."
+ */
+ protected static String getResolvingMessage(String filterString)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_RESOLVE_PROGRESS, filterString);
+ return msgTxt;
+ }
+ /**
+ * Helper method to return the message "Running command &1..."
+ */
+ protected static String getRunningMessage(String cmd)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_RUN_PROGRESS, cmd);
+ return msgTxt;
+ }
+ /**
+ * Helper method to return the message "Querying &1..."
+ */
+ protected static String getQueryingMessage(String key)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_QUERY_PROGRESS, key);
+ return msgTxt;
+ }
+ /**
+ * Helper method to return the message "Setting &1..."
+ */
+ protected static String getSettingMessage(String key)
+ {
+ String msgTxt = NLS.bind(CommonMessages.MSG_SET_PROGRESS, key);
+ return msgTxt;
+ }
+ /**
+ * Helper method to return the message "Querying properties..."
+ */
+ protected static String getQueryingMessage()
+ {
+ return CommonMessages.MSG_QUERY_PROPERTIES_PROGRESS;
+ }
+ /**
+ * Helper method to return the message "Setting properties..."
+ */
+ protected static String getSettingMessage()
+ {
+ return CommonMessages.MSG_SET_PROPERTIES_PROGRESS;
+ }
- /**
- * Show an error message when the operation fails.
- * Shows a common message by default, unless the exception is of type SystemMessageException,
- * in which case the message is retrieved via getSystemMessage() and it is shown.
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc)
- {
- SystemMessage sysMsg = null;
- if (exc instanceof SystemMessageException)
- {
- displayAsyncMsg((SystemMessageException)exc);
- //sysMsg = ((SystemMessageException)exc).getSystemMessage();
- }
- else
- {
- String excMsg = exc.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
-
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
-
- sysMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_FAILED,
- IStatus.ERROR, msgTxt, exc);
-
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, sysMsg);
- msgDlg.setException(exc);
- msgDlg.open();
- //RSEUIPlugin.logError("Operation failed",exc); now done successfully in msgDlg.open()
- }
-
- }
- /**
- * Show an error message when the user cancels the operation.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationCancelledMessage(Shell shell)
- {
- String msgTxt = CommonMessages.MSG_OPERATION_CANCELED;
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELED,
- IStatus.CANCEL, msgTxt);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
+ /**
+ * Show an error message when the operation fails.
+ * Shows a common message by default, unless the exception is of type SystemMessageException,
+ * in which case the message is retrieved via getSystemMessage() and it is shown.
+ * Overridable.
+ */
+ protected void showOperationErrorMessage(Shell shell, Throwable exc)
+ {
+ SystemMessage sysMsg = null;
+ if (exc instanceof SystemMessageException)
+ {
+ displayAsyncMsg((SystemMessageException)exc);
+ //sysMsg = ((SystemMessageException)exc).getSystemMessage();
+ }
+ else
+ {
+ String excMsg = exc.getMessage();
+ if ((excMsg == null) || (excMsg.length()==0))
+ excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
+
+ String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
+
+ sysMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_OPERATION_FAILED,
+ IStatus.ERROR, msgTxt, exc);
- // ----------------------------------
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell, sysMsg);
+ msgDlg.setException(exc);
+ msgDlg.open();
+ //RSEUIPlugin.logError("Operation failed",exc); now done successfully in msgDlg.open()
+ }
+
+ }
+ /**
+ * Show an error message when the user cancels the operation.
+ * Shows a common message by default.
+ * Overridable.
+ */
+ protected void showOperationCancelledMessage(Shell shell)
+ {
+ String msgTxt = CommonMessages.MSG_OPERATION_CANCELED;
+ SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
+ ICommonMessageIds.MSG_OPERATION_CANCELED,
+ IStatus.CANCEL, msgTxt);
+ SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
+ msgDlg.open();
+ }
+
+
+ // ----------------------------------
// PUBLIC METHODS HANDLED FOR YOU....
// ----------------------------------
/**
@@ -1969,317 +1968,317 @@ public abstract class SubSystem extends RSEModelObject
{
IConnectorService system = getConnectorService();
if (system != null)
- return system.isConnected();
+ return system.isConnected();
else if (!supportsConnecting)
- return true;
+ return true;
else
- return false;
+ return false;
}
-
+
/**
- * Returns the offline property for this subsystem's System Connection.
+ * Returns the offline property for this subsystem's System Connection.
*/
public boolean isOffline()
{
return getHost().isOffline();
}
- /**
- * CHILD CLASSES MAY OVERRIDE THIS.
- * By default it returns true iff we support filters and there are filter pool references.
- */
- public boolean hasChildren()
- {
- if (getSubSystemConfiguration().supportsFilters())
- {
- ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
- if (mgr == null)
- return false;
- else
- return mgr.getSystemFilterPoolReferenceCount() > 0;
- }
- else
- return false;
- }
- /**
- * Return the children of this subsystem, to populate the GUI subtree of this subsystem.
- * By default, this method:
- *
- *
- * So, be sure to override this method IF you do not support filters.
- */
- public Object[] getChildren()
- {
- if (getSubSystemConfiguration().supportsFilters())
- {
- ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
- if (mgr == null)
- return null;
- else
- {
- boolean showFilterPools = getSubSystemConfiguration().showFilterPools();
- if (showFilterPools)
- return mgr.getSystemFilterPoolReferences();
- else
- {
- ISystemFilterReference[] allRefs = mgr.getSystemFilterReferences(this);
- return allRefs;
- }
- }
- }
- else
- return null;
- }
+ /**
+ * CHILD CLASSES MAY OVERRIDE THIS.
+ * By default it returns true iff we support filters and there are filter pool references.
+ */
+ public boolean hasChildren()
+ {
+ if (getSubSystemConfiguration().supportsFilters())
+ {
+ ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
+ if (mgr == null)
+ return false;
+ else
+ return mgr.getSystemFilterPoolReferenceCount() > 0;
+ }
+ else
+ return false;
+ }
+ /**
+ * Return the children of this subsystem, to populate the GUI subtree of this subsystem.
+ * By default, this method:
+ *
+ *
+ * So, be sure to override this method IF you do not support filters.
+ */
+ public Object[] getChildren()
+ {
+ if (getSubSystemConfiguration().supportsFilters())
+ {
+ ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
+ if (mgr == null)
+ return null;
+ else
+ {
+ boolean showFilterPools = getSubSystemConfiguration().showFilterPools();
+ if (showFilterPools)
+ return mgr.getSystemFilterPoolReferences();
+ else
+ {
+ ISystemFilterReference[] allRefs = mgr.getSystemFilterReferences(this);
+ return allRefs;
+ }
+ }
+ }
+ else
+ return null;
+ }
- protected void scheduleJob(SubSystemOperationJob job, ISchedulingRule rule) throws InterruptedException
- {
- IRunnableContext context = getRunnableContext(/*shell*/); // dwd needed for side effect or for prompt?
- if (context instanceof SystemPromptDialog)
- {
- IStatus status = job.runInContext(context);
- if (!status.isOK())
- {
- showOperationErrorMessage(shell, status.getException());
- }
- return;
- }
- job.setPriority(Job.INTERACTIVE);
- //job.setUser(true);
- if (rule != null)
- {
- job.setRule(rule);
- }
- job.schedule();
- }
+ protected void scheduleJob(SubSystemOperationJob job, ISchedulingRule rule) throws InterruptedException
+ {
+ IRunnableContext context = getRunnableContext(/*shell*/); // dwd needed for side effect or for prompt?
+ if (context instanceof SystemPromptDialog)
+ {
+ IStatus status = job.runInContext(context);
+ if (!status.isOK())
+ {
+ showOperationErrorMessage(shell, status.getException());
+ }
+ return;
+ }
+ job.setPriority(Job.INTERACTIVE);
+ //job.setUser(true);
+ if (rule != null)
+ {
+ job.setRule(rule);
+ }
+ job.schedule();
+ }
- /**
- * Sort the concatenated list of all objects returned by resolving one or more
- * filter strings.
- * The default implementation does nothing. Child classes can override if they wish
- * to show their resulting objects sorted.
- */
- protected Object[] sortResolvedFilterStringObjects(Object[] input)
- {
- return input;
- }
-
-
- /**
- * Resolve an absolute filter string.
- *
- * This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- *
- *
- *
- *
- *
+ *
+ *
+ *
+ *
*
*
*/
private void internalConnect(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- try
- {
- getConnectorService().connect(monitor);
+ throws InvocationTargetException, InterruptedException
+ {
+ try
+ {
+ getConnectorService().connect(monitor);
}
catch(InvocationTargetException exc) {
throw exc;
@@ -2586,12 +2585,12 @@ public abstract class SubSystem extends RSEModelObject
catch (Exception exc) {
throw new InvocationTargetException(exc);
}
- }
-
+ }
+
/**
* Actually disconnect from the remote host. This is called by the run(IProgressMonitor monitor) method.
*
- *
- *
+ *
+ *
- *
- *
+ *
+ *
- * Override if needed. By default we return "*";
- */
- protected String getFirstParentFilterString(Object parent)
- {
- return "*"; //$NON-NLS-1$
- }
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
+ /**
+ * Called by resolveFilterString when given null for the filter string, meaning we defer
+ * getting a filter string until later, where we query it from the parent. In this case
+ * we need the first filter string for the progress monitor msg.
+ * Override if needed. By default we return "*";
+ */
+ protected String getFirstParentFilterString(Object parent)
+ {
+ return "*"; //$NON-NLS-1$
+ }
/**
@@ -2783,11 +2782,11 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/
protected String internalGetProperty(Object subject, String key, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
/**
* Actually set a remote property. This is called by the
@@ -2802,11 +2801,11 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/
protected Object internalSetProperty(Object subject, String key, String value, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
/**
* Actually get multiple remote properties. This is called by the
@@ -2821,11 +2820,11 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/
protected String[] internalGetProperties(Object subject, String[] keys, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
/**
* Actually set multiple remote properties. This is called by the
@@ -2840,17 +2839,17 @@ public abstract class SubSystem extends RSEModelObject
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/
protected Object internalSetProperties(Object subject, String[] keys, String[] values, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
+ throws java.lang.reflect.InvocationTargetException,
+ java.lang.InterruptedException
+ {
+ return null;
+ }
- /**
- * Get the progress monitor dialog for this operation. We try to
+ /**
+ * Get the progress monitor dialog for this operation. We try to
* use one for all phases of a single operation, such as connecting
* and resolving.
- * @deprecated this is scheduled to be removed since we want to
+ * @deprecated this is scheduled to be removed since we want to
* avoid UI components in SubSystem.
*/
protected IRunnableContext getRunnableContext(/*Shell rshell*/) {
@@ -2871,32 +2870,32 @@ public abstract class SubSystem extends RSEModelObject
SystemBasePlugin.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
shell = winShell;
return win;
-//dwd } else {
-//dwd win = null;
+ //dwd } else {
+ //dwd win = null;
}
}
-//dwd if (shell == null || shell.isDisposed() || !shell.isVisible()) {
-//dwd SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent");
-//dwd shell = rshell;
-//dwd }
-//dwd IRunnableContext dlg = new ProgressMonitorDialog(rshell);
+ //dwd if (shell == null || shell.isDisposed() || !shell.isVisible()) {
+ //dwd SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent");
+ //dwd shell = rshell;
+ //dwd }
+ //dwd IRunnableContext dlg = new ProgressMonitorDialog(rshell);
IRunnableContext dlg = new ProgressMonitorDialog(shell);
return dlg;
}
}
-
- /**
- * Return the shell for the current operation
- */
- protected Shell getShell()
- {
- return shell;
- }
-
- /**
- * Helper/convenience method. Return shell of active window.
- */
- public static Shell getActiveWorkbenchShell()
+
+ /**
+ * Return the shell for the current operation
+ */
+ protected Shell getShell()
+ {
+ return shell;
+ }
+
+ /**
+ * Helper/convenience method. Return shell of active window.
+ */
+ public static Shell getActiveWorkbenchShell()
{
Shell result = null;
if (PlatformUI.isWorkbenchRunning())
@@ -2904,7 +2903,7 @@ public abstract class SubSystem extends RSEModelObject
try
{
IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null)
+ if (window != null)
{
result = window.getShell();
}
@@ -2923,14 +2922,14 @@ public abstract class SubSystem extends RSEModelObject
/**
* Helper/convenience method. Return active window
*/
- public static IWorkbenchWindow getActiveWorkbenchWindow()
+ public static IWorkbenchWindow getActiveWorkbenchWindow()
{
return RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
}
-
+
/**
* Private. Do not override.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
*/
public String getName()
{
@@ -2951,12 +2950,12 @@ public abstract class SubSystem extends RSEModelObject
}
}
-
+
/**
* Private. Do not override.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
* Ties this subsystem to its owning subsystemconfiguration, via the
* id key string of the configuration.
*/
@@ -2981,7 +2980,7 @@ public abstract class SubSystem extends RSEModelObject
/**
* Private. Do not override.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
*/
public boolean isHidden()
{
@@ -3004,7 +3003,7 @@ public abstract class SubSystem extends RSEModelObject
/**
* Private. Do not override.
- * @generated This field/method will be replaced during code generation
+ * @generated This field/method will be replaced during code generation
*/
public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
{
@@ -3019,12 +3018,12 @@ public abstract class SubSystem extends RSEModelObject
-
+
public boolean isPrimarySubSystem()
{
return false;
}
-
+
/*
* Returns the first subsystem associated with the connection
*/
@@ -3056,11 +3055,11 @@ public abstract class SubSystem extends RSEModelObject
}
-
+
public Object getTargetForFilter(ISystemFilterReference filterRef)
- {
- return null;
- }
+ {
+ return null;
+ }
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#isConnectionError()
*/
@@ -3075,42 +3074,42 @@ public abstract class SubSystem extends RSEModelObject
{
_connectionError = error;
}
-
- public Object[] getTargetsForFilter(ISystemFilterReference filterRef)
- {
- return null;
- }
-
+
+ public Object[] getTargetsForFilter(ISystemFilterReference filterRef)
+ {
+ return null;
+ }
+
/**
* @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
*/
- public boolean contains(ISchedulingRule rule)
+ public boolean contains(ISchedulingRule rule)
{
if (this.equals(rule)) return true;
if (rule instanceof IResource) return true;
else return false;
}
-
+
/**
* @see org.eclipse.core.runtime.jobs.ISchedulingRule#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
*/
- public boolean isConflicting(ISchedulingRule rule)
+ public boolean isConflicting(ISchedulingRule rule)
{
if (this == rule) return true;
else return false;
}
-
+
public boolean commit()
{
ISystemProfile profile = getSystemProfile();
boolean result = profile.commit();
return result;
}
-
+
public IRSEPersistableContainer getPersistableParent() {
return _host;
}
-
+
public IRSEPersistableContainer[] getPersistableChildren() {
List children = new ArrayList(10);
ISystemFilterPoolReferenceManager manager = getSystemFilterPoolReferenceManager();
@@ -3122,12 +3121,12 @@ public abstract class SubSystem extends RSEModelObject
children.toArray(result);
return result;
}
-
+
/* Service Subsystem support */
/**
* Perform the subsystem specific processing required to complete a subsystem configuration switch for a
- * service subsystem. The subsystem will typically query this configuration for interesting properties or
+ * service subsystem. The subsystem will typically query this configuration for interesting properties or
* policies. It should also reset any state to a fresh start.
* 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.
@@ -3139,7 +3138,7 @@ public abstract class SubSystem extends RSEModelObject
* Determine if a service subsystem is capable of switching to this new configuration.
* This is usually a test of this configuration's type against the type expected by this subsystem.
* This supplied implementation returns false. Subclasses should override if they implement a service subsystem.
- * @param configuration the configuration to which this subsystem may switch
+ * @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 ISubSystem#canSwitchTo(ISubSystemConfiguration)
@@ -3149,7 +3148,7 @@ public abstract class SubSystem extends RSEModelObject
}
/**
- * Switch to use another subsystem configuration. This default implementation will test if the subsystem is a
+ * 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 ISubSystem#switchServiceFactory(ISubSystemConfiguration)
@@ -3168,7 +3167,7 @@ public abstract class SubSystem extends RSEModelObject
SystemProfileManager.run(op);
}
}
-
+
/**
* Return the service type for this subsystem.
* @return the default implementation returns null. Subclasses that implement service subsystems
@@ -3232,7 +3231,7 @@ public abstract class SubSystem extends RSEModelObject
}
filterEventFilterPoolReferencesReset(); // signal a resource change event
}
-
+
// switch the connector service
IConnectorService oldConnectorService = getConnectorService();
oldConnectorService.deregisterSubSystem(this);
@@ -3240,13 +3239,13 @@ public abstract class SubSystem extends RSEModelObject
setConnectorService(newConnectorService);
oldConnectorService.commit();
newConnectorService.commit();
-
+
// call the subsystem specfic switching support
internalSwitchSubSystemConfiguration(newConfig);
-
+
// commit the subsystem
setDirty(true);
commit();
}
-
+
}
\ No newline at end of file