From e2b1e597e503047ac72cfc70281cd42ddb7f6069 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Thu, 17 Apr 2008 12:10:32 +0000 Subject: [PATCH] [226969][cleanup] Add missing API @since tags --- .../rse/core/AbstractRSESystemType.java | 30 ++++---- .../subsystems/AbstractConnectorService.java | 77 +++++++++++-------- .../AbstractDelegatingConnectorService.java | 63 ++++++++------- .../core/subsystems/IConnectorService.java | 38 +++++---- 4 files changed, 116 insertions(+), 92 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java index f0e9e270ee8..07cdbde5a8b 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java @@ -13,8 +13,8 @@ * Contributors: * Uwe Stieber (Wind River) - Dynamic system type provider extension. * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType - * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() - * Martin Oberhuber (Wind River) - [186868] Fix IRSESystemType.testProperty() semantics + * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() + * Martin Oberhuber (Wind River) - [186868] Fix IRSESystemType.testProperty() semantics * Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI ********************************************************************************/ package org.eclipse.rse.core; @@ -31,11 +31,11 @@ import org.osgi.framework.Bundle; /** * Abstract base class holding core functionality of a system type. - * + * * Extenders must override {@link IRSESystemType#getSubsystemConfigurationIds()} * according to their strategy of finding subsystem configuration id's that * match their system type. - * + * * Extenders may override any other method. */ public abstract class AbstractRSESystemType extends PlatformObject implements IRSESystemType { @@ -46,22 +46,22 @@ public abstract class AbstractRSESystemType extends PlatformObject implements IR protected String description = null; protected Bundle definingBundle = null; protected Map properties; - + /** * Default constructor. * Only subclasses may call this if set the id, name, label, - * description and properties attributes themselves. + * description and properties attributes themselves. */ protected AbstractRSESystemType() { super(); } - + /** * Constructor for an object representing a system type. * @param id unique id of this system type. Must be system unique. * @param name a name of this system type to be used for internal checks. - * @param label a user-visible label of this system type. + * @param label a user-visible label of this system type. * May be null and falls back to the name in this case. * @param description a user-visible description of this system type. * May be null and falls back to the label in this case. @@ -79,7 +79,7 @@ public abstract class AbstractRSESystemType extends PlatformObject implements IR /** * Checks whether two system types are the same. - * + * * System types are considered the same if they have the same ID. */ public boolean equals(Object obj) { @@ -91,7 +91,7 @@ public abstract class AbstractRSESystemType extends PlatformObject implements IR /** * Returns the hashCode for this system type. - * + * * The hashCode is the hashCode of its ID. */ public int hashCode() { @@ -138,7 +138,7 @@ public abstract class AbstractRSESystemType extends PlatformObject implements IR public Bundle getDefiningBundle() { return definingBundle; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.IRSESystemType#getProperty(java.lang.String) */ @@ -157,9 +157,11 @@ public abstract class AbstractRSESystemType extends PlatformObject implements IR return false; } - /* - * (non-Javadoc) - * @see org.eclipse.rse.core.IRSESystemType#isEnabled() + /** + * Tests whether the system type is currently enabled. + * + * @see IRSESystemType#isEnabled() + * @since org.eclipse.rse.core 3.0 */ public boolean isEnabled() { if (RSEPreferencesManager.getIsSystemTypeEnabled(this)) { diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java index de1c686e84c..0c2df56e8c3 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java @@ -1,20 +1,20 @@ /******************************************************************************** * 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 and ServerLauncher hierarchies - * 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) - [185750] Remove IConnectorService.getHostType() + * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType() * David Dykstal (IBM) - [189483] fix spelling in initialize/uninitialize method signatures * David Dykstal (IBM) - [210474] Deny save password function missing ********************************************************************************/ @@ -39,12 +39,12 @@ import org.eclipse.rse.core.model.RSEModelObject; * is returned from a subsystem object via getConnectorService(), and * it is used to maintain the connection to a particular set of subsystems. *

- * This class implements the protocol for much of the + * This class implements the protocol for much of the * standard bookkeeping for connector services including * server launchers (if none are required), event handling, * hosts, ports, addresses, descriptions, and registered subsystems. * Subclasses must concern themselves with actually authenticating and connecting. - */ + */ public abstract class AbstractConnectorService extends RSEModelObject implements IConnectorService { private Vector commListeners = new Vector(5); @@ -84,7 +84,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements } else return subsystem.getSubSystemConfiguration().supportsServerLaunchType(serverLaunchType); } - + /** * @return null, may be overriden * @see IConnectorService#getRemoteServerLauncher() @@ -108,7 +108,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements public boolean supportsServerLaunchProperties() { return false; } - + /** * @return null, may be overridden * @see IConnectorService#getRemoteServerLauncherProperties() @@ -131,7 +131,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements public final boolean hasRemoteServerLauncherProperties() { return getRemoteServerLauncherProperties() != null; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#addCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener) */ @@ -145,7 +145,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements * @see org.eclipse.rse.core.subsystems.IConnectorService#removeCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener) */ public final void removeCommunicationsListener(ICommunicationsListener listener) { - commListeners.remove(listener); + commListeners.remove(listener); } /** @@ -155,9 +155,9 @@ public abstract class AbstractConnectorService extends RSEModelObject implements final protected void fireCommunicationsEvent(int eventType) { CommunicationsEvent e = new CommunicationsEvent(this, eventType); Object[] items = commListeners.toArray(); - for (int loop=0; loop < items.length; loop++) { + for (int loop=0; loop < items.length; loop++) { ((ICommunicationsListener) items[loop]).communicationsStateChange(e); - } + } } /* (non-Javadoc) @@ -214,7 +214,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements { if (_registeredSubSystems.size() == 0) { - + } else { @@ -230,9 +230,9 @@ public abstract class AbstractConnectorService extends RSEModelObject implements */ public final void registerSubSystem(ISubSystem ss) { if (!_registeredSubSystems.contains(ss)) - { + { _registeredSubSystems.add(ss); - } + } } /* (non-Javadoc) @@ -255,7 +255,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements public final IRSEPersistableContainer getPersistableParent() { return _host; } - + public IRSEPersistableContainer[] getPersistableChildren() { List children = new ArrayList(20); IServerLauncherProperties launcherProperties = getRemoteServerLauncherProperties(); @@ -298,7 +298,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements for (int i = 0; i < _registeredSubSystems.size(); i++) { ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i); - ss.initializeSubSystem(monitor); + ss.initializeSubSystem(monitor); } } @@ -310,7 +310,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements for (int i = 0; i < _registeredSubSystems.size(); i++) { ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i); - ss.uninitializeSubSystem(monitor); + ss.uninitializeSubSystem(monitor); } } @@ -385,7 +385,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements * or disconnected. * Each subsystem needs to be informed so it can clear out any expansions. * This implementation does nothing. - * Implementations should override and call {@link #reset()} + * Implementations should override and call {@link #reset()} * if there is internal state to reset. * @see IConnectorService#reset() */ @@ -394,9 +394,9 @@ public abstract class AbstractConnectorService extends RSEModelObject implements /** * This implementation returns the connector service's port property. - * Override if appropriate. + * Override if appropriate. *
This is called by the default implementation of - * {@link #connect(IProgressMonitor)}, + * {@link #connect(IProgressMonitor)}, * if #supportsServerLaunchProperties() is true. * @return the port used for connecting to the target */ @@ -418,7 +418,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements * Disconnects from the target system. * Calls {@link #internalDisconnect(IProgressMonitor)} * and {@link #postDisconnect()} - * @throws Exception if the disconnect fails + * @throws Exception if the disconnect fails */ public final void disconnect(IProgressMonitor monitor) throws Exception { preDisconnect(); @@ -449,7 +449,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements */ protected void postDisconnect() { } - + /** * Performs any tasks required immediately prior to disconnecting. * This implementation does nothing. @@ -458,7 +458,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements */ protected void preDisconnect() { } - + /** * Performs any tasks required immediately prior to connecting. * This implementation does nothing. @@ -467,7 +467,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements */ protected void preConnect() { } - + /** * Performs any tasks required immediately after connecting. * This implementation does nothing. @@ -476,9 +476,13 @@ public abstract class AbstractConnectorService extends RSEModelObject implements */ protected void postConnect() { } - - /* (non-Javadoc) - * @see com.ibm.etools.systems.subsystems.ISystem#setDenyPasswordSave(boolean) + + /** + * Sets the attribute for this connector service instance that denies a + * password to be saved. + * + * @see IConnectorService#setDenyPasswordSave(boolean) + * @since org.eclipse.rse.core 3.0 */ public final int setDenyPasswordSave(boolean deny) { IHost host = getHost(); @@ -488,8 +492,13 @@ public abstract class AbstractConnectorService extends RSEModelObject implements return result; } - /* (non-Javadoc) - * @see com.ibm.etools.systems.subsystems.ISystem#getDenyPasswordSave() + /** + * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this + * connector service. + * + * @return true if password saving is denied. + * @see IConnectorService#getDenyPasswordSave() + * @since org.eclipse.rse.core 3.0 */ public final boolean getDenyPasswordSave() { IHost host = getHost(); @@ -499,6 +508,6 @@ public abstract class AbstractConnectorService extends RSEModelObject implements return result; } - + } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java index ad1aa8bd967..902ed26de99 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java @@ -1,17 +1,17 @@ /******************************************************************************** * Copyright (c) 2007, 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. - * + * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies * David Dykstal (IBM) - 142806: refactoring persistence framework - * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType() + * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType() * David Dykstal (IBM) - [210474] Deny save password function missing * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception ********************************************************************************/ @@ -23,7 +23,7 @@ import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IPropertySet; import org.eclipse.rse.core.model.IRSEPersistableContainer; -public abstract class AbstractDelegatingConnectorService implements IDelegatingConnectorService +public abstract class AbstractDelegatingConnectorService implements IDelegatingConnectorService { protected IHost _host; @@ -37,7 +37,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC { _host = host; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IDelegatingConnectorService#getRealConnectorService() */ @@ -46,7 +46,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#addCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener) */ - public void addCommunicationsListener(ICommunicationsListener listener) + public void addCommunicationsListener(ICommunicationsListener listener) { IConnectorService conServ = getRealConnectorService(); if (conServ != null) @@ -54,7 +54,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC conServ.addCommunicationsListener(listener); } } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IPropertySetContainer#addPropertySet(org.eclipse.rse.core.model.IPropertySet) */ @@ -185,7 +185,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#getHomeDirectory() */ - public String getHomeDirectory() + public String getHomeDirectory() { IConnectorService conServ = getRealConnectorService(); if (conServ != null) @@ -198,7 +198,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#getHost() */ - public IHost getHost() + public IHost getHost() { return _host; } @@ -343,7 +343,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC if (conServ != null) { return conServ.getVersionReleaseModification(); - } + } return null; } @@ -576,7 +576,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC IConnectorService conServ = getRealConnectorService(); if (conServ != null) { - conServ.setSuppressed(suppressSignonPrompt); + conServ.setSuppressed(suppressSignonPrompt); } } @@ -662,7 +662,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return false; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#saveUserId() */ @@ -673,7 +673,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC conServ.saveUserId(); } } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#removeUserId() */ @@ -706,7 +706,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC conServ.removePassword(); } } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IRSEPersistableContainer#wasRestored() */ @@ -718,7 +718,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return false; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresPassword() */ @@ -730,7 +730,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return false; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresUserId() */ @@ -742,7 +742,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return false; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IRSEPersistableContainer#isTainted() */ @@ -754,7 +754,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return false; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IRSEPersistableContainer#setTainted(boolean) */ @@ -765,14 +765,14 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC conServ.setTainted(flag); } } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent() */ public IRSEPersistableContainer getPersistableParent() { return getHost(); } - + /* (non-Javadoc) * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren() */ @@ -784,9 +784,13 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return IRSEPersistableContainer.NO_CHILDREN; } - - /* (non-Javadoc) - * @see org.eclipse.rse.core.subsystems.IConnectorService#setDenyPasswordSave(boolean) + + /** + * Sets the attribute for this connector service instance that denies a + * password to be saved. + * + * @see IConnectorService#setDenyPasswordSave(boolean) + * @since org.eclipse.rse.core 3.0 */ public int setDenyPasswordSave(boolean deny) { int n = 0; @@ -796,9 +800,14 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC } return n; } - - /* (non-Javadoc) - * @see org.eclipse.rse.core.subsystems.IConnectorService#getDenyPasswordSave() + + /** + * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this + * connector service. If the value has never been set, this will return + * false. + * + * @return true if password saving is denied. + * @since org.eclipse.rse.core 3.0 */ public boolean getDenyPasswordSave() { boolean result = false; 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 0c370f62712..b4364da08f0 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 @@ -3,13 +3,13 @@ * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: David McKnight, Kushal Munir, * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType @@ -46,7 +46,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException; * 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. @@ -300,7 +300,7 @@ public interface IConnectorService extends IRSEModelObject { * It is the responsibility of the caller to set this value * back to false when the tool no longer needs to suppress * acquisition credentials. - * + * * @param suppress true if acquisition is to be suppressed. * false if acquisition is to be allowed. */ @@ -390,24 +390,28 @@ public interface IConnectorService extends IRSEModelObject { boolean requiresUserId(); /** - * Sets the attribute for this connector service instance that denies a password to be saved. - * If the attribute has never been set it defaults to false. - * If set to true, it will clear any saved passwords for this system and not allow any further - * passwords to be stored. - * This property of a system is persistent from session to session, but is not sharable. - * @param deny If true, forget any saved passwords and do not allow any others to be saved. - * If false, allow passwords to be saved in the keychain. - * @return the number of saved passwords removed by this operation. - * This will always be zero if "deny" is false. - * @since 3.0 org.eclipse.rse.core + * Sets the attribute for this connector service instance that denies a + * password to be saved. If the attribute has never been set it defaults to + * false. If set to true, it will clear any saved passwords for this system + * and not allow any further passwords to be stored. This property of a + * system is persistent from session to session, but is not sharable. + * + * @param deny If true, forget any saved passwords and do not allow any + * others to be saved. If false, allow passwords to be saved in + * the keyring. + * @return the number of saved passwords removed by this operation. This + * will always be zero if "deny" is false. + * @since org.eclipse.rse.core 3.0 */ public int setDenyPasswordSave(boolean deny); /** - * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this connector service. - * If the value has never been set, this will return false. + * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this + * connector service. If the value has never been set, this will return + * false. + * * @return true if password saving is denied. - * @since 3.0 org.eclipse.rse.core + * @since org.eclipse.rse.core 3.0 */ public boolean getDenyPasswordSave();