RSE
Release 1.0

org.eclipse.rse.core.model
Interface ISystemRegistry

All Superinterfaces:
ISchedulingRule
All Known Subinterfaces:
ISystemRegistryUI
All Known Implementing Classes:
SystemRegistry

public interface ISystemRegistry
extends ISchedulingRule

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 getTheSystemRegistry method in the RSEUIPlugin object.

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
 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(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName)
          Copy a SystemConnection.
 ISystemProfile copySystemProfile(IProgressMonitor monitor, ISystemProfile profile, String newName, boolean makeActive)
          Copy a SystemProfile.
 IHost createHost(String systemType, String connectionName, String hostName, String description)
          Create a connection object.
 IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description)
          Create a connection object.
 IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation, ISystemNewConnectionWizardPage[] newConnectionWizardPages)
          Create a connection object, given the connection pool 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.
 ISystemProfile createSystemProfile(String profileName, boolean makeActive)
          Create a SystemProfile given its name and whether or not to make it active
 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.
 void expandHost(IHost conn)
          Expand the given connection in the RSE, if the RSE is the active perspective.
 void expandSubSystem(ISubSystem subsystem)
          Expand the given subsystem in the RSE, if the RSE is the active perspective.
 List findFilterReferencesFor(Object resource, ISubSystem subsystem)
          Returns filter references associated with this resource under the subsystem
 String getAbsoluteNameForConnection(IHost connection)
          Return the absolute name for the specified connection
 String getAbsoluteNameForSubSystem(ISubSystem subsystem)
          Return the absolute name for the specified subsystem
 String[] getActiveSystemProfileNames()
          Return the profile names currently selected by the user as his "active" profiles
 ISystemProfile[] getActiveSystemProfiles()
          Return the profiles currently selected by the user as his "active" profiles
 String[] getAllSystemProfileNames()
          Return all defined profile names
 Vector getAllSystemProfileNamesVector()
          Return all defined profile names as a vector
 ISystemProfile[] getAllSystemProfiles()
          Return all defined profiles
 IConnectorService[] getConnectorServices(IHost conn)
          Return the list of connector services provided 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 getHostAliasNames(String profileName)
          Return a vector of previously-used connection names in the given named 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(String profileName)
          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()
          Return array of all previously specified hostnames.
 String[] getHostNames(String systemType)
          Return array of previously specified hostnames 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 name.
 IHost[] getHostsByProfile(String profileName)
          Return all connections in a given profile.
 IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration factory)
          Return all connections for which there exists one or more subsystems owned by a given subsystem factory.
 IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory)
          Return all connections for which there exists one or more subsystems owned by any a given subsystem factory that is of the given category.
 IHost[] getHostsBySubSystemConfigurationId(String factoryId)
          Return all connections for which there exists one or more subsystems owned by a given subsystem factory, identified by factory Id
 IHost[] getHostsBySystemType(String systemType)
          Return all connections for all active profiles, for the given system type.
 IHost[] getHostsBySystemTypes(String[] 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 localhost we can find.
 boolean getQualifiedHostNames()
          Are connection names to be qualified by profile name?
 ISubSystem[] getServiceSubSystems(Class serviceType, IHost connection)
           
 ISubSystem getSubSystem(String absoluteSubSystemName)
          Resolve a subsystem from it's absolute name
 ISubSystem getSubSystem(String srcProfileName, String srcConnectionName, String subsystemFactoryId)
          Resolve a subsystem from it's profile, connection and subsystem name.
 ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem)
          Return the parent subsystemconfiguration given a subsystem object.
 ISubSystemConfiguration getSubSystemConfiguration(String id)
          Return the subsystemconfiguration, given its plugin.xml-declared id.
 ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
          Public method to retrieve list of subsystem factory proxies registered by extension points.
 ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory)
          Return all subsystem factory proxies matching a subsystem factory category.
 ISubSystemConfiguration[] getSubSystemConfigurations()
          Return all subsystem factories.
 ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory)
          Return all subsystem factories which have declared themselves part of the given category.
 ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType)
          Return all subsystem factories which support the given system type.
 ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType, boolean filterDuplicateServiceSubSystemFactories)
          Return all subsystem factories which support the given system type.
 ISubSystem[] getSubSystems(IHost conn)
          Return list of subsystem objects for a given connection.
 ISubSystem[] getSubSystems(IHost conn, boolean force)
          Return list of subsystem objects for a given connection.
 ISubSystem[] getSubSystems(String factoryId)
          Get a list of subsystem objects owned by the subsystem factory identified by its given plugin.xml-described id.
 ISubSystem[] getSubSystems(String factoryId, IHost connection)
          Get a list of subsystem objects for given connection, owned by the subsystem factory identified by its given plugin.xml-described id.
 ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost connection)
          Get a list of subsystem objects for given connection, owned by a subsystem factory that is of the given category.
 List getSystemClipboardObjects(int srcType)
          Returns the list of objects on the system clipboard
 ISystemFilterPool getSystemFilterPool()
           
 ISystemFilterStartHere getSystemFilterStartHere()
           
 ISystemProfile getSystemProfile(String profileName)
          Get a SystemProfile given its name
 ISystemProfileManager getSystemProfileManager()
          Return singleton profile manager
 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 the 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.
 IHost moveHost(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName)
          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 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 setQualifiedHostNames(boolean set)
          Set if connection names are to be qualified by profile name
 void setShowFilterPools(boolean show)
          Reflect the user changing the preference for showing filter pools.
 void setShowNewHostPrompt(boolean show)
          Reflect the user changing the preference for showing new connection prompt
 void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies)
          Private method used by RSEUIPlugin to tell registry all registered subsystem factories.
 void setSystemProfileActive(ISystemProfile profile, boolean makeActive)
          Make or unmake the given profile active
 void showRSEPerspective()
          Show the RSE perspective if it is not already showing
 
Methods inherited from interface org.eclipse.core.runtime.jobs.ISchedulingRule
contains, isConflicting
 

Method Detail

getSystemFilterStartHere

public ISystemFilterStartHere getSystemFilterStartHere()

getSystemFilterPool

public ISystemFilterPool getSystemFilterPool()

showRSEPerspective

public void showRSEPerspective()
Show the RSE perspective if it is not already showing


expandHost

public void expandHost(IHost conn)
Expand the given connection in the RSE, if the RSE is the active perspective.


expandSubSystem

public void expandSubSystem(ISubSystem subsystem)
Expand the given subsystem in the RSE, if the RSE is the active perspective.


setSubSystemConfigurationProxies

public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies)
Private method used by RSEUIPlugin to tell registry all registered subsystem factories. This way, all code can use this registry to access them versus the RSEUIPlugin.


getSubSystemConfigurationProxies

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


getSubSystemConfigurationProxiesByCategory

public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory)
Return all subsystem factory proxies matching a subsystem factory category.

See Also:
ISubSystemConfigurationCategories

getSubSystemConfigurations

public ISubSystemConfiguration[] getSubSystemConfigurations()
Return all subsystem factories. Be careful when you call this, as it activates all subsystem factories.


getSubSystemConfiguration

public ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem)
Return the parent subsystemconfiguration given a subsystem object.


getSubSystemConfiguration

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


getSubSystemConfigurationsByCategory

public ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory)
Return all subsystem factories which have declared themselves part of the given category.

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

See Also:
ISubSystemConfigurationCategories

getSubSystemConfigurationsBySystemType

public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType)
Return all subsystem factories which support the given system type. If the type is null, returns all.


getSubSystemConfigurationsBySystemType

public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType,
                                                                        boolean filterDuplicateServiceSubSystemFactories)
Return all subsystem factories which support the given system type. If the type is null, returns all.


getQualifiedHostNames

public boolean getQualifiedHostNames()
Are connection names to be qualified by profile name?


setQualifiedHostNames

public void setQualifiedHostNames(boolean set)
Set if connection names are to be qualified by profile name


setShowFilterPools

public void setShowFilterPools(boolean show)
Reflect the user changing the preference for showing filter pools.


setShowNewHostPrompt

public void setShowNewHostPrompt(boolean show)
Reflect the user changing the preference for showing new connection prompt


getSystemProfileManager

public ISystemProfileManager getSystemProfileManager()
Return singleton profile manager


getActiveSystemProfiles

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


getActiveSystemProfileNames

public String[] getActiveSystemProfileNames()
Return the profile names currently selected by the user as his "active" profiles


getAllSystemProfiles

public ISystemProfile[] getAllSystemProfiles()
Return all defined profiles


getAllSystemProfileNames

public String[] getAllSystemProfileNames()
Return all defined profile names


getAllSystemProfileNamesVector

public Vector getAllSystemProfileNamesVector()
Return all defined profile names as a vector


getSystemProfile

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


createSystemProfile

public ISystemProfile createSystemProfile(String profileName,
                                          boolean makeActive)
                                   throws Exception
Create a SystemProfile given its name and whether or not to make it active

Throws:
Exception

copySystemProfile

public ISystemProfile copySystemProfile(IProgressMonitor monitor,
                                        ISystemProfile profile,
                                        String newName,
                                        boolean makeActive)
                                 throws Exception
Copy a SystemProfile. All connections connection data is copied.

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

renameSystemProfile

public void renameSystemProfile(ISystemProfile profile,
                                String newName)
                         throws Exception
Rename a SystemProfile. Rename is propogated to all subsystem factories so they can rename their filter pool managers and whatever else is required.

Throws:
Exception

deleteSystemProfile

public 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.

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

public void setSystemProfileActive(ISystemProfile profile,
                                   boolean makeActive)
Make or unmake the given profile active


getConnectorServices

public IConnectorService[] getConnectorServices(IHost conn)
Return the list of connector services provided for the given host

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

getSubSystems

public ISubSystem[] getSubSystems(IHost conn)
Return list of subsystem objects for a given connection. If the subsystems have not all been read into memory, this loads them up


getSubSystems

public ISubSystem[] getSubSystems(IHost conn,
                                  boolean force)
Return list of subsystem objects for a given connection. Use the force flag to indicate whether or not to restore from disk


getServiceSubSystems

public ISubSystem[] getServiceSubSystems(Class serviceType,
                                         IHost connection)

getSubSystem

public ISubSystem getSubSystem(String srcProfileName,
                               String srcConnectionName,
                               String subsystemFactoryId)
Resolve a subsystem from it's profile, connection and subsystem name.

Parameters:
srcProfileName - the name of the profile
srcConnectionName - the name of the connection
subsystemFactoryId - the id of the subsystem
Returns:
the subsystem

getSubSystem

public ISubSystem getSubSystem(String absoluteSubSystemName)
Resolve a subsystem from it's absolute name

Parameters:
absoluteSubSystemName - the name of the subsystem
Returns:
the subsystem

getAbsoluteNameForSubSystem

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

Returns:
the absolute name of the subsystem

getAbsoluteNameForConnection

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

Returns:
the absolute name of the connection

getSubSystems

public ISubSystem[] getSubSystems(String factoryId)
Get a list of subsystem objects owned by the subsystem factory identified by its given plugin.xml-described id. Array is never null, but may be of length 0.

This is a list that of all subsystems for all connections owned by the factory.


getSubSystems

public ISubSystem[] getSubSystems(String factoryId,
                                  IHost connection)
Get a list of subsystem objects for given connection, owned by the subsystem factory identified by its given plugin.xml-described id. Array will never be null but may be length zero.


getSubSystemsBySubSystemConfigurationCategory

public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory,
                                                                  IHost connection)
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

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


getLocalHost

public IHost getLocalHost()
Return the first connection to localhost 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 localHost will usually do, we just search all active profiles until we find one, and return it.
If no localhost connection is found, this will return null. If one is needed, it can be created easily by calling createLocalHost(ISystemProfile, String, String).


getHosts

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


getHostsByProfile

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


getHostsByProfile

public IHost[] getHostsByProfile(String profileName)
Return all connections in a given profile.


getHostsBySubSystemConfiguration

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

See Also:
getSubSystemConfiguration(String)

getHostsBySubSystemConfigurationId

public IHost[] getHostsBySubSystemConfigurationId(String factoryId)
Return all connections for which there exists one or more subsystems owned by a given subsystem factory, identified by factory Id


getHostsBySubSystemConfigurationCategory

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

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

See Also:
ISubSystemConfigurationCategories

getHostsBySystemType

public IHost[] getHostsBySystemType(String systemType)
Return all connections for all active profiles, for the given system type.


getHostsBySystemTypes

public IHost[] getHostsBySystemTypes(String[] systemTypes)
Return all connections for all active profiles, for the given system types.


getHost

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


getHostPosition

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


getHostCount

public int getHostCount(String profileName)
Return the number of SystemConnection objects within the given profile


getHostCountWithinProfile

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


getHostCount

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


getHostAliasNames

public Vector getHostAliasNames(String profileName)
Return a vector of previously-used connection names in the given named profile.

Returns:
Vector of String objects.

getHostAliasNames

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

Returns:
Vector of String objects.

getHostAliasNamesForAllActiveProfiles

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


getHostNames

public String[] getHostNames()
Return array of all previously specified hostnames.


getHostNames

public String[] getHostNames(String systemType)
Return array of previously specified hostnames for a given system type.


getSystemClipboardObjects

public List getSystemClipboardObjects(int srcType)
Returns the list of objects on the system clipboard

Parameters:
srcType - the transfer type
Returns:
the list of clipboard objects

createLocalHost

public 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

public IHost createHost(String profileName,
                        String systemType,
                        String connectionName,
                        String hostName,
                        String description,
                        String defaultUserId,
                        int defaultUserIdLocation,
                        ISystemNewConnectionWizardPage[] newConnectionWizardPages)
                 throws Exception
Create a connection object, given the connection pool and given all the possible attributes.

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

This method:

Parameters:
profileName - Name of the system profile the connection is to be added to.
systemType - system type matching one of the system type names 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 ISystemUserIdConstants that tells us where to set the user Id
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.
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

public IHost createHost(String profileName,
                        String 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:

Parameters:
profileName - Name of the system profile the connection is to be added to.
systemType - system type matching one of the system type names 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

public IHost createHost(String systemType,
                        String connectionName,
                        String hostName,
                        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:

Parameters:
systemType - system type matching one of the system type names 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

setHostOffline

public 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

public void deleteHost(IHost conn)
Delete an existing connection.

Lots to do here:

Assumption: firing the delete event is done elsewhere. Specifically, the doDelete method of SystemView.


renameHost

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

Lots to do here:

Assumption: firing the rename event is done elsewhere. Specifically, the doRename method of SystemView.

Throws:
Exception

moveHosts

public 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.

TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?

Parameters:
conns - Array of SystemConnections to move.

copyHost

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

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

moveHost

public IHost moveHost(IProgressMonitor monitor,
                      IHost conn,
                      ISystemProfile targetProfile,
                      String newName)
               throws Exception
Move a SystemConnection to another profile. All subsystems are copied, and all connection data is copied.

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

isAnySubSystemSupportsConnect

public 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

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


areAllSubSystemsConnected

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


disconnectAllSubSystems

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


connectedStatusChange

public void connectedStatusChange(ISubSystem subsystem,
                                  boolean connected,
                                  boolean wasConnected)
Inform the world when the connection status changes for a subsystem within a connection


connectedStatusChange

public void connectedStatusChange(ISubSystem subsystem,
                                  boolean connected,
                                  boolean wasConnected,
                                  boolean collapseTree)
Inform the world when the connection status changes for a subsystem within a connection


findFilterReferencesFor

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


invalidateFiltersFor

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

Parameters:
subsystem -

invalidateFiltersFor

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

Parameters:
resourceParent -
subsystem -

getLastException

public 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

public boolean save()
Save everything!


saveHostPool

public boolean saveHostPool(ISystemHostPool pool)
Save specific connection pool

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

saveHost

public boolean saveHost(IHost conn)
Save specific connection

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

restore

public boolean restore()
Restore all connections within active profiles

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

RSE
Release 1.0

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