|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.model.SystemRegistry
Registry for all connections.
| Field Summary |
|---|
| 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 |
protected SystemRegistry(String logfilePath)
logfilePath - Root folder. Where to place the log file.| Method Detail |
public void reset()
public static ISystemRegistry getSystemRegistry(String logfilePath)
logfilePath - Root folder. Where to place the log file.public static ISystemRegistry getSystemRegistry()
public static String addPathTerminator(String path)
public void showRSEPerspective()
showRSEPerspective in interface ISystemRegistrypublic void expandHost(IHost conn)
expandHost in interface ISystemRegistrypublic void expandSubSystem(ISubSystem subsystem)
expandSubSystem in interface ISystemRegistrypublic Object[] getSystemViewRoots()
getSystemViewRoots in interface ISystemViewInputProviderpublic boolean hasSystemViewRoots()
getSystemViewRoots() will return a non-empty list
We return true if there are any connections for any active profile.
hasSystemViewRoots in interface ISystemViewInputProviderISystemViewInputProvider.getSystemViewRoots() will return a non-empty listpublic Object[] getConnectionChildren(IHost selectedConnection)
getConnectionChildren in interface ISystemViewInputProviderselectedConnection - the connection undergoing expansion
public boolean hasConnectionChildren(IHost selectedConnection)
hasConnectionChildren in interface ISystemViewInputProviderselectedConnection - the connection being shown in the viewer
public Object getAdapter(Class adapterType)
getAdapter in interface ISystemViewInputProviderpublic void setShell(Shell shell)
setShell in interface ISystemViewInputProvidershell - the shell being used by the viewer using this providerpublic Shell getShell()
getShell in interface ISystemViewInputProviderpublic boolean showActionBar()
showActionBar in interface ISystemViewInputProviderpublic boolean showButtonBar()
showButtonBar in interface ISystemViewInputProviderpublic boolean showActions()
showActions in interface ISystemViewInputProviderpublic void setViewer(Viewer viewer)
setViewer in interface ISystemViewInputProviderviewer - the viewer that uses this providerpublic Viewer getViewer()
getViewer in interface ISystemViewInputProviderpublic boolean showingConnections()
showingConnections in interface ISystemViewInputProvider
public void setRunnableContext(Shell shell,
IRunnableContext context)
You must call clearRunnableContext when your dialog/wizard is disposed!
shell - The shell of the wizard/dialog. This is recorded so it can be tested if
it is disposed before attempting to use the contextcontext - The dialog/wizard/view that implements IRunnableContextpublic void clearRunnableContext()
public IRunnableContext getRunnableContext()
public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies)
setSubSystemConfigurationProxies in interface ISystemRegistrypublic ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
getSubSystemConfigurationProxies in interface ISystemRegistrypublic ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory)
getSubSystemConfigurationProxiesByCategory in interface ISystemRegistryISubSystemConfigurationCategoriespublic ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem)
getSubSystemConfiguration in interface ISystemRegistrypublic ISubSystemConfiguration getSubSystemConfiguration(String id)
getSubSystemConfiguration in interface ISystemRegistrypublic ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory)
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.
getSubSystemConfigurationsByCategory in interface ISystemRegistryISubSystemConfigurationCategoriespublic ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType)
ISystemRegistry
getSubSystemConfigurationsBySystemType in interface ISystemRegistry
public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType,
boolean filterDuplicateServiceSubSystemFactories)
getSubSystemConfigurationsBySystemType in interface ISystemRegistrypublic boolean getQualifiedHostNames()
getQualifiedHostNames in interface ISystemRegistrypublic void setQualifiedHostNames(boolean set)
setQualifiedHostNames in interface ISystemRegistrypublic void setShowFilterPools(boolean show)
setShowFilterPools in interface ISystemRegistrypublic void setShowNewHostPrompt(boolean show)
setShowNewHostPrompt in interface ISystemRegistrypublic ISystemProfileManager getSystemProfileManager()
getSystemProfileManager in interface ISystemRegistrypublic ISystemProfile[] getActiveSystemProfiles()
getActiveSystemProfiles in interface ISystemRegistrypublic String[] getActiveSystemProfileNames()
getActiveSystemProfileNames in interface ISystemRegistrypublic ISystemProfile[] getAllSystemProfiles()
getAllSystemProfiles in interface ISystemRegistrypublic String[] getAllSystemProfileNames()
getAllSystemProfileNames in interface ISystemRegistrypublic Vector getAllSystemProfileNamesVector()
getAllSystemProfileNamesVector in interface ISystemRegistrypublic ISystemProfile getSystemProfile(String profileName)
getSystemProfile in interface ISystemRegistry
public ISystemProfile createSystemProfile(String profileName,
boolean makeActive)
throws Exception
createSystemProfile in interface ISystemRegistryException
public void renameSystemProfile(ISystemProfile profile,
String newName)
throws Exception
renameSystemProfile in interface ISystemRegistryException
public ISystemProfile copySystemProfile(IProgressMonitor monitor,
ISystemProfile profile,
String newName,
boolean makeActive)
throws Exception
copySystemProfile in interface ISystemRegistrymonitor - Progress monitor to reflect each step of the operationprofile - Source profile to copynewName - Unique name to give copied profilemakeActive - whether to make the copied profile active or not
Exception
public void deleteSystemProfile(ISystemProfile profile)
throws Exception
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.
deleteSystemProfile in interface ISystemRegistryException
public void setSystemProfileActive(ISystemProfile profile,
boolean makeActive)
setSystemProfileActive in interface ISystemRegistrypublic IConnectorService[] getConnectorServices(IHost conn)
ISystemRegistry
getConnectorServices in interface ISystemRegistryconn - the host
public ISubSystem[] getSubSystems(IHost conn)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
getSubSystems in interface ISystemRegistry
public ISubSystem[] getSubSystems(IHost conn,
boolean force)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
getSubSystems in interface ISystemRegistrypublic ISubSystem getSubSystem(String absoluteSubSystemName)
getSubSystem in interface ISystemRegistryabsoluteSubSystemName - the name of the subsystem
public ISubSystem getSubSystem(String srcProfileName,
String srcConnectionName,
String subsystemFactoryId)
getSubSystem in interface ISystemRegistrysrcProfileName - the name of the profilesrcConnectionName - the name of the connectionsubsystemFactoryId - the factory Id of the subsystem
public String getAbsoluteNameForSubSystem(ISubSystem subSystem)
getAbsoluteNameForSubSystem in interface ISystemRegistrypublic String getAbsoluteNameForConnection(IHost connection)
getAbsoluteNameForConnection in interface ISystemRegistrypublic ISubSystem[] getSubSystemsLazily(IHost conn)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
public ISubSystem[] getSubSystems(String factoryId)
This is a list that of all subsystems for all connections owned by the factory.
getSubSystems in interface ISystemRegistry
public ISubSystem[] getServiceSubSystems(Class serviceType,
IHost connection)
getServiceSubSystems in interface ISystemRegistry
public ISubSystem[] getSubSystems(String factoryId,
IHost connection)
getSubSystems in interface ISystemRegistry
public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory,
IHost connection)
This looks for a match on the "category" of the subsystem factory's xml declaration in its plugin.xml file.
getSubSystemsBySubSystemConfigurationCategory in interface ISystemRegistryISubSystemConfigurationCategoriespublic ISubSystemConfiguration[] getSubSystemConfigurations()
ISystemRegistry
getSubSystemConfigurations in interface ISystemRegistryprotected Vector getSubSystemFactories(IHost conn)
protected Vector getSubSystemFactories(IHost conn,
Vector factories)
protected Vector getSubSystemFactories(IHost[] conns)
public boolean deleteSubSystem(ISubSystem subsystem)
deleteSubSystem in interface ISystemRegistrypublic IHost getLocalHost()
createLocalHost(ISystemProfile, String, String).
getLocalHost in interface ISystemRegistrypublic IHost[] getHosts()
getHosts in interface ISystemRegistrypublic IHost[] getHostsByProfile(ISystemProfile profile)
getHostsByProfile in interface ISystemRegistrypublic IHost[] getHostsByProfile(String profileName)
getHostsByProfile in interface ISystemRegistrypublic IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration factory)
getHostsBySubSystemConfiguration in interface ISystemRegistrygetSubSystemConfiguration(String)public IHost[] getHostsBySubSystemConfigurationId(String factoryId)
getHostsBySubSystemConfigurationId in interface ISystemRegistrypublic IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory)
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.
getHostsBySubSystemConfigurationCategory in interface ISystemRegistryISubSystemConfigurationCategoriespublic IHost[] getHostsBySystemType(String systemType)
getHostsBySystemType in interface ISystemRegistrypublic IHost[] getHostsBySystemTypes(String[] systemTypes)
getHostsBySystemTypes in interface ISystemRegistry
public IHost getHost(ISystemProfile profile,
String connectionName)
getHost in interface ISystemRegistrypublic int getHostPosition(IHost conn)
getHostPosition in interface ISystemRegistrypublic int getHostPositionInView(IHost conn)
public int getHostCount(String profileName)
getHostCount in interface ISystemRegistrypublic int getHostCountWithinProfile(IHost conn)
getHostCountWithinProfile in interface ISystemRegistrypublic int getHostCount()
getHostCount in interface ISystemRegistrypublic Vector getHostAliasNames(String profileName)
getHostAliasNames in interface ISystemRegistrypublic Vector getHostAliasNames(ISystemProfile profile)
getHostAliasNames in interface ISystemRegistrypublic Vector getHostAliasNamesForAllActiveProfiles()
getHostAliasNamesForAllActiveProfiles in interface ISystemRegistrypublic String[] getHostNames()
getHostNames in interface ISystemRegistrypublic String[] getHostNames(String systemType)
getHostNames in interface ISystemRegistrypublic Clipboard getSystemClipboard()
getSystemClipboard in interface ISystemRegistryUIpublic List getSystemClipboardObjects(int srcType)
ISystemRegistry
getSystemClipboardObjects in interface ISystemRegistrysrcType - the transfer type
public org.eclipse.rse.internal.model.SystemScratchpad getSystemScratchPad()
public IHost createLocalHost(ISystemProfile profile,
String name,
String userId)
createLocalHost in interface ISystemRegistryprofile - - 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.
public IHost createHost(String profileName,
String systemType,
String connectionName,
String hostName,
String description,
String defaultUserId,
int defaultUserIdLocation,
ISystemNewConnectionWizardPage[] newConnectionWizardPages)
throws Exception
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:
createHost in interface ISystemRegistryprofileName - 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 IdnewConnectionWizardPages - 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.
Exception
public IHost createHost(String profileName,
String systemType,
String connectionName,
String hostName,
String description)
throws Exception
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:
createHost in interface ISystemRegistryprofileName - 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.
Exception
public IHost createHost(String systemType,
String connectionName,
String hostName,
String description)
throws Exception
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:
createHost in interface ISystemRegistrysystemType - 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.
Exceptionprotected IHost getPreviousHost(IHost conn)
public void updateHost(Shell shell,
IHost conn,
String systemType,
String connectionName,
String hostName,
String description,
String defaultUserId,
int defaultUserIdLocation)
updateHost in interface ISystemRegistryUIconn - SystemConnection to be updatedsystemType - 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
public void setHostOffline(IHost conn,
boolean offline)
setHostOffline in interface ISystemRegistryconn - SystemConnection to changeoffline - true if connection should be set offline, false if it should be set onlinepublic void deleteHost(IHost conn)
Lots to do here:
deleteHost in interface ISystemRegistry
public void renameHost(IHost conn,
String newName)
throws Exception
Lots to do here:
renameHost in interface ISystemRegistryException
public void moveHosts(String profileName,
IHost[] conns,
int delta)
moveHosts in interface ISystemRegistryconns - Array of SystemConnections to move.
public IHost copyHost(IProgressMonitor monitor,
IHost conn,
ISystemProfile targetProfile,
String newName)
throws Exception
copyHost in interface ISystemRegistrymonitor - Progress monitor to reflect each step of the operationconn - The connection to copytargetProfile - What profile to copy intonewName - Unique name to give copied profile
Exception
public IHost moveHost(IProgressMonitor monitor,
IHost conn,
ISystemProfile targetProfile,
String newName)
throws Exception
moveHost in interface ISystemRegistrymonitor - Progress monitor to reflect each step of the operationconn - The connection to movetargetProfile - What profile to move intonewName - Unique name to give copied profile. Typically this is the same as the original name, but
will be different on name collisions
Exceptionpublic boolean isAnySubSystemSupportsConnect(IHost conn)
ISystemRegistry
isAnySubSystemSupportsConnect in interface ISystemRegistryconn - the connection.
true if any subsystem supports connecting, false otherwise.ISystemRegistry.isAnySubSystemSupportsConnect(org.eclipse.rse.core.model.IHost)public boolean isAnySubSystemConnected(IHost conn)
isAnySubSystemConnected in interface ISystemRegistrypublic boolean areAllSubSystemsConnected(IHost conn)
areAllSubSystemsConnected in interface ISystemRegistrypublic void disconnectAllSubSystems(IHost conn)
disconnectAllSubSystems in interface ISystemRegistry
public void connectedStatusChange(ISubSystem subsystem,
boolean connected,
boolean wasConnected)
connectedStatusChange in interface ISystemRegistry
public void connectedStatusChange(ISubSystem subsystem,
boolean connected,
boolean wasConnected,
boolean collapseTree)
connectedStatusChange in interface ISystemRegistrypublic void addSystemResourceChangeListener(ISystemResourceChangeListener l)
public void removeSystemResourceChangeListener(ISystemResourceChangeListener l)
public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
public void fireEvent(ISystemResourceChangeEvent event)
public void fireEvent(ISystemResourceChangeListener l,
ISystemResourceChangeEvent event)
public void postEvent(ISystemResourceChangeEvent event)
This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.
public void postEvent(ISystemResourceChangeListener listener,
ISystemResourceChangeEvent event)
This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.
public void addSystemModelChangeListener(ISystemModelChangeListener l)
public void removeSystemModelChangeListener(ISystemModelChangeListener l)
public void fireEvent(ISystemModelChangeEvent event)
public void fireModelChangeEvent(int eventType,
int resourceType,
Object resource,
String oldName)
public void fireEvent(ISystemModelChangeListener l,
ISystemModelChangeEvent event)
public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l)
public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
public void fireEvent(ISystemRemoteChangeEvent event)
public void fireRemoteResourceChangeEvent(int eventType,
Object resource,
Object resourceParent,
ISubSystem subsystem,
String oldName,
Viewer originatingViewer)
eventType - - one of the constants from ISystemRemoteChangeEventsresource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapterresourceParent - - 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 renameoriginatingViewer - - 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.protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
public List findFilterReferencesFor(Object resource,
ISubSystem subsystem)
ISystemRegistry
findFilterReferencesFor in interface ISystemRegistrypublic void invalidateFiltersFor(ISubSystem subsystem)
ISystemRegistry
invalidateFiltersFor in interface ISystemRegistrysubsystem -
public void invalidateFiltersFor(Object resourceParent,
ISubSystem subsystem)
ISystemRegistry
invalidateFiltersFor in interface ISystemRegistryresourceParent - subsystem -
public void fireEvent(ISystemRemoteChangeListener l,
ISystemRemoteChangeEvent event)
public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
public void fireEvent(ISystemPreferenceChangeEvent event)
public void fireEvent(ISystemPreferenceChangeListener l,
ISystemPreferenceChangeEvent event)
public void loadAll()
public Exception getLastException()
getLastException in interface ISystemRegistrypublic boolean save()
save in interface ISystemRegistrypublic boolean saveHostPool(ISystemHostPool pool)
saveHostPool in interface ISystemRegistrypublic boolean saveHost(IHost conn)
saveHost in interface ISystemRegistrypublic boolean restore()
restore in interface ISystemRegistrypublic boolean contains(ISchedulingRule rule)
contains in interface ISchedulingRulepublic boolean isConflicting(ISchedulingRule rule)
isConflicting in interface ISchedulingRulepublic ISystemFilterStartHere getSystemFilterStartHere()
getSystemFilterStartHere in interface ISystemRegistrypublic ISystemFilterPool getSystemFilterPool()
getSystemFilterPool in interface ISystemRegistry
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||