Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.model
Interface ISystemRegistry

All Superinterfaces:
IAdaptable, ISchedulingRule, ISystemViewInputProvider

public interface ISystemRegistry
extends ISchedulingRule, IAdaptable, ISystemViewInputProvider

Registry or front door for all remote system connections. There is a singleton of the class implementation of this interface. To get it, call the RSECorePlugin.getTheSystemRegistry().

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 from each active profile are worked with.


Method Summary
 void addSystemModelChangeListener ( ISystemModelChangeListener l)
          Register your interest in being told when an RSE model resource is changed.
 void addSystemPreferenceChangeListener ( ISystemPreferenceChangeListener l)
          Register your interest in being told when a system preference changes
 void addSystemRemoteChangeListener ( ISystemRemoteChangeListener l)
          Register your interest in being told when a remote resource is changed.
 void addSystemResourceChangeListener ( ISystemResourceChangeListener l)
          Register your interest in being told when a system resource such as a connection is changed.
 boolean areAllSubSystemsConnected ( IHost conn)
          Return true if all of the subsystems for the given connection are currently connected.
 void connectedStatusChange ( ISubSystem subsystem, boolean connected, boolean wasConnected)
          Inform the world when the connection status changes for a subsystem within a connection.
 void connectedStatusChange ( ISubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree)
          Inform the world when the connection status changes for a subsystem within a connection.
  IHost copyHost ( IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor)
          Copy a SystemConnection.
  ISystemProfile copySystemProfile ( ISystemProfile profile, String newName, boolean makeActive, IProgressMonitor monitor)
          Copy a SystemProfile.
  IHost createHost ( IRSESystemType systemType, String connectionName, String hostAddress, String description)
          Create a connection object.
  IHost createHost ( String profileName, IRSESystemType systemType, String connectionName, String hostName, String description)
          Create a connection object.
  IHost createHost ( String profileName, IRSESystemType systemType, String hostName, String hostAddress, String description, boolean createSubSystems)
          Create a host object.
  IHost createHost ( String profileName, IRSESystemType systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation, ISubSystemConfigurator[] configurators)
          Create a host object, sometimes called a "connection", given the containing profile and given all the possible attributes.
  IHost createLocalHost ( ISystemProfile profile, String name, String userId)
          Convenience method to create a local connection, as it often that one is needed for access to the local file system.
  ISubSystem[] createSubSystems ( IHost host, ISubSystemConfiguration[] configurations)
          Creates subsystems for a given host and subsystem configurations.
  ISystemProfile createSystemProfile ( String profileName, boolean makeActive)
          Create a SystemProfile given its name and whether or not to make it active Note that there are some naming restrictions on profile names.
 void deleteHost ( IHost conn)
          Delete an existing connection.
 boolean deleteSubSystem ( ISubSystem subsystem)
          Delete a subsystem object.
 void deleteSystemProfile ( ISystemProfile profile)
          Delete a SystemProfile.
 void disconnectAllSubSystems ( IHost conn)
          Disconnect all subsystems for the given connection, if they are currently connected.
  List findFilterReferencesFor ( Object resource, ISubSystem subsystem)
          Returns filter references associated with this resource under the subsystem
  List findFilterReferencesFor ( Object resource, ISubSystem subsystem, boolean onlyCached)
          Returns filter references associated with this resource under the subsystem
 void fireEvent ( ISystemModelChangeEvent event)
          Notify all listeners of a change to a system model resource such as a connection.
 void fireEvent ( ISystemModelChangeListener l, ISystemModelChangeEvent event)
          Notify a specific listener of a change to a system model resource such as a connection.
 void fireEvent ( ISystemPreferenceChangeEvent event)
          Notify all listeners of a change to a system preference You would not normally call this as the methods in this class call it when appropriate.
 void fireEvent ( ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event)
          Notify a specific listener of a change to a system preference
 void fireEvent ( ISystemRemoteChangeEvent event)
          Notify all listeners of a change to a remote resource such as a file.
 void fireEvent ( ISystemRemoteChangeListener l, ISystemRemoteChangeEvent event)
          Notify a specific listener of a change to a remote resource such as a file.
 void fireEvent ( ISystemResourceChangeEvent event)
          Notify all listeners of a change to a system resource such as a connection.
 void fireEvent ( ISystemResourceChangeListener l, ISystemResourceChangeEvent event)
          Notify a specific listener of a change to a system resource such as a connection.
 void fireModelChangeEvent (int eventType, int resourceType, Object resource, String oldName)
          Notify all listeners of a change to a system model resource such as a connection.
 void fireRemoteResourceChangeEvent (int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
          Notify all listeners of a change to a remote resource such as a file.
 void fireRemoteResourceChangeEvent (int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames, Object originatingViewer)
          Notify all listeners of a change to a remote resource such as a file.
 void fireRemoteResourceChangeEvent ( String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
          Notify all listeners of a change to a remote resource such as a file.
 void fireRemoteResourceChangeEvent ( String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames, Object originatingViewer)
          Notify all listeners of a change to a remote resource such as a file.
  String getAbsoluteNameForConnection ( IHost host)
          Return the absolute name for the specified host (connection)
  String getAbsoluteNameForSubSystem ( ISubSystem subsystem)
          Return the absolute name for the specified subsystem
  ISystemProfile[] getActiveSystemProfiles ()
          Return the profiles currently selected by the user as his "active" profiles
  Object[] getConnectionChildren ( IHost selectedConnection)
          This method is called by the connection adapter when the user expands a connection.
  IConnectorService[] getConnectorServices ( IHost host)
          Return the list of connector services currently configured for the given host
  IHost getHost ( ISystemProfile profile, String connectionName)
          Return a SystemConnection object given a system profile containing it, and a connection name uniquely identifying it.
  Vector getHostAliasNames ( ISystemProfile profile)
          Return a vector of previously-used connection names in the given profile.
  Vector getHostAliasNamesForAllActiveProfiles ()
          Return a vector of previously-used connection names in all active profiles.
 int getHostCount ()
          Return the number of SystemConnection objects within all active profiles.
 int getHostCount ( ISystemProfile profile)
          Return the number of SystemConnection objects within the given profile.
 int getHostCountWithinProfile ( IHost conn)
          Return the number of SystemConnection objects within the given connection's owning profile.
  String[] getHostNames ( IRSESystemType systemType)
          Return array of previously specified host names for a given system type.
 int getHostPosition ( IHost conn)
          Return the zero-based position of a SystemConnection object within its profile.
  IHost[] getHosts ()
          Return all connections in all active profiles.
  IHost[] getHostsByProfile ( ISystemProfile profile)
          Return all connections in a given profile.
  IHost[] getHostsBySubSystemConfiguration ( ISubSystemConfiguration config)
          Return all connections for which there exists one or more subsystems owned by a given subsystem configuration.
  IHost[] getHostsBySubSystemConfigurationCategory ( String factoryCategory)
          Return all connections for which there exists one or more subsystems owned by any a given subsystem configuration that is of the given category.
  IHost[] getHostsBySystemType ( IRSESystemType systemType)
          Returns all connections for all active profiles, for the given system type.
  IHost[] getHostsBySystemTypes ( IRSESystemType[] systemTypes)
          Return all connections for all active profiles, for the given system types.
  Exception getLastException ()
          Return last exception object caught in any method, or null if no exception.
  IHost getLocalHost ()
          Return the first connection to the local host we can find.
  ISubSystem[] getServiceSubSystems ( IHost host, Class serviceType)
          Get those subsystems that are registered against a given connection, which are service subsystems with the given serviceType.
  ISubSystem getSubSystem ( String absoluteSubSystemName)
          Resolve a subsystem from it's absolute name The absolute name of a subsystem is denoted by profileName.
  ISubSystemConfiguration getSubSystemConfiguration ( String id)
          Return the subsystem configuration, given its plugin.xml-declared id.
  ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies ()
          Public method to retrieve list of subsystem configuration proxies registered by extension points.
  ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory ( String configurationCategory)
          Return all subsystem configuration proxies matching a subsystem configuration category.
  ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesBySystemType ( IRSESystemType systemType)
          Return all subsystem configuration proxies that are registered against the given system type.
  ISubSystemConfiguration[] getSubSystemConfigurations ()
          Deprecated. use getSubSystemConfigurationProxies() and filter the list of needed subsystem configurations in order to activate only those that are really needed.
  ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType ( IRSESystemType systemType, boolean filterDuplicates)
          Deprecated. Use getSubSystemConfigurationsBySystemType(IRSESystemType,boolean,boolean) instead in order to avoid instantiating subsystem configurations if possible.
  ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType ( IRSESystemType systemType, boolean filterDuplicates, boolean activate)
          Return all subsystem configurations which support the given system type.
  ISubSystem[] getSubSystems ( IHost host)
          Return list of subsystem objects for a given host.
  ISubSystem[] getSubSystems ( IHost host, boolean force)
          Deprecated. Use getSubSystems(IHost) instead, the "force" parameter is now ignored.
  ISubSystem[] getSubsystems ( IHost host, Class subsystemInterface)
          Get those subsystems that are registered against a given connection, which are an instance of the given interface class.
  ISubSystem[] getSubSystemsBySubSystemConfigurationCategory ( String factoryCategory, IHost host)
          Deprecated. use getSubSystemConfigurationProxiesByCategory(String) and instantiate only those subsystem configurations from the proxy that are really needed. Then, use ISubSystemConfiguration.getSubSystems(boolean) with a parameter true.
  ISystemFilterStartHere getSystemFilterStartHere ()
          Get the SystemFilterStartHere singleton instance.
  ISystemProfile getSystemProfile ( String profileName)
          Get a SystemProfile given its name
  ISystemProfileManager getSystemProfileManager ()
          Return singleton profile manager
 boolean hasConnectionChildren ( IHost selectedConnection)
          This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection.
 void invalidateFiltersFor ( ISubSystem subsystem)
          Marks all filters for this subsystem as stale to prevent caching
 void invalidateFiltersFor ( Object resourceParent, ISubSystem subsystem)
          Marks all filters for this subsystem that contain resourceParent as stale to prevent caching
 boolean isAnySubSystemConnected ( IHost conn)
          Return true if any of the subsystems for the given connection are currently connected.
 boolean isAnySubSystemSupportsConnect ( IHost conn)
          Return true if any subsystem supports connecting.
 boolean isRegisteredSystemRemoteChangeListener ( ISystemRemoteChangeListener l)
          Query if the ISystemRemoteChangeListener is already listening for SystemRemoteChange events.
 boolean isRegisteredSystemResourceChangeListener ( ISystemResourceChangeListener l)
          Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events
  IHost moveHost ( IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor)
          Move a SystemConnection to another profile.
 void moveHosts ( String profileName, IHost[] conns, int delta)
          Move existing connections a given number of positions in the same profile.
 void removeSystemModelChangeListener ( ISystemModelChangeListener l)
          De-Register your interest in being told when an RSE model resource is changed.
 void removeSystemPreferenceChangeListener ( ISystemPreferenceChangeListener l)
          Unregister your interest in being told when a system preference changes
 void removeSystemRemoteChangeListener ( ISystemRemoteChangeListener l)
          Unregister your interest in being told when a remote resource is changed.
 void removeSystemResourceChangeListener ( ISystemResourceChangeListener l)
          De-Register your interest in being told when a system resource such as a connection is changed.
 void renameHost ( IHost conn, String newName)
          Renames an existing connection.
 void renameSystemProfile ( ISystemProfile profile, String newName)
          Rename a SystemProfile.
 boolean restore ()
          Restore all connections within active profiles
 boolean save ()
          Save everything!
 boolean saveHost ( IHost conn)
          Save specific connection
 boolean saveHostPool ( ISystemHostPool pool)
          Save specific connection pool
 void setHostOffline ( IHost conn, boolean offline)
          Update the workoffline mode for a connection.
 void setSystemProfileActive ( ISystemProfile profile, boolean makeActive)
          Make or unmake the given profile active.
 void updateHost ( IHost host, IRSESystemType systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
          Update an existing host given the new information.
 
Methods inherited from interface org.eclipse.core.runtime.jobs. ISchedulingRule
contains, isConflicting
 
Methods inherited from interface org.eclipse.rse.core.model. ISystemViewInputProvider
getAdapter, getSystemViewRoots, getViewer, hasSystemViewRoots, setViewer, showingConnections
 

Method Detail

getSystemFilterStartHere


ISystemFilterStartHere getSystemFilterStartHere()
Get the SystemFilterStartHere singleton instance.

Returns:
the SystemFilterStartHere singleton instance.

getSubSystemConfigurationProxies


ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
Public method to retrieve list of subsystem configuration proxies registered by extension points.

Returns:
all subsystem configuration proxies.

getSubSystemConfigurationProxiesByCategory


ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(
String configurationCategory)
Return all subsystem configuration proxies matching a subsystem configuration category.

Parameters:
configurationCategory - a subsystem configuration category.
Returns:
all subsystem configuration proxies matching the given category, or an empty array if none matches.
See Also:
ISubSystemConfigurationCategories

getSubSystemConfigurationProxiesBySystemType


ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesBySystemType(
IRSESystemType systemType)
Return all subsystem configuration proxies that are registered against the given system type.

Parameters:
systemType - system type to filter
Returns:
all subsystem configuration proxies matching the given system type, or an empty array if none matches.
Since:
3.1

getSubSystemConfigurations


ISubSystemConfiguration[] getSubSystemConfigurations()
Deprecated. use getSubSystemConfigurationProxies() and filter the list of needed subsystem configurations in order to activate only those that are really needed.

Return all subsystem factories. Be careful when you call this, as it activates all subsystem configurations.


getSubSystemConfiguration


ISubSystemConfiguration getSubSystemConfiguration(
String id)
Return the subsystem configuration, given its plugin.xml-declared id.


getSubSystemConfigurationsBySystemType


ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(
IRSESystemType systemType,
                                                                 boolean filterDuplicates)
Deprecated. Use getSubSystemConfigurationsBySystemType(IRSESystemType,boolean,boolean) instead in order to avoid instantiating subsystem configurations if possible.

Return all subsystem configurations which support the given system type. If the type is null, returns all subsystem configurations. Fully equivalent to getSubSystemConfigurationsBySystemType(systemType, filterDuplicates, true) which is preferred since we do not want to load subsystem configurations unless necessary.

Parameters:
systemType - system type to filter
filterDuplicates - if true and the subsystem configuration uses services then return only one subsystem configuration that supports this service. Which configuration is returned is undefined.
Returns:
an array of subsystem configurations meeting the criteria

getSubSystemConfigurationsBySystemType


ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(
IRSESystemType systemType,
                                                                 boolean filterDuplicates,
                                                                 boolean activate)
Return all subsystem configurations which support the given system type. If the type is null, returns all subsystem configurations.

Parameters:
systemType - system type to filter
filterDuplicates - if true and the subsystem configuration uses services then return only one subsystem configuration that supports this service. Which configuration is returned is undefined.
activate - if true activate the respective configurations if not already active, if false return only those that are already active.
Returns:
an array of subsystem configurations meeting the criteria
Since:
org.eclipse.rse.core 3.0

getConnectionChildren


Object[] getConnectionChildren(
IHost selectedConnection)
This method is called by the connection adapter when the user expands a connection. This method must return the child objects to show for that connection.

Specified by:
getConnectionChildren in interface ISystemViewInputProvider
Parameters:
selectedConnection - the connection undergoing expansion
Returns:
the list of objects under the connection

hasConnectionChildren

boolean hasConnectionChildren(
IHost selectedConnection)
This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection.

Specified by:
hasConnectionChildren in interface ISystemViewInputProvider
Parameters:
selectedConnection - the connection being shown in the viewer
Returns:
true if this connection has children to be shown.

getSystemProfileManager


ISystemProfileManager getSystemProfileManager()
Return singleton profile manager


getActiveSystemProfiles


ISystemProfile[] getActiveSystemProfiles()
Return the profiles currently selected by the user as his "active" profiles

See Also:
ISystemProfileManager.getActiveSystemProfiles()

getSystemProfile


ISystemProfile getSystemProfile(
String profileName)
Get a SystemProfile given its name


createSystemProfile


ISystemProfile createSystemProfile(
String profileName,
                                   boolean makeActive)
                                   throws 
Exception
Create a SystemProfile given its name and whether or not to make it active Note that there are some naming restrictions on profile names.

Throws:
Exception
See Also:
ISystemProfile.setName(String)

copySystemProfile


ISystemProfile copySystemProfile(
ISystemProfile profile,
                                 
String newName,
                                 boolean makeActive,
                                 
IProgressMonitor monitor)
                                 throws 
Exception
Copy a SystemProfile. All connections connection data is copied. Note that there are some naming restrictions on profile names.

Parameters:
profile - Source profile to copy
newName - Unique name to give copied profile
makeActive - whether to make the copied profile active or not
monitor - Progress monitor to reflect each step of the operation
Returns:
new SystemProfile object
Throws:
Exception
See Also:
ISystemProfile.setName(String)

renameSystemProfile

void renameSystemProfile(
ISystemProfile profile,
                         
String newName)
                         throws 
Exception
Rename a SystemProfile. Rename is propagated to all subsystem factories so they can rename their filter pool managers and whatever else is required. Note that there are some naming restrictions on profile names.

Throws:
Exception
See Also:
ISystemProfile.setName(String)

deleteSystemProfile

void deleteSystemProfile(
ISystemProfile profile)
                         throws 
Exception
Delete a SystemProfile. Prior to physically deleting the profile, we delete all the connections it has, all the subsystems they have. The default private profile cannot be deleted and such a request will be ignored.

As well, all the filter pools for this profile are deleted, and subsequently any cross references from subsystems in connections in other profiles are removed.

A delete event is fired for every connection deleted.

Throws:
Exception

setSystemProfileActive

void setSystemProfileActive(
ISystemProfile profile,
                            boolean makeActive)
Make or unmake the given profile active. The default private profile cannot be deactivated and such a request will be ignored.


getConnectorServices


IConnectorService[] getConnectorServices(
IHost host)
Return the list of connector services currently configured for the given host

Parameters:
host - the host
Returns:
the list of connector services

getSubSystems


ISubSystem[] getSubSystems(
IHost host)
Return list of subsystem objects for a given host.

Parameters:
host - the host for which to return the subsystems that are currently known.
Returns:
an array of subsystem objects known to this host.

getSubSystems


ISubSystem[] getSubSystems(
IHost host,
                           boolean force)
Deprecated. Use getSubSystems(IHost) instead, the "force" parameter is now ignored.

Return list of subsystem objects for a given connection.

Parameters:
host - the host for which to return the subsystems that are known.
force - if true, force the creation of subsystems for which the system type of this host is configured. Use this parameter with care since it can cause extensive initialization.
Returns:
the list of subsystems known to this host, possibly after the creation of subsystems.

getSubsystems


ISubSystem[] getSubsystems(
IHost host,
                           
Class subsystemInterface)
Get those subsystems that are registered against a given connection, which are an instance of the given interface class.

Parameters:
host - the connection to check
subsystemInterface - the interface class to filter against
Returns:
list of matching subsystems

getServiceSubSystems


ISubSystem[] getServiceSubSystems(
IHost host,
                                  
Class serviceType)
Get those subsystems that are registered against a given connection, which are service subsystems with the given serviceType.

Parameters:
host - the host to check
serviceType - the class of service to ask for
Returns:
list of matching subsystems

getSubSystem


ISubSystem getSubSystem(
String absoluteSubSystemName)
Resolve a subsystem from it's absolute name The absolute name of a subsystem is denoted by profileName.connectionName:subsystemConfigurationId

Parameters:
absoluteSubSystemName - the name of the subsystem
Returns:
the subsystem or null if the profile, connection, or subsystem configuration cannot be found.

getAbsoluteNameForSubSystem


String getAbsoluteNameForSubSystem(
ISubSystem subsystem)
Return the absolute name for the specified subsystem

Parameters:
subsystem - the subsystem to query
Returns:
the absolute name of the subsystem

getAbsoluteNameForConnection


String getAbsoluteNameForConnection(
IHost host)
Return the absolute name for the specified host (connection)

Parameters:
host - the host (aka connection) object to query
Returns:
the absolute name of the host

getSubSystemsBySubSystemConfigurationCategory


ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(
String factoryCategory,
                                                           
IHost host)
Deprecated. use getSubSystemConfigurationProxiesByCategory(String) and instantiate only those subsystem configurations from the proxy that are really needed. Then, use ISubSystemConfiguration.getSubSystems(boolean) with a parameter true.

Get a list of subsystem objects for given connection, owned by a subsystem factory that is of the given category. Array will never be null but may be length zero.

This looks for a match on the "category" of the subsystem factory's xml declaration in its plugin.xml file.

See Also:
ISubSystemConfigurationCategories

deleteSubSystem

boolean deleteSubSystem(
ISubSystem subsystem)
Delete a subsystem object. This code finds the factory that owns it and delegates the request to that factory.


getLocalHost


IHost getLocalHost()
Return the first connection to the local host we can find. While we always create a default one in the user's profile, it is possible that this profile is not active or the connection was deleted. However, since any connection to the local host will usually do, we just search all active profiles until we find one, and return it.
If no connection to the local host can be found, this will return null. If one is needed, it can be created easily by calling createLocalHost(ISystemProfile, String, String).


getHosts


IHost[] getHosts()
Return all connections in all active profiles.


getHostsByProfile


IHost[] getHostsByProfile(
ISystemProfile profile)
Return all connections in a given profile.


getHostsBySubSystemConfiguration


IHost[] getHostsBySubSystemConfiguration(
ISubSystemConfiguration config)
Return all connections for which there exists one or more subsystems owned by a given subsystem configuration.

See Also:
getSubSystemConfiguration(String)

getHostsBySubSystemConfigurationCategory


IHost[] getHostsBySubSystemConfigurationCategory(
String factoryCategory)
Return all connections for which there exists one or more subsystems owned by any a given subsystem configuration that is of the given category.

This looks for a match on the "category" of the subsystem configuration's xml declaration in its plugin.xml file. Thus, it is efficient as it need not bring to life a subsystem configuration just to test its parent class type.

See Also:
ISubSystemConfigurationCategories

getHostsBySystemType


IHost[] getHostsBySystemType(
IRSESystemType systemType)
Returns all connections for all active profiles, for the given system type. If the specified system type is null, an empty array is returned. In order to get an IRSESystemType, use RSECorePlugin.getTheCoreRegistry().getSystemTypeById(String)

Parameters:
systemType - The system type instance.
Returns:
The list of connections or an empty array.

getHostsBySystemTypes


IHost[] getHostsBySystemTypes(
IRSESystemType[] systemTypes)
Return all connections for all active profiles, for the given system types. In order to get an IRSESystemType, use RSECorePlugin.getTheCoreRegistry().getSystemTypeById(String)


getHost


IHost getHost(
ISystemProfile profile,
              
String connectionName)
Return a SystemConnection object given a system profile containing it, and a connection name uniquely identifying it.


getHostPosition

int getHostPosition(
IHost conn)
Return the zero-based position of a SystemConnection object within its profile.


getHostCount

int getHostCount(
ISystemProfile profile)
Return the number of SystemConnection objects within the given profile.


getHostCountWithinProfile

int getHostCountWithinProfile(
IHost conn)
Return the number of SystemConnection objects within the given connection's owning profile.


getHostCount

int getHostCount()
Return the number of SystemConnection objects within all active profiles.


getHostAliasNames


Vector getHostAliasNames(
ISystemProfile profile)
Return a vector of previously-used connection names in the given profile.

Returns:
Vector of String objects.

getHostAliasNamesForAllActiveProfiles


Vector getHostAliasNamesForAllActiveProfiles()
Return a vector of previously-used connection names in all active profiles.


getHostNames


String[] getHostNames(
IRSESystemType systemType)
Return array of previously specified host names for a given system type. After careful consideration, it is decided that if the system type is null, then no host names should be returned. Previously all for all types were returned.


createLocalHost


IHost createLocalHost(
ISystemProfile profile,
                      
String name,
                      
String userId)
Convenience method to create a local connection, as it often that one is needed for access to the local file system.

Parameters:
profile - - the profile to create this connection in. If null is passed, we first try to find the default private profile and use it, else we take the first active profile.
name - - the name to give this profile. Must be unique and non-null.
userId - - the user ID to use as the default for the subsystems. Can be null.

createHost


IHost createHost(
String profileName,
                 
IRSESystemType systemType,
                 
String connectionName,
                 
String hostName,
                 
String description,
                 
String defaultUserId,
                 int defaultUserIdLocation,
                 
ISubSystemConfigurator[] configurators)
                 throws 
Exception
Create a host object, sometimes called a "connection", given the containing profile and given all the possible attributes. The profile is then scheduled to be persisted.

This method:

  • creates and saves a new connection within the given profile
  • calls all subsystem factories to give them a chance to create a subsystem instance
  • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners

Parameters:
profileName - Name of the system profile the connection is to be added to.
systemType - system type matching one of the system types defined via the systemTypes extension point.
connectionName - unique connection name.
hostName - ip name of host.
description - optional description of the connection. Can be null.
defaultUserId - userId to use as the default for the subsystems.
defaultUserIdLocation - one of the constants in IRSEUserIdConstants that tells us where to store the user Id
configurators - these are the configurators supplied by the subsystem configurations that pertain to the specified system type. Else null.
Returns:
SystemConnection object, or null if it failed to create. This is typically because the connectionName is not unique. Call getLastException() if necessary.
Throws:
Exception
Since:
3.0

createHost


IHost createHost(
String profileName,
                 
IRSESystemType systemType,
                 
String connectionName,
                 
String hostName,
                 
String description)
                 throws 
Exception
Create a connection object. This is a simplified version

THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN THE PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK.

This method:

  • creates and saves a new connection within the given profile
  • calls all subsystem factories to give them a chance to create a subsystem instance
  • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners

Parameters:
profileName - Name of the system profile the connection is to be added to.
systemType - system type matching one of the system types defined via the systemTypes extension point.
connectionName - unique connection name.
hostName - ip name of host.
description - optional description of the connection. Can be null.
Returns:
SystemConnection object, or null if it failed to create. This is typically because the connectionName is not unique. Call getLastException() if necessary.
Throws:
Exception

createHost


IHost createHost(
IRSESystemType systemType,
                 
String connectionName,
                 
String hostAddress,
                 
String description)
                 throws 
Exception
Create a connection object. This is a very simplified version that defaults to the user's private profile, or the first active profile if there is no private profile.

THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN THE DEFAULT PRIVATE PROFILE, WHICH IS SAVED TO DISK.

This method:

  • creates and saves a new connection within the given profile
  • calls all subsystem factories to give them a chance to create a subsystem instance
  • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners

Parameters:
systemType - system type matching one of the system types defined via the systemTypes extension point.
connectionName - unique connection name.
hostAddress - ip name of host.
description - optional description of the connection. Can be null.
Returns:
SystemConnection object, or null if it failed to create. This is typically because the connectionName is not unique. Call getLastException() if necessary.
Throws:
Exception

createHost


IHost createHost(
String profileName,
                 
IRSESystemType systemType,
                 
String hostName,
                 
String hostAddress,
                 
String description,
                 boolean createSubSystems)
                 throws 
Exception
Create a host object. The resulting host object is added to the list of existing host objects in the specified profile.
  • creates and saves a new host within the given profile
  • optionally creates subsystem instances
  • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners

Parameters:
profileName - Name of the system profile to which the host is to be added.
systemType - system type of the new host.
hostName - unique host name within the profile.
hostAddress - ip name of host.
description - optional description of the connection. May be null.
createSubSystems - true to create subsystems for the host, false otherwise.
Returns:
IHost object, or null if it failed to create. This is typically because the hostName is not unique. Call getLastException() if necessary.
Throws:
Exception
Since:
org.eclipse.rse.core 3.0

updateHost

void updateHost(
IHost host,
                
IRSESystemType systemType,
                
String connectionName,
                
String hostName,
                
String description,
                
String defaultUserId,
                int defaultUserIdLocation)
Update an existing host given the new information. This method:
  • calls the setXXX methods on the given host object, updating the information in it.
  • save the host's host pool to disk
  • fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners
  • if the system type or host name is changed, calls disconnect on each associated subsystem. We must do this because a host name changes fundamentally affects the connection, rendering any information currently displayed under that host obsolete.

Parameters:
host - the host to be updated
systemType - system type matching one of the system types defined via the systemTypes extension point.
connectionName - unique connection name.
hostName - ip name of host.
description - optional description of the host. Can be null.
defaultUserId - userId to use as the default for the subsystems under this host.
defaultUserIdLocation - one of the constants in IRSEUserIdConstants that tells us where to set the user Id

createSubSystems


ISubSystem[] createSubSystems(
IHost host,
                              
ISubSystemConfiguration[] configurations)
Creates subsystems for a given host and subsystem configurations. If a subsystem cannot be created then null is returned in its corresponding place in the returned array.

Parameters:
host - the host.
configurations - the subsystem configurations.
Returns:
the array of subsystems corresponding to the array of given configurations.
Since:
2.0

setHostOffline

void setHostOffline(
IHost conn,
                    boolean offline)
Update the workoffline mode for a connection.

Parameters:
conn - SystemConnection to change
offline - true if connection should be set offline, false if it should be set online

deleteHost

void deleteHost(
IHost conn)
Delete an existing connection.

Lots to do here:

  • Delete all subsystem objects for this connection, including their file's on disk.
  • Delete the connection from memory.
  • Delete the connection's folder from disk.
Assumption: firing the delete event is done elsewhere. Specifically, the doDelete method of SystemView.


renameHost

void renameHost(
IHost conn,
                
String newName)
                throws 
Exception
Renames an existing connection.

Lots to do here:

  • Reset the conn name for all subsystem objects for this connection
  • Rename the connection in memory.
  • Rename the connection's folder on disk.
Assumption: firing the rename event is done elsewhere. Specifically, the doRename method of SystemView.

Throws:
Exception

moveHosts

void moveHosts(
String profileName,
               
IHost[] conns,
               int delta)
Move existing connections a given number of positions in the same profile. If the delta is negative, they are all moved up by the given amount. If positive, they are all moved down by the given amount.

  • After the move, the pool containing the moved connection is saved to disk.
  • The connection's name must be unique in pool.
  • Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool.

Parameters:
conns - Array of SystemConnections to move.
delta - new zero-based position for the connection

copyHost


IHost copyHost(
IHost conn,
               
ISystemProfile targetProfile,
               
String newName,
               
IProgressMonitor monitor)
               throws 
Exception
Copy a SystemConnection. All subsystems are copied, and all connection data is copied.

Parameters:
conn - The connection to copy
targetProfile - What profile to copy into
newName - Unique name to give copied profile
monitor - Progress monitor to reflect each step of the operation
Returns:
new SystemConnection object
Throws:
Exception

moveHost


IHost moveHost(
IHost conn,
               
ISystemProfile targetProfile,
               
String newName,
               
IProgressMonitor monitor)
               throws 
Exception
Move a SystemConnection to another profile. All subsystems are moved, and all connection data is moved. This is actually accomplished by doing a copy operation first, and if successful deleting the original.

Parameters:
conn - The connection to move
targetProfile - What profile to move into
newName - Unique name to give copied profile. Typically this is the same as the original name, but will be different on name collisions
monitor - Progress monitor to reflect each step of the operation
Returns:
new SystemConnection object
Throws:
Exception

isAnySubSystemSupportsConnect

boolean isAnySubSystemSupportsConnect(
IHost conn)
Return true if any subsystem supports connecting.

Parameters:
conn - the connection.
Returns:
true if any subsystem supports connecting, false otherwise.

isAnySubSystemConnected

boolean isAnySubSystemConnected(
IHost conn)
Return true if any of the subsystems for the given connection are currently connected.


areAllSubSystemsConnected

boolean areAllSubSystemsConnected(
IHost conn)
Return true if all of the subsystems for the given connection are currently connected.


disconnectAllSubSystems

void disconnectAllSubSystems(
IHost conn)
Disconnect all subsystems for the given connection, if they are currently connected.


connectedStatusChange

void connectedStatusChange(
ISubSystem subsystem,
                           boolean connected,
                           boolean wasConnected)
Inform the world when the connection status changes for a subsystem within a connection. Update properties for the subsystem and its connection.


connectedStatusChange

void connectedStatusChange(
ISubSystem subsystem,
                           boolean connected,
                           boolean wasConnected,
                           boolean collapseTree)
Inform the world when the connection status changes for a subsystem within a connection. Update properties for the subsystem and its connection.


addSystemResourceChangeListener

void addSystemResourceChangeListener(
ISystemResourceChangeListener l)
Register your interest in being told when a system resource such as a connection is changed.


removeSystemResourceChangeListener

void removeSystemResourceChangeListener(
ISystemResourceChangeListener l)
De-Register your interest in being told when a system resource such as a connection is changed.


isRegisteredSystemResourceChangeListener

boolean isRegisteredSystemResourceChangeListener(
ISystemResourceChangeListener l)
Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events


fireEvent

void fireEvent(
ISystemResourceChangeEvent event)
Notify all listeners of a change to a system resource such as a connection. You would not normally call this as the methods in this class call it when appropriate.


fireEvent

void fireEvent(
ISystemResourceChangeListener l,
               
ISystemResourceChangeEvent event)
Notify a specific listener of a change to a system resource such as a connection.


addSystemModelChangeListener

void addSystemModelChangeListener(
ISystemModelChangeListener l)
Register your interest in being told when an RSE model resource is changed. These are model events, not GUI-optimized events.


removeSystemModelChangeListener

void removeSystemModelChangeListener(
ISystemModelChangeListener l)
De-Register your interest in being told when an RSE model resource is changed.


fireEvent

void fireEvent(
ISystemModelChangeEvent event)
Notify all listeners of a change to a system model resource such as a connection. You would not normally call this as the methods in this class call it when appropriate.


fireModelChangeEvent

void fireModelChangeEvent(int eventType,
                          int resourceType,
                          
Object resource,
                          
String oldName)
Notify all listeners of a change to a system model resource such as a connection. This one takes the information needed and creates the event for you.


fireEvent

void fireEvent(
ISystemModelChangeListener l,
               
ISystemModelChangeEvent event)
Notify a specific listener of a change to a system model resource such as a connection.


addSystemRemoteChangeListener

void addSystemRemoteChangeListener(
ISystemRemoteChangeListener l)
Register your interest in being told when a remote resource is changed. These are model events, not GUI-optimized events.


removeSystemRemoteChangeListener

void removeSystemRemoteChangeListener(
ISystemRemoteChangeListener l)
Unregister your interest in being told when a remote resource is changed.


isRegisteredSystemRemoteChangeListener

boolean isRegisteredSystemRemoteChangeListener(
ISystemRemoteChangeListener l)
Query if the ISystemRemoteChangeListener is already listening for SystemRemoteChange events.

Parameters:
l - the listener instance to check
Since:
org.eclipse.rse.core 3.0

fireEvent

void fireEvent(
ISystemRemoteChangeEvent event)
Notify all listeners of a change to a remote resource such as a file. You would not normally call this as the methods in this class call it when appropriate.


fireRemoteResourceChangeEvent

void fireRemoteResourceChangeEvent(int eventType,
                                   
Object resource,
                                   
Object resourceParent,
                                   
ISubSystem subsystem,
                                   
String[] oldNames)
Notify all listeners of a change to a remote resource such as a file. This one takes the information needed and creates the event for you.

Parameters:
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
Since:
org.eclipse.rse.core 3.0

fireRemoteResourceChangeEvent

void fireRemoteResourceChangeEvent(int eventType,
                                   
Object resource,
                                   
Object resourceParent,
                                   
ISubSystem subsystem,
                                   
String[] oldNames,
                                   
Object originatingViewer)
Notify all listeners of a change to a remote resource such as a file. This one takes the information needed and creates the event for you.

Parameters:
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
originatingViewer - - optional. If set, this gives the viewer a clue that it should select the affected resource after refreshing its parent. This saves sending a separate event to reveal and select the new created resource on a create event, for example.
Since:
org.eclipse.rse.core 3.0

fireRemoteResourceChangeEvent

void fireRemoteResourceChangeEvent(
String operation,
                                   int eventType,
                                   
Object resource,
                                   
Object resourceParent,
                                   
ISubSystem subsystem,
                                   
String[] oldNames)
Notify all listeners of a change to a remote resource such as a file. This one takes the information needed and creates the event for you.

Parameters:
operation - - the operation for which this event was fired
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
Since:
org.eclipse.rse.core 3.0

fireRemoteResourceChangeEvent

void fireRemoteResourceChangeEvent(
String operation,
                                   int eventType,
                                   
Object resource,
                                   
Object resourceParent,
                                   
ISubSystem subsystem,
                                   
String[] oldNames,
                                   
Object originatingViewer)
Notify all listeners of a change to a remote resource such as a file. This one takes the information needed and creates the event for you.

Parameters:
operation - - the operation for which this event was fired
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
originatingViewer - - optional. If set, this gives the viewer a clue that it should select the affected resource after refreshing its parent. This saves sending a separate event to reveal and select the new created resource on a create event, for example.
Since:
org.eclipse.rse.core 3.0

fireEvent

void fireEvent(
ISystemRemoteChangeListener l,
               
ISystemRemoteChangeEvent event)
Notify a specific listener of a change to a remote resource such as a file.


addSystemPreferenceChangeListener

void addSystemPreferenceChangeListener(
ISystemPreferenceChangeListener l)
Register your interest in being told when a system preference changes


removeSystemPreferenceChangeListener

void removeSystemPreferenceChangeListener(
ISystemPreferenceChangeListener l)
Unregister your interest in being told when a system preference changes


fireEvent

void fireEvent(
ISystemPreferenceChangeEvent event)
Notify all listeners of a change to a system preference You would not normally call this as the methods in this class call it when appropriate.


fireEvent

void fireEvent(
ISystemPreferenceChangeListener l,
               
ISystemPreferenceChangeEvent event)
Notify a specific listener of a change to a system preference


findFilterReferencesFor


List findFilterReferencesFor(
Object resource,
                             
ISubSystem subsystem)
Returns filter references associated with this resource under the subsystem


findFilterReferencesFor


List findFilterReferencesFor(
Object resource,
                             
ISubSystem subsystem,
                             boolean onlyCached)
Returns filter references associated with this resource under the subsystem


invalidateFiltersFor

void invalidateFiltersFor(
ISubSystem subsystem)
Marks all filters for this subsystem as stale to prevent caching

Parameters:
subsystem - the subsystem to work on

invalidateFiltersFor

void invalidateFiltersFor(
Object resourceParent,
                          
ISubSystem subsystem)
Marks all filters for this subsystem that contain resourceParent as stale to prevent caching

Parameters:
resourceParent - a remote resource object
subsystem - the subsystem to work on

getLastException


Exception getLastException()
Return last exception object caught in any method, or null if no exception. This has the side effect of clearing the last exception.


save

boolean save()
Save everything!


saveHostPool

boolean saveHostPool(
ISystemHostPool pool)
Save specific connection pool

Returns:
true if saved ok, false if error encountered. If false, call getLastException().

saveHost

boolean saveHost(
IHost conn)
Save specific connection

Returns:
true if saved ok, false if error encountered. If false, call getLastException().

restore

boolean restore()
Restore all connections within active profiles

Returns:
true if restored ok, false if error encountered. If false, call getLastException().

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire