mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
[168864] Add IRSEUserIdConstants. Change references where compatible from ISystemUserIdConstants to IRSEUserIdConstants.
This commit is contained in:
parent
8151b81c20
commit
966ed36c7c
11 changed files with 100 additions and 48 deletions
|
@ -0,0 +1,51 @@
|
||||||
|
/********************************************************************************
|
||||||
|
* Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
|
||||||
|
* This program and the accompanying materials are made available under the terms
|
||||||
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Initial Contributors:
|
||||||
|
* The following IBM employees contributed to the Remote System Explorer
|
||||||
|
* component that contains this file: David McKnight, Kushal Munir,
|
||||||
|
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||||
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* {Name} (company) - description of contribution.
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.rse.core;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for user id management. Used when specifying the scope of a user id when
|
||||||
|
* setting a user id.
|
||||||
|
*/
|
||||||
|
public interface IRSEUserIdConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value 0. Location of user id has not yet been set. Used only as a return value.
|
||||||
|
*/
|
||||||
|
public static final int USERID_LOCATION_NOTSET = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value 1. Location of user id is scoped to the connector service inside the host.
|
||||||
|
*/
|
||||||
|
public static final int USERID_LOCATION_CONNECTORSERVICE = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value 2. Location of user id is scoped to the host, sometimes call "connection".
|
||||||
|
*/
|
||||||
|
public static final int USERID_LOCATION_HOST = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value 3. Location of user id is scoped to system type. It will be the default
|
||||||
|
* for all hosts of this system type that do not have a specified user id assigned.
|
||||||
|
*/
|
||||||
|
public static final int USERID_LOCATION_DEFAULT_SYSTEMTYPE = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value 4. Location of user id is scoped to workspace.
|
||||||
|
*/
|
||||||
|
public static final int USERID_LOCATION_DEFAULT_OVERALL = 4;
|
||||||
|
|
||||||
|
}
|
|
@ -32,8 +32,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
|
||||||
/**
|
/**
|
||||||
* Registry or front door for all remote system connections.
|
* Registry or front door for all remote system connections.
|
||||||
* There is a singleton of the class implementation of this interface.
|
* There is a singleton of the class implementation of this interface.
|
||||||
* To get it, call the {@link org.eclipse.rse.ui.RSEUIPlugin#getTheSystemRegistry() getTheSystemRegistry}
|
* To get it, call the {@link org.eclipse.rse.core.RSECorePlugin#getSystemRegistry()}.
|
||||||
* method in the RSEUIPlugin object.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The idea here is that connections are grouped by system profile. At any
|
* The idea here is that connections are grouped by system profile. At any
|
||||||
* time, there is a user-specified number of profiles "active" and connections
|
* time, there is a user-specified number of profiles "active" and connections
|
||||||
|
@ -259,15 +258,15 @@ public interface ISystemRegistry extends ISchedulingRule
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the absolute name for the specified subsystem
|
* Return the absolute name for the specified subsystem
|
||||||
* @param the subsystem
|
* @param subsystem the subsystem to query
|
||||||
* @return the absolute name of the subsystem
|
* @return the absolute name of the subsystem
|
||||||
*/
|
*/
|
||||||
public String getAbsoluteNameForSubSystem(ISubSystem subsystem);
|
public String getAbsoluteNameForSubSystem(ISubSystem subsystem);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the absolute name for the specified connection
|
* Return the absolute name for the specified host (connection)
|
||||||
* @param the connection
|
* @param connection the host (aka connection) object to query
|
||||||
* @return the absolute name of the connection
|
* @return the absolute name of the host
|
||||||
*/
|
*/
|
||||||
public String getAbsoluteNameForConnection(IHost connection);
|
public String getAbsoluteNameForConnection(IHost connection);
|
||||||
|
|
||||||
|
@ -419,10 +418,9 @@ public interface ISystemRegistry extends ISchedulingRule
|
||||||
public IHost createLocalHost(ISystemProfile profile, String name, String userId);
|
public IHost createLocalHost(ISystemProfile profile, String name, String userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a connection object, given the connection pool and given all the possible attributes.
|
* Create a host object, sometimes called a "connection",
|
||||||
* <p>
|
* given the containing profile and given all the possible attributes.
|
||||||
* THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
|
* The profile is then scheduled to be persisted.
|
||||||
* THE POOL YOU SPECIFY. THE POOL IS ALSO SAVED TO DISK.
|
|
||||||
* <p>
|
* <p>
|
||||||
* This method:
|
* This method:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
@ -438,8 +436,8 @@ public interface ISystemRegistry extends ISchedulingRule
|
||||||
* @param hostName ip name of host.
|
* @param hostName ip name of host.
|
||||||
* @param description optional description of the connection. Can be null.
|
* @param description optional description of the connection. Can be null.
|
||||||
* @param defaultUserId userId to use as the default for the subsystems.
|
* @param defaultUserId userId to use as the default for the subsystems.
|
||||||
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants}
|
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
|
||||||
* that tells us where to set the user Id
|
* that tells us where to store the user Id
|
||||||
* @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
|
* @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
|
||||||
* wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
|
* wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
|
||||||
* @return SystemConnection object, or null if it failed to create. This is typically
|
* @return SystemConnection object, or null if it failed to create. This is typically
|
||||||
|
@ -541,9 +539,8 @@ public interface ISystemRegistry extends ISchedulingRule
|
||||||
* <li>The connection's name must be unique in pool.
|
* <li>The connection's name must be unique in pool.
|
||||||
* <li>Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool.
|
* <li>Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool.
|
||||||
* </ul>
|
* </ul>
|
||||||
* <b>TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
|
|
||||||
* @param conns Array of SystemConnections to move.
|
* @param conns Array of SystemConnections to move.
|
||||||
* @param newPosition new zero-based position for the connection
|
* @param delta new zero-based position for the connection
|
||||||
*/
|
*/
|
||||||
public void moveHosts(String profileName, IHost conns[], int delta);
|
public void moveHosts(String profileName, IHost conns[], int delta);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.eclipse.jface.wizard.IWizard;
|
||||||
import org.eclipse.jface.wizard.IWizardPage;
|
import org.eclipse.jface.wizard.IWizardPage;
|
||||||
import org.eclipse.jface.wizard.WizardPage;
|
import org.eclipse.jface.wizard.WizardPage;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
|
import org.eclipse.rse.core.IRSEUserIdConstants;
|
||||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
import org.eclipse.rse.core.ISystemUserIdConstants;
|
||||||
import org.eclipse.rse.core.RSECorePlugin;
|
import org.eclipse.rse.core.RSECorePlugin;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
|
@ -117,7 +118,7 @@ public class SystemConnectionForm
|
||||||
protected int descriptionLength = 100;
|
protected int descriptionLength = 100;
|
||||||
|
|
||||||
// state/output
|
// state/output
|
||||||
protected int userIdLocation = USERID_LOCATION_CONNECTION;
|
protected int userIdLocation = IRSEUserIdConstants.USERID_LOCATION_HOST;
|
||||||
protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog, callerInstanceOfPropertyPage;
|
protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog, callerInstanceOfPropertyPage;
|
||||||
protected boolean userIdFromSystemTypeDefault;
|
protected boolean userIdFromSystemTypeDefault;
|
||||||
protected boolean updateMode = false;
|
protected boolean updateMode = false;
|
||||||
|
@ -463,12 +464,12 @@ public class SystemConnectionForm
|
||||||
{
|
{
|
||||||
isLocal = textUserId.isLocal();
|
isLocal = textUserId.isLocal();
|
||||||
if (isLocal)
|
if (isLocal)
|
||||||
userIdLocation = USERID_LOCATION_CONNECTION; // edit this connection's local value
|
userIdLocation = IRSEUserIdConstants.USERID_LOCATION_HOST; // edit this connection's local value
|
||||||
else
|
else
|
||||||
userIdLocation = USERID_LOCATION_DEFAULT_SYSTEMTYPE; // edit the preference value
|
userIdLocation = IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE; // edit the preference value
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
userIdLocation = USERID_LOCATION_NOTSET;
|
userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
|
||||||
SystemPreferencesManager.getPreferencesManager().setVerifyConnection(verifyHostNameCB.getSelection());
|
SystemPreferencesManager.getPreferencesManager().setVerifyConnection(verifyHostNameCB.getSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,7 +594,7 @@ public class SystemConnectionForm
|
||||||
if ((textUserId != null) && (textUserId.getText().trim().length()>0))
|
if ((textUserId != null) && (textUserId.getText().trim().length()>0))
|
||||||
return userIdLocation;
|
return userIdLocation;
|
||||||
else
|
else
|
||||||
return USERID_LOCATION_NOTSET;
|
return IRSEUserIdConstants.USERID_LOCATION_NOTSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
|
@ -798,7 +799,7 @@ public class SystemConnectionForm
|
||||||
caller.systemTypeSelected(restrictSystemTypesTo[0], true);
|
caller.systemTypeSelected(restrictSystemTypesTo[0], true);
|
||||||
|
|
||||||
if (textUserId == null)
|
if (textUserId == null)
|
||||||
userIdLocation = USERID_LOCATION_NOTSET;
|
userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
|
||||||
|
|
||||||
return composite_prompts; // composite;
|
return composite_prompts; // composite;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.viewers.ICellEditorValidator;
|
import org.eclipse.jface.viewers.ICellEditorValidator;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
|
import org.eclipse.rse.core.IRSEUserIdConstants;
|
||||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
import org.eclipse.rse.core.ISystemUserIdConstants;
|
||||||
import org.eclipse.rse.core.RSECorePlugin;
|
import org.eclipse.rse.core.RSECorePlugin;
|
||||||
import org.eclipse.rse.core.SystemPreferencesManager;
|
import org.eclipse.rse.core.SystemPreferencesManager;
|
||||||
|
@ -467,12 +468,12 @@ public class SystemViewConnectionAdapter
|
||||||
else if (property.equals(P_HOSTNAME))
|
else if (property.equals(P_HOSTNAME))
|
||||||
{
|
{
|
||||||
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
||||||
original_hostName, conn.getDescription(), conn.getDefaultUserId(), USERID_LOCATION_NOTSET);
|
original_hostName, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
|
||||||
}
|
}
|
||||||
else if (property.equals(P_DESCRIPTION))
|
else if (property.equals(P_DESCRIPTION))
|
||||||
{
|
{
|
||||||
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
||||||
conn.getHostName(), original_description, conn.getDefaultUserId(), USERID_LOCATION_NOTSET);
|
conn.getHostName(), original_description, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -480,7 +481,7 @@ public class SystemViewConnectionAdapter
|
||||||
*/
|
*/
|
||||||
private void updateDefaultUserId(IHost conn, SystemInheritablePropertyData data)
|
private void updateDefaultUserId(IHost conn, SystemInheritablePropertyData data)
|
||||||
{
|
{
|
||||||
int whereToUpdate = USERID_LOCATION_CONNECTION;
|
int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
|
||||||
//if (!data.getIsLocal())
|
//if (!data.getIsLocal())
|
||||||
//whereToUpdate = USERID_LOCATION_DEFAULT_SYSTEMTYPE;
|
//whereToUpdate = USERID_LOCATION_DEFAULT_SYSTEMTYPE;
|
||||||
String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
|
String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
|
||||||
|
@ -513,7 +514,7 @@ public class SystemViewConnectionAdapter
|
||||||
if (!((String)value).equalsIgnoreCase(conn.getHostName()))
|
if (!((String)value).equalsIgnoreCase(conn.getHostName()))
|
||||||
{
|
{
|
||||||
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
||||||
(String)value, conn.getDescription(), conn.getDefaultUserId(), USERID_LOCATION_NOTSET);
|
(String)value, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
|
||||||
changed_hostName = true;
|
changed_hostName = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -524,7 +525,7 @@ public class SystemViewConnectionAdapter
|
||||||
if (!((String)value).equalsIgnoreCase(conn.getDescription()))
|
if (!((String)value).equalsIgnoreCase(conn.getDescription()))
|
||||||
{
|
{
|
||||||
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
|
||||||
conn.getHostName(), (String)value, conn.getDefaultUserId(), USERID_LOCATION_NOTSET);
|
conn.getHostName(), (String)value, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
|
||||||
changed_description = true;
|
changed_description = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ public class RSENewConnectionWizardDefaultDelegateMainPage
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return location where default user id is to be set.
|
* Return location where default user id is to be set.
|
||||||
* @see org.eclipse.rse.core.ISystemUserIdConstants
|
* @see org.eclipse.rse.core.IRSEUserIdConstants
|
||||||
*/
|
*/
|
||||||
public int getDefaultUserIdLocation()
|
public int getDefaultUserIdLocation()
|
||||||
{
|
{
|
||||||
|
|
|
@ -246,7 +246,7 @@ public class SystemNewConnectionWizardDefaultMainPage
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return location where default user id is to be set.
|
* Return location where default user id is to be set.
|
||||||
* @see org.eclipse.rse.core.ISystemUserIdConstants
|
* @see org.eclipse.rse.core.IRSEUserIdConstants
|
||||||
*/
|
*/
|
||||||
public int getDefaultUserIdLocation()
|
public int getDefaultUserIdLocation()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ import java.util.Hashtable;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
import org.eclipse.rse.core.IRSEUserIdConstants;
|
||||||
import org.eclipse.rse.core.SystemPreferencesManager;
|
import org.eclipse.rse.core.SystemPreferencesManager;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.model.ISystemHostPool;
|
import org.eclipse.rse.core.model.ISystemHostPool;
|
||||||
|
@ -160,7 +160,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
||||||
public IHost createHost(String systemType, String aliasName, String hostName)
|
public IHost createHost(String systemType, String aliasName, String hostName)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
return createHost(systemType,aliasName,hostName,null,null,ISystemUserIdConstants.USERID_LOCATION_CONNECTION);
|
return createHost(systemType,aliasName,hostName,null,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Create a connection object, given all the possible attributes except default userId.
|
* Create a connection object, given all the possible attributes except default userId.
|
||||||
|
@ -177,7 +177,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
||||||
public IHost createHost(String systemType, String aliasName, String hostName, String description)
|
public IHost createHost(String systemType, String aliasName, String hostName, String description)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
return createHost(systemType,aliasName,hostName,description,null,ISystemUserIdConstants.USERID_LOCATION_CONNECTION);
|
return createHost(systemType,aliasName,hostName,description,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Create a connection object, given all the possible attributes.
|
* Create a connection object, given all the possible attributes.
|
||||||
|
@ -211,7 +211,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
||||||
conn.setHostPool(this);
|
conn.setHostPool(this);
|
||||||
conn.setAliasName(aliasName);
|
conn.setAliasName(aliasName);
|
||||||
// if default userID is null, and location is in the connection we should retrieve it and use it as the initial value.
|
// if default userID is null, and location is in the connection we should retrieve it and use it as the initial value.
|
||||||
if (defaultUserId == null && defaultUserIdLocation == ISystemUserIdConstants.USERID_LOCATION_CONNECTION) {
|
if (defaultUserId == null && defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_HOST) {
|
||||||
defaultUserId = conn.getDefaultUserId();
|
defaultUserId = conn.getDefaultUserId();
|
||||||
}
|
}
|
||||||
updateHost(conn, systemType, aliasName, hostName, description, defaultUserId, defaultUserIdLocation);
|
updateHost(conn, systemType, aliasName, hostName, description, defaultUserId, defaultUserIdLocation);
|
||||||
|
@ -249,16 +249,16 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
||||||
renameHost(conn,aliasName);
|
renameHost(conn,aliasName);
|
||||||
conn.setSystemType(systemType);
|
conn.setSystemType(systemType);
|
||||||
conn.setHostName(hostName);
|
conn.setHostName(hostName);
|
||||||
if (defaultUserIdLocation != ISystemUserIdConstants.USERID_LOCATION_NOTSET)
|
if (defaultUserIdLocation != IRSEUserIdConstants.USERID_LOCATION_NOTSET)
|
||||||
{
|
{
|
||||||
if (defaultUserIdLocation != ISystemUserIdConstants.USERID_LOCATION_CONNECTION)
|
if (defaultUserIdLocation != IRSEUserIdConstants.USERID_LOCATION_HOST)
|
||||||
{
|
{
|
||||||
conn.setDefaultUserId(null); // clear what was there, to ensure inheritance
|
conn.setDefaultUserId(null); // clear what was there, to ensure inheritance
|
||||||
SystemPreferencesManager prefMgr = SystemPreferencesManager.getPreferencesManager();
|
SystemPreferencesManager prefMgr = SystemPreferencesManager.getPreferencesManager();
|
||||||
boolean forceToUpperCase = conn.getForceUserIdToUpperCase();
|
boolean forceToUpperCase = conn.getForceUserIdToUpperCase();
|
||||||
if (forceToUpperCase && (defaultUserId != null))
|
if (forceToUpperCase && (defaultUserId != null))
|
||||||
defaultUserId = defaultUserId.toUpperCase();
|
defaultUserId = defaultUserId.toUpperCase();
|
||||||
if (defaultUserIdLocation == ISystemUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE)
|
if (defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE)
|
||||||
{
|
{
|
||||||
prefMgr.setDefaultUserId(systemType, defaultUserId);
|
prefMgr.setDefaultUserId(systemType, defaultUserId);
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
||||||
{
|
{
|
||||||
IHost copy =
|
IHost copy =
|
||||||
targetPool.createHost(conn.getSystemType(), aliasName,
|
targetPool.createHost(conn.getSystemType(), aliasName,
|
||||||
conn.getHostName(), conn.getDescription(), conn.getLocalDefaultUserId(), ISystemUserIdConstants.USERID_LOCATION_CONNECTION);
|
conn.getHostName(), conn.getDescription(), conn.getLocalDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_HOST);
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public interface ISystemRegistryUI extends ISystemRegistry {
|
||||||
* @param connectionName unique connection name.
|
* @param connectionName unique connection name.
|
||||||
* @param hostName ip name of host.
|
* @param hostName ip name of host.
|
||||||
* @param description optional description of the connection. Can be null.
|
* @param description optional description of the connection. Can be null.
|
||||||
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants}
|
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
|
||||||
* that tells us where to set the user Id
|
* that tells us where to set the user Id
|
||||||
* @param defaultUserId userId to use as the default for the subsystems.
|
* @param defaultUserId userId to use as the default for the subsystems.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
import org.eclipse.rse.core.IRSEUserIdConstants;
|
||||||
import org.eclipse.rse.core.RSECorePlugin;
|
import org.eclipse.rse.core.RSECorePlugin;
|
||||||
import org.eclipse.rse.core.SystemAdapterHelpers;
|
import org.eclipse.rse.core.SystemAdapterHelpers;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
|
@ -2122,7 +2122,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
// DY: defect 42101, description cannot be null
|
// DY: defect 42101, description cannot be null
|
||||||
// null, // description
|
// null, // description
|
||||||
userId, // default user Id
|
userId, // default user Id
|
||||||
ISystemUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE, null);
|
IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
|
@ -2152,7 +2152,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
* @param hostName ip name of host.
|
* @param hostName ip name of host.
|
||||||
* @param description optional description of the connection. Can be null.
|
* @param description optional description of the connection. Can be null.
|
||||||
* @param defaultUserId userId to use as the default for the subsystems.
|
* @param defaultUserId userId to use as the default for the subsystems.
|
||||||
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants}
|
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
|
||||||
* that tells us where to set the user Id
|
* that tells us where to set the user Id
|
||||||
* @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
|
* @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
|
||||||
* wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
|
* wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
|
||||||
|
@ -2268,7 +2268,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
public IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description)
|
public IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
return createHost(profileName, systemType, connectionName, hostName, description, null, ISystemUserIdConstants.USERID_LOCATION_CONNECTION, null);
|
return createHost(profileName, systemType, connectionName, hostName, description, null, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Create a connection object. This is a very simplified version that defaults to the user's
|
* Create a connection object. This is a very simplified version that defaults to the user's
|
||||||
|
@ -2298,7 +2298,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
ISystemProfile profile = getSystemProfileManager().getDefaultPrivateSystemProfile();
|
ISystemProfile profile = getSystemProfileManager().getDefaultPrivateSystemProfile();
|
||||||
if (profile == null)
|
if (profile == null)
|
||||||
profile = getSystemProfileManager().getActiveSystemProfiles()[0];
|
profile = getSystemProfileManager().getActiveSystemProfiles()[0];
|
||||||
return createHost(profile.getName(), systemType, connectionName, hostName, description, null, ISystemUserIdConstants.USERID_LOCATION_CONNECTION, null);
|
return createHost(profile.getName(), systemType, connectionName, hostName, description, null, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the previous connection as would be shown in the view
|
* Return the previous connection as would be shown in the view
|
||||||
|
@ -2342,7 +2342,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
* @param hostName ip name of host.
|
* @param hostName ip name of host.
|
||||||
* @param description optional description of the connection. Can be null.
|
* @param description optional description of the connection. Can be null.
|
||||||
* @param defaultUserId userId to use as the default for the subsystems.
|
* @param defaultUserId userId to use as the default for the subsystems.
|
||||||
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants}
|
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
|
||||||
* that tells us where to set the user Id
|
* that tells us where to set the user Id
|
||||||
*/
|
*/
|
||||||
public void updateHost(Shell shell, IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
|
public void updateHost(Shell shell, IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.rse.core.IRSEUserIdConstants;
|
||||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
import org.eclipse.rse.core.ISystemUserIdConstants;
|
||||||
import org.eclipse.rse.core.PasswordPersistenceManager;
|
import org.eclipse.rse.core.PasswordPersistenceManager;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
|
@ -666,7 +667,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements
|
||||||
ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
|
ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
|
||||||
ssc.updateSubSystem(subsystem, true, userId, false, 0);
|
ssc.updateSubSystem(subsystem, true, userId, false, 0);
|
||||||
} else { // it seems intuitive to update the connection object. defect 42709. Phil
|
} else { // it seems intuitive to update the connection object. defect 42709. Phil
|
||||||
int whereToUpdate = USERID_LOCATION_CONNECTION;
|
int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
|
||||||
IHost conn = subsystem.getHost();
|
IHost conn = subsystem.getHost();
|
||||||
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
||||||
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate);
|
sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate);
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.eclipse.rse.core;
|
package org.eclipse.rse.core;
|
||||||
/**
|
/**
|
||||||
* Constants for user Id management
|
* Constants for user Id management
|
||||||
|
* @deprecated use {@link IRSEUserIdConstants} instead.
|
||||||
*/
|
*/
|
||||||
public interface ISystemUserIdConstants
|
public interface ISystemUserIdConstants
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue