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 @@ + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java index f989cc1e121..ef348735e13 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java @@ -1,5 +1,5 @@ /******************************************************************************** - * 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 * available at http://www.eclipse.org/legal/epl-v10.html @@ -8,11 +8,14 @@ * Kushal Munir (IBM) - Initial API and implementation. * David Dykstal (IBM) - updated with comments, removed keys that are not to be used globally * 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; /** * These constants define the set of preference names that the RSE core uses. + * + * @noimplement This interface is not intended to be implemented by clients. */ /* @@ -23,46 +26,56 @@ package org.eclipse.rse.core; public interface IRSEPreferenceNames { /** - * The key for the value that specifies that queries should be "deferred", that is, run - * when needed and in the background, as nodes are asked for their children. - * This value is not part of the API. + * The key for the value that specifies that queries should be "deferred", + * that is, run when needed and in the background, as nodes are asked for + * their children. This value is not part of the API. + * + * @noreference This field is not intended to be referenced by clients. */ public static final String USE_DEFERRED_QUERIES = "useDeferredQueries"; //$NON-NLS-1$ /** - * The key for the default system type. Used when a system type is needed but not declared - * when creating new connections (hosts) and for password determination. - * This value is not part of the API. + * The key for the default system type. Used when a system type is needed + * but not declared when creating new connections (hosts) and for password + * determination. This value is not part of the API. + * + * @noreference This field is not intended to be referenced by clients. */ public static final String SYSTEMTYPE = "systemtype"; //$NON-NLS-1$ /** - * The key for an hash table, encoded as a string, that contains user ids as values - * keyed by some key - usually a system type, a connection name, or a combination of - * a connection name and subsystem. - * This value is not part of the API. + * The key for an hash table, encoded as a string, that contains user ids as + * values keyed by some key - usually a system type, a connection name, or a + * combination of a connection name and subsystem. This value is not part of + * the API. + * + * @noreference This field is not intended to be referenced by clients. */ public static final String USERIDPERKEY = "useridperkey"; //$NON-NLS-1$ /** - * The key for the string containing the list of active user profiles in alphabetical order. - * As profiles are activated, deactivated, or renamed this string must be modified. - * This value is not part of the API. + * The key for the string containing the list of active user profiles in + * alphabetical order. As profiles are activated, deactivated, or renamed + * this string must be modified. This value is not part of the API. + * + * @noreference This field is not intended to be referenced by clients. */ public static final String ACTIVEUSERPROFILES = "activeuserprofiles"; //$NON-NLS-1$ - + /** * The key of the string containing the id of the default persistence provider. * Value is "DEFAULT_PERSISTENCE_PROVIDER". * This value is part of the API and may be used to customize products. */ - public static final String DEFAULT_PERSISTENCE_PROVIDER = "DEFAULT_PERSISTENCE_PROVIDER"; //$NON-NLS-1$ - + public static final String DEFAULT_PERSISTENCE_PROVIDER = "DEFAULT_PERSISTENCE_PROVIDER"; //$NON-NLS-1$ + /** - * The key of the string containing the id of the boolean value to create a local connection. - * Value is "CREATE_LOCAL_CONNECTION". - * This value is part of the API and may be used to customize products. + * The key of the string containing the id of the boolean value to create a + * local connection. Value is "CREATE_LOCAL_CONNECTION". This value is part + * of the API and may be used to customize products. + * + * @since org.eclipse.rse.core 3.0 */ public static final String CREATE_LOCAL_CONNECTION = "CREATE_LOCAL_CONNECTION"; //$NON-NLS-1$ - + } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java index 4cd6ac3979c..e07be872ce7 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [185098] Provide constants for all well-known system types * 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; @@ -254,14 +255,16 @@ public interface IRSESystemType extends IAdaptable { * * The enabled state is a dynamic property of a system type, compared to the * static configuration by plugin markup. Enablement is a non-UI property, - * which can be set by a Product in the Preferences or modified by a user - * to hide certain system types. + * which can be set by a Product in the Preferences or modified by a user to + * hide certain system types. *

- * 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 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., - * or ., + * A key would typically be ., + * or ., * or ... * @param key the key used to find the userId * @param userId the userId to retrieve by this key. @@ -331,7 +338,7 @@ public class RSEPreferencesManager { store.setDefault(IRSEPreferenceNames.USE_DEFERRED_QUERIES, RSEPreferencesManager.DEFAULT_USE_DEFERRED_QUERIES); savePreferences(); } - + /** * Save the preference store. */ @@ -342,7 +349,7 @@ public class RSEPreferencesManager { /** * @return The name of the default private system profile. This * is typically the short name of the host machine or the name of the - * user account. + * user account. */ public static String getDefaultPrivateSystemProfileName() { String name = RSECorePlugin.getLocalMachineName(); @@ -390,9 +397,10 @@ public class RSEPreferencesManager { } /** - * Make a single string out of an array of strings. A semi-colon is - * used as a delimiter between the separate values. No value in the - * array can contain a semi-colon. + * Make a single string out of an array of strings. A semicolon is used as a + * delimiter between the separate values. No value in the array can contain + * a semicolon. + * * @param values the array of strings to condense into a single one * @return the condensed string */ @@ -410,7 +418,7 @@ public class RSEPreferencesManager { } /** - * Parse out list of multiple values into a string array per value. + * Parse out list of multiple values into a string array per value. * This is the inverse of the {@link #makeString(String[])} operation. * @param allvalues the string holding the condensed value * @return the reconstituted array of strings. @@ -422,10 +430,11 @@ public class RSEPreferencesManager { } /** - * Parse out list of key-value pairs into a hashtable. This is the inverse of the - * {@link SystemPreferencesManager#makeString(Hashtable)} operation. - * @param allValues the string containing the key-value pairs. If empty or null returns - * and empty Hashtable. + * Parse out list of key-value pairs into a Hashtable. This is the inverse + * of the {@link SystemPreferencesManager#makeString(Hashtable)} operation. + * + * @param allValues the string containing the key-value pairs. If empty or + * null returns and empty Hashtable. * @return the reconstituted Hashtable */ private static Hashtable parseString(String allValues) { @@ -447,9 +456,14 @@ public class RSEPreferencesManager { } return keyValues; } - + /** - * @return the boolean value indicating whether or not to create a local connection on a fresh workspace. + * Get the Preference setting whether the local connection should be created + * by default or not. + * + * @return the boolean value indicating whether or not to create a local + * connection on a fresh workspace. + * @since org.eclipse.rse.core 3.0 */ public static boolean getCreateLocalConnection() { Preferences prefs = RSECorePlugin.getDefault().getPluginPreferences(); @@ -458,7 +472,7 @@ public class RSEPreferencesManager { } /* - * Having this method private disables instance creation. + * Having this method private disables instance creation. */ private RSEPreferencesManager() { } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java index 5b5a79421a3..391c85f613f 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.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) - [168975] Move RSE Events API to Core - * David Dykstal (IBM) - [186589] Move User Actions events to the user actions plugin + * David Dykstal (IBM) - [186589] Move User Actions events to the user actions plugin + * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags ********************************************************************************/ package org.eclipse.rse.core.events; @@ -21,13 +22,15 @@ package org.eclipse.rse.core.events; * The event IDs sent when local resources in the RSE model change. * You should monitor for these events in your view if you display any of the resource types listed here. *

- * 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: - *