RSE
Release 1.0

org.eclipse.rse.model
Class SystemRegistry

java.lang.Object
  extended byorg.eclipse.rse.model.SystemRegistry
All Implemented Interfaces:
IAdaptable, ISchedulingRule, ISystemModelChangeEvents, ISystemRegistry, ISystemRegistryUI, ISystemViewInputProvider

public class SystemRegistry
extends Object
implements ISystemRegistryUI, ISystemModelChangeEvents, ISystemViewInputProvider

Registry for all connections.


Field Summary
 
Fields inherited from interface org.eclipse.rse.core.model.ISystemModelChangeEvents
SYSTEM_RESOURCE_ADDED, SYSTEM_RESOURCE_ALL_RELOADED, SYSTEM_RESOURCE_CHANGED, SYSTEM_RESOURCE_REMOVED, SYSTEM_RESOURCE_RENAMED, SYSTEM_RESOURCE_REORDERED, SYSTEM_RESOURCETYPE_ALL, SYSTEM_RESOURCETYPE_COMPILECMD, SYSTEM_RESOURCETYPE_CONNECTION, SYSTEM_RESOURCETYPE_FILTER, SYSTEM_RESOURCETYPE_FILTERPOOL, SYSTEM_RESOURCETYPE_FILTERPOOLREF, SYSTEM_RESOURCETYPE_NAMEDTYPE, SYSTEM_RESOURCETYPE_PROFILE, SYSTEM_RESOURCETYPE_SUBSYSTEM, SYSTEM_RESOURCETYPE_USERACTION
 
Constructor Summary
protected SystemRegistry(String logfilePath)
          Constructor.
 
Method Summary
static String addPathTerminator(String path)
          Ensure given path ends with path separator.
 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 clearRunnableContext()
          Clear the current active runnable context to be used for a progress monitor.
 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.
 boolean contains(ISchedulingRule rule)
           
 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
 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 oldName, Viewer originatingViewer)
          Notify all listeners of a change to a remote resource such as a file.
 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
 Object getAdapter(Class adapterType)
          This is the method required by the IAdaptable interface.
 String[] getAllSystemProfileNames()
          Return all defined profile names
 Vector getAllSystemProfileNamesVector()
          Return all defined profile names as a vector
 ISystemProfile[] getAllSystemProfiles()
          Return all defined profiles
 Object[] getConnectionChildren(IHost selectedConnection)
          This method is called by the connection adapter when the user expands a connection.
 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 an 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.
 int getHostPositionInView(IHost conn)
          Return the zero-based position of a SystemConnection object within all active profiles.
 IHost[] getHosts()
          Return all connections in all active profiles.
 IHost[] getHostsByProfile(ISystemProfile profile)
          Return all connections in a given profile.
 IHost[] getHostsByProfile(String profileName)
          Return all connections in a given profile name.
 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 child classes of a given subsystem factory 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.
protected  IHost getPreviousHost(IHost conn)
          Return the previous connection as would be shown in the view
 boolean getQualifiedHostNames()
          Are connection names to be qualified by profile name?
protected  ISystemRemoteElementAdapter getRemoteAdapter(Object o)
          Returns the implementation of ISystemRemoteElement for the given object.
 IRunnableContext getRunnableContext()
          Return the current registered runnable context, or null if none registered.
 ISubSystem[] getServiceSubSystems(Class serviceType, IHost connection)
           
 Shell getShell()
          Return the shell of the current viewer
 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 subsystem configuration given a subsystem object.
 ISubSystemConfiguration getSubSystemConfiguration(String id)
          Return the subsystem configuration, 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.
protected  Vector getSubSystemFactories(IHost conn)
          Return Vector of subsystem factories that apply to a given system connection
protected  Vector getSubSystemFactories(IHost[] conns)
          Return Vector of subsystem factories that apply to a given system connection array
protected  Vector getSubSystemFactories(IHost conn, Vector factories)
          Return Vector of subsystem factories that apply to a given system connection, updating given vector
 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.
 ISubSystem[] getSubSystemsLazily(IHost conn)
          Return list of subsystem objects for a given connection, but does not force as-yet-non-restored subsystems to come to life.
 Clipboard getSystemClipboard()
          Returns the clipboard used for copy actions
 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
static ISystemRegistry getSystemRegistry()
          Return singleton instance assuming it already exists.
static ISystemRegistry getSystemRegistry(String logfilePath)
          Return singleton instance.
 org.eclipse.rse.internal.model.SystemScratchpad getSystemScratchPad()
           
 Object[] getSystemViewRoots()
          Return the children objects to consistute the root elements in the system view tree.
 Viewer getViewer()
          Return the viewer we are currently associated with
 boolean hasConnectionChildren(IHost selectedConnection)
          This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection.
 boolean hasSystemViewRoots()
          Return true if getSystemViewRoots() will return a non-empty list We return true if there are any connections for any active profile.
 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.
 boolean isConflicting(ISchedulingRule rule)
           
 boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
          Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events
 void loadAll()
          Load everything into memory.
 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 postEvent(ISystemResourceChangeEvent event)
          Notify all listeners of a change to a system resource such as a connection.
 void postEvent(ISystemResourceChangeListener listener, ISystemResourceChangeEvent event)
          Notify a specific listener of a change to a system resource such as a connection.
 void removeSystemModelChangeListener(ISystemModelChangeListener l)
          De-Register your interest in being told when an RSE model resource is changed.
 void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
          De-Register your interest in being told when a system preference changes
 void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
          De-Register 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.
 void reset()
          Reset for a full refresh from disk, such as after a team synch
 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 attribute for a connection.
 void setQualifiedHostNames(boolean set)
          Set if connection names are to be qualified by profile name
 void setRunnableContext(Shell shell, IRunnableContext context)
          Set the current active runnable context to be used for a progress monitor by the subsystem methods that go to the host.
 void setShell(Shell shell)
          Set the shell in case it is needed for anything.
 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 setViewer(Viewer viewer)
          Set the viewer in case it is needed for anything.
 boolean showActionBar()
          Return true to show the action bar (ie, toolbar) above the viewer.
 boolean showActions()
          Return true to show right-click popup actions on objects in the tree.
 boolean showButtonBar()
          Return true to show the button bar above the viewer.
 boolean showingConnections()
          Return true if we are listing connections or not, so we know whether we are interested in connection-add events
 void showRSEPerspective()
          Show the RSE perspective if it is not already showing
 void updateHost(Shell shell, IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
          Update an existing connection given the new information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemRegistry

protected SystemRegistry(String logfilePath)
Constructor. This is protected as the singleton instance should be retrieved by calling getSystemRegistry().

Parameters:
logfilePath - Root folder. Where to place the log file.
Method Detail

reset

public void reset()
Reset for a full refresh from disk, such as after a team synch


getSystemRegistry

public static ISystemRegistry getSystemRegistry(String logfilePath)
Return singleton instance. Must be used on first instantiate.

Parameters:
logfilePath - Root folder. Where to place the log file.

getSystemRegistry

public static ISystemRegistry getSystemRegistry()
Return singleton instance assuming it already exists.


addPathTerminator

public static String addPathTerminator(String path)
Ensure given path ends with path separator.


showRSEPerspective

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

Specified by:
showRSEPerspective in interface ISystemRegistry

expandHost

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

Specified by:
expandHost in interface ISystemRegistry

expandSubSystem

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

Specified by:
expandSubSystem in interface ISystemRegistry

getSystemViewRoots

public Object[] getSystemViewRoots()
Return the children objects to consistute the root elements in the system view tree. We return all connections for all active profiles.

Specified by:
getSystemViewRoots in interface ISystemViewInputProvider
Returns:
the children objects to consistute the root elements in the system view tree

hasSystemViewRoots

public boolean hasSystemViewRoots()
Return true if getSystemViewRoots() will return a non-empty list We return true if there are any connections for any active profile.

Specified by:
hasSystemViewRoots in interface ISystemViewInputProvider
Returns:
true if ISystemViewInputProvider.getSystemViewRoots() will return a non-empty list

getConnectionChildren

public 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

public boolean hasConnectionChildren(IHost selectedConnection)
This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection. Return true if this connection has children to be shown.

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.

getAdapter

public Object getAdapter(Class adapterType)
This is the method required by the IAdaptable interface. Given an adapter class type, return an object castable to the type, or null if this is not possible.

Specified by:
getAdapter in interface ISystemViewInputProvider

setShell

public void setShell(Shell shell)
Set the shell in case it is needed for anything. The label and content provider will call this.

Specified by:
setShell in interface ISystemViewInputProvider
Parameters:
shell - the shell being used by the viewer using this provider

getShell

public Shell getShell()
Return the shell of the current viewer

Specified by:
getShell in interface ISystemViewInputProvider
Returns:
the shell of the viewer we are currently associated with

showActionBar

public boolean showActionBar()
Return true to show the action bar (ie, toolbar) above the viewer. The action bar contains connection actions, predominantly.

Specified by:
showActionBar in interface ISystemViewInputProvider
Returns:
true to show the action bar (ie, toolbar) above the viewer. The action bar contains connection actions, predominantly.

showButtonBar

public boolean showButtonBar()
Return true to show the button bar above the viewer. The tool bar contains "Get List" and "Refresh" buttons and is typicall shown in dialogs that list only remote system objects.

Specified by:
showButtonBar in interface ISystemViewInputProvider
Returns:
true to show the button bar above the viewer. The tool bar contains "Get List" and "Refresh" buttons and is typicall shown in dialogs that list only remote system objects.

showActions

public boolean showActions()
Return true to show right-click popup actions on objects in the tree.

Specified by:
showActions in interface ISystemViewInputProvider
Returns:
true to show right-click popup actions on objects in the tree.

setViewer

public void setViewer(Viewer viewer)
Set the viewer in case it is needed for anything. The label and content provider will call this.

Specified by:
setViewer in interface ISystemViewInputProvider
Parameters:
viewer - the viewer that uses this provider

getViewer

public Viewer getViewer()
Return the viewer we are currently associated with

Specified by:
getViewer in interface ISystemViewInputProvider
Returns:
the viewer we are currently associated with

showingConnections

public boolean showingConnections()
Return true if we are listing connections or not, so we know whether we are interested in connection-add events

Specified by:
showingConnections in interface ISystemViewInputProvider
Returns:
true if we are listing connections or not, so we know whether we are interested in connection-add events

setRunnableContext

public void setRunnableContext(Shell shell,
                               IRunnableContext context)
Set the current active runnable context to be used for a progress monitor by the subsystem methods that go to the host. Called by wizards and dialogs that have a built-in progress monitor and hence removes the need to popup an intrusive pm dialog.

You must call clearRunnableContext when your dialog/wizard is disposed!

Parameters:
shell - The shell of the wizard/dialog. This is recorded so it can be tested if it is disposed before attempting to use the context
context - The dialog/wizard/view that implements IRunnableContext

clearRunnableContext

public void clearRunnableContext()
Clear the current active runnable context to be used for a progress monitor. Be sure to call this from you dispose method.


getRunnableContext

public IRunnableContext getRunnableContext()
Return the current registered runnable context, or null if none registered. Use this for long running operations instead of an intrusive progress monitor dialog as it is more user friendly. Many dialogs/wizards have these built in so it behooves us to use it.


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.

Specified by:
setSubSystemConfigurationProxies in interface ISystemRegistry

getSubSystemConfigurationProxies

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

Specified by:
getSubSystemConfigurationProxies in interface ISystemRegistry

getSubSystemConfigurationProxiesByCategory

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

Specified by:
getSubSystemConfigurationProxiesByCategory in interface ISystemRegistry
See Also:
ISubSystemConfigurationCategories

getSubSystemConfiguration

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

Specified by:
getSubSystemConfiguration in interface ISystemRegistry

getSubSystemConfiguration

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

Specified by:
getSubSystemConfiguration in interface ISystemRegistry

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.

Specified by:
getSubSystemConfigurationsByCategory in interface ISystemRegistry
See Also:
ISubSystemConfigurationCategories

getSubSystemConfigurationsBySystemType

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

Specified by:
getSubSystemConfigurationsBySystemType in interface ISystemRegistry

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.

Specified by:
getSubSystemConfigurationsBySystemType in interface ISystemRegistry

getQualifiedHostNames

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

Specified by:
getQualifiedHostNames in interface ISystemRegistry

setQualifiedHostNames

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

Specified by:
setQualifiedHostNames in interface ISystemRegistry

setShowFilterPools

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

Specified by:
setShowFilterPools in interface ISystemRegistry

setShowNewHostPrompt

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

Specified by:
setShowNewHostPrompt in interface ISystemRegistry

getSystemProfileManager

public ISystemProfileManager getSystemProfileManager()
Return singleton profile manager

Specified by:
getSystemProfileManager in interface ISystemRegistry

getActiveSystemProfiles

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

Specified by:
getActiveSystemProfiles in interface ISystemRegistry

getActiveSystemProfileNames

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

Specified by:
getActiveSystemProfileNames in interface ISystemRegistry

getAllSystemProfiles

public ISystemProfile[] getAllSystemProfiles()
Return all defined profiles

Specified by:
getAllSystemProfiles in interface ISystemRegistry

getAllSystemProfileNames

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

Specified by:
getAllSystemProfileNames in interface ISystemRegistry

getAllSystemProfileNamesVector

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

Specified by:
getAllSystemProfileNamesVector in interface ISystemRegistry

getSystemProfile

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

Specified by:
getSystemProfile in interface ISystemRegistry

createSystemProfile

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

Specified by:
createSystemProfile in interface ISystemRegistry
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.

Specified by:
renameSystemProfile in interface ISystemRegistry
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.

Specified by:
copySystemProfile in interface ISystemRegistry
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

deleteSystemProfile

public void deleteSystemProfile(ISystemProfile profile)
                         throws Exception
Delete a SystemProfile. Prior to physically deleting the profile, we delete all the connections it has (first disconnecting if they are connected), and 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.

Specified by:
deleteSystemProfile in interface ISystemRegistry
Throws:
Exception

setSystemProfileActive

public void setSystemProfileActive(ISystemProfile profile,
                                   boolean makeActive)
Make or unmake the given profile active. If switching to inactive, we force a disconnect for all subsystems of all connections in this profile.

Specified by:
setSystemProfileActive in interface ISystemRegistry

getConnectorServices

public IConnectorService[] getConnectorServices(IHost conn)
Description copied from interface: ISystemRegistry
Return the list of connector services provided for the given host

Specified by:
getConnectorServices in interface ISystemRegistry
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. Demand pages the subsystem factories into memory if they aren't already.

To protect against crashes, if there are no subsystems, an array of length zero is returned.

Specified by:
getSubSystems in interface ISystemRegistry

getSubSystems

public ISubSystem[] getSubSystems(IHost conn,
                                  boolean force)
Return list of subsystem objects for a given connection. Demand pages the subsystem factories into memory if they aren't already.

To protect against crashes, if there are no subsystems, an array of length zero is returned.

Specified by:
getSubSystems in interface ISystemRegistry

getSubSystem

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

Specified by:
getSubSystem in interface ISystemRegistry
Parameters:
absoluteSubSystemName - the name of the subsystem
Returns:
the subsystem

getSubSystem

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

Specified by:
getSubSystem in interface ISystemRegistry
Parameters:
srcProfileName - the name of the profile
srcConnectionName - the name of the connection
subsystemFactoryId - the factory Id of the subsystem
Returns:
the subsystem

getAbsoluteNameForSubSystem

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

Specified by:
getAbsoluteNameForSubSystem in interface ISystemRegistry
Returns:
the absolute name of the subsystem

getAbsoluteNameForConnection

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

Specified by:
getAbsoluteNameForConnection in interface ISystemRegistry
Returns:
the absolute name of the connection

getSubSystemsLazily

public ISubSystem[] getSubSystemsLazily(IHost conn)
Return list of subsystem objects for a given connection, but does not force as-yet-non-restored subsystems to come to life.

To protect against crashes, if there are no subsystems, an array of length zero is returned.


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.

Specified by:
getSubSystems in interface ISystemRegistry

getServiceSubSystems

public ISubSystem[] getServiceSubSystems(Class serviceType,
                                         IHost connection)
Specified by:
getServiceSubSystems in interface ISystemRegistry

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.

Specified by:
getSubSystems in interface ISystemRegistry

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.

Specified by:
getSubSystemsBySubSystemConfigurationCategory in interface ISystemRegistry
See Also:
ISubSystemConfigurationCategories

getSubSystemConfigurations

public ISubSystemConfiguration[] getSubSystemConfigurations()
Description copied from interface: ISystemRegistry
Return all subsystem factories. Be careful when you call this, as it activates all subsystem factories.

Specified by:
getSubSystemConfigurations in interface ISystemRegistry
Returns:
all subsystem configurations. Be careful when you call this, as it activates all subsystem factories.

getSubSystemFactories

protected Vector getSubSystemFactories(IHost conn)
Return Vector of subsystem factories that apply to a given system connection


getSubSystemFactories

protected Vector getSubSystemFactories(IHost conn,
                                       Vector factories)
Return Vector of subsystem factories that apply to a given system connection, updating given vector


getSubSystemFactories

protected Vector getSubSystemFactories(IHost[] conns)
Return Vector of subsystem factories that apply to a given system connection array


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.

Specified by:
deleteSubSystem in interface ISystemRegistry

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

Specified by:
getLocalHost in interface ISystemRegistry

getHosts

public IHost[] getHosts()
Return all connections in all active profiles. Never returns null, but may return a zero-length array.

Specified by:
getHosts in interface ISystemRegistry

getHostsByProfile

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

Specified by:
getHostsByProfile in interface ISystemRegistry

getHostsByProfile

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

Specified by:
getHostsByProfile in interface ISystemRegistry

getHostsBySubSystemConfiguration

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

Specified by:
getHostsBySubSystemConfiguration in interface ISystemRegistry
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

Specified by:
getHostsBySubSystemConfigurationId in interface ISystemRegistry

getHostsBySubSystemConfigurationCategory

public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory)
Return all connections for which there exists one or more subsystems owned by any child classes of a given subsystem factory 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 live a subsystem factory just to test its parent class type.

Specified by:
getHostsBySubSystemConfigurationCategory in interface ISystemRegistry
See Also:
ISubSystemConfigurationCategories

getHostsBySystemType

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

Specified by:
getHostsBySystemType in interface ISystemRegistry

getHostsBySystemTypes

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

Specified by:
getHostsBySystemTypes in interface ISystemRegistry

getHost

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

Specified by:
getHost in interface ISystemRegistry

getHostPosition

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

Specified by:
getHostPosition in interface ISystemRegistry

getHostPositionInView

public int getHostPositionInView(IHost conn)
Return the zero-based position of a SystemConnection object within all active profiles.


getHostCount

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

Specified by:
getHostCount in interface ISystemRegistry

getHostCountWithinProfile

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

Specified by:
getHostCountWithinProfile in interface ISystemRegistry

getHostCount

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

Specified by:
getHostCount in interface ISystemRegistry

getHostAliasNames

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

Specified by:
getHostAliasNames in interface ISystemRegistry
Returns:
Vector of String objects.

getHostAliasNames

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

Specified by:
getHostAliasNames in interface ISystemRegistry
Returns:
Vector of String objects.

getHostAliasNamesForAllActiveProfiles

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

Specified by:
getHostAliasNamesForAllActiveProfiles in interface ISystemRegistry

getHostNames

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

Specified by:
getHostNames in interface ISystemRegistry

getHostNames

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

Specified by:
getHostNames in interface ISystemRegistry

getSystemClipboard

public Clipboard getSystemClipboard()
Returns the clipboard used for copy actions

Specified by:
getSystemClipboard in interface ISystemRegistryUI

getSystemClipboardObjects

public List getSystemClipboardObjects(int srcType)
Description copied from interface: ISystemRegistry
Returns the list of objects on the system clipboard

Specified by:
getSystemClipboardObjects in interface ISystemRegistry
Parameters:
srcType - the transfer type
Returns:
the list of clipboard objects

getSystemScratchPad

public org.eclipse.rse.internal.model.SystemScratchpad getSystemScratchPad()

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.

Specified by:
createLocalHost in interface ISystemRegistry
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 PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK.

This method:

Specified by:
createHost in interface ISystemRegistry
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:

Specified by:
createHost in interface ISystemRegistry
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:

Specified by:
createHost in interface ISystemRegistry
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

getPreviousHost

protected IHost getPreviousHost(IHost conn)
Return the previous connection as would be shown in the view


updateHost

public void updateHost(Shell shell,
                       IHost conn,
                       String systemType,
                       String connectionName,
                       String hostName,
                       String description,
                       String defaultUserId,
                       int defaultUserIdLocation)
Update an existing connection given the new information. This method:

Specified by:
updateHost in interface ISystemRegistryUI
Parameters:
conn - SystemConnection to be updated
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

setHostOffline

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

Specified by:
setHostOffline in interface ISystemRegistry
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.

Specified by:
deleteHost in interface ISystemRegistry

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.

Specified by:
renameHost in interface ISystemRegistry
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?

Specified by:
moveHosts in interface ISystemRegistry
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.

Specified by:
copyHost in interface ISystemRegistry
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 moved, and all connection data is moved. This is actually accomplished by doing a copy operation first, and if successful deleting the original.

Specified by:
moveHost in interface ISystemRegistry
Parameters:
monitor - Progress monitor to reflect each step of the operation
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
Returns:
new SystemConnection object
Throws:
Exception

isAnySubSystemSupportsConnect

public boolean isAnySubSystemSupportsConnect(IHost conn)
Description copied from interface: ISystemRegistry
Return true if any subsystem supports connecting.

Specified by:
isAnySubSystemSupportsConnect in interface ISystemRegistry
Parameters:
conn - the connection.
Returns:
true if any subsystem supports connecting, false otherwise.
See Also:
ISystemRegistry.isAnySubSystemSupportsConnect(org.eclipse.rse.core.model.IHost)

isAnySubSystemConnected

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

Specified by:
isAnySubSystemConnected in interface ISystemRegistry

areAllSubSystemsConnected

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

Specified by:
areAllSubSystemsConnected in interface ISystemRegistry

disconnectAllSubSystems

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

Specified by:
disconnectAllSubSystems in interface ISystemRegistry

connectedStatusChange

public 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

Specified by:
connectedStatusChange in interface ISystemRegistry

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. Update properties for the subsystem and its connection

Specified by:
connectedStatusChange in interface ISystemRegistry

addSystemResourceChangeListener

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


removeSystemResourceChangeListener

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


isRegisteredSystemResourceChangeListener

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


fireEvent

public 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

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


postEvent

public void postEvent(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.

This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.


postEvent

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

This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.


addSystemModelChangeListener

public 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

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


fireEvent

public 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

public 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

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


addSystemRemoteChangeListener

public 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

public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
De-Register your interest in being told when a remote resource is changed.


fireEvent

public 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

public void fireRemoteResourceChangeEvent(int eventType,
                                          Object resource,
                                          Object resourceParent,
                                          ISubSystem subsystem,
                                          String oldName,
                                          Viewer 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 occurences 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.
oldName - - on a rename operation, this is the absolute name of the resource prior to the rename
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.

getRemoteAdapter

protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
Returns the implementation of ISystemRemoteElement for the given object. Returns null if this object does not adaptable to this.


findFilterReferencesFor

public List findFilterReferencesFor(Object resource,
                                    ISubSystem subsystem)
Description copied from interface: ISystemRegistry
Returns filter references associated with this resource under the subsystem

Specified by:
findFilterReferencesFor in interface ISystemRegistry

invalidateFiltersFor

public void invalidateFiltersFor(ISubSystem subsystem)
Description copied from interface: ISystemRegistry
Marks all filters for this subsystem as stale to prevent caching

Specified by:
invalidateFiltersFor in interface ISystemRegistry
Parameters:
subsystem -

invalidateFiltersFor

public void invalidateFiltersFor(Object resourceParent,
                                 ISubSystem subsystem)
Description copied from interface: ISystemRegistry
Marks all filters for this subsystem the contain resourceParent as stale to prevent caching

Specified by:
invalidateFiltersFor in interface ISystemRegistry
Parameters:
resourceParent -
subsystem -

fireEvent

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


addSystemPreferenceChangeListener

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


removeSystemPreferenceChangeListener

public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
De-Register your interest in being told when a system preference changes


fireEvent

public 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

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


loadAll

public void loadAll()
Load everything into memory. Needed for pervasive operations like rename and copy


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.

Specified by:
getLastException in interface ISystemRegistry

save

public boolean save()
Save everything!

Specified by:
save in interface ISystemRegistry

saveHostPool

public boolean saveHostPool(ISystemHostPool pool)
Save specific connection pool

Specified by:
saveHostPool in interface ISystemRegistry
Returns:
true if saved ok, false if error encountered. If false, call getLastException().

saveHost

public boolean saveHost(IHost conn)
Save specific connection

Specified by:
saveHost in interface ISystemRegistry
Returns:
true if saved ok, false if error encountered. If false, call getLastException().

restore

public boolean restore()
Restore all connections within active profiles

Specified by:
restore in interface ISystemRegistry
Returns:
true if restored ok, false if error encountered. If false, call getLastException().

contains

public boolean contains(ISchedulingRule rule)
Specified by:
contains in interface ISchedulingRule

isConflicting

public boolean isConflicting(ISchedulingRule rule)
Specified by:
isConflicting in interface ISchedulingRule

getSystemFilterStartHere

public ISystemFilterStartHere getSystemFilterStartHere()
Specified by:
getSystemFilterStartHere in interface ISystemRegistry

getSystemFilterPool

public ISystemFilterPool getSystemFilterPool()
Specified by:
getSystemFilterPool in interface ISystemRegistry

RSE
Release 1.0

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