|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.model.impl.SystemRegistryImpl
Registry for all connections.
Field Summary | |
---|---|
static String |
copyright
|
Constructor Summary | |
---|---|
protected |
SystemRegistryImpl(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(SystemConnection 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(SubSystem subsystem,
boolean connected,
boolean wasConnected)
Inform the world when the connection status changes for a subsystem within a connection. |
void |
connectedStatusChange(SubSystem subsystem,
boolean connected,
boolean wasConnected,
boolean collapseTree)
Inform the world when the connection status changes for a subsystem within a connection. |
SystemConnection |
copyConnection(IProgressMonitor monitor,
SystemConnection conn,
SystemProfile targetProfile,
String newName)
Copy a SystemConnection. |
SystemProfile |
copySystemProfile(IProgressMonitor monitor,
SystemProfile profile,
String newName,
boolean makeActive)
Copy a SystemProfile. |
SystemConnection |
createConnection(String systemType,
String connectionName,
String hostName,
String description)
Create a connection object. |
SystemConnection |
createConnection(String profileName,
String systemType,
String connectionName,
String hostName,
String description)
Create a connection object. |
SystemConnection |
createConnection(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. |
SystemConnection |
createLocalConnection(SystemProfile 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. |
SystemProfile |
createSystemProfile(String profileName,
boolean makeActive)
Create a SystemProfile given its name and whether or not to make it active |
void |
deleteConnection(SystemConnection conn)
Delete an existing connection. |
boolean |
deleteSubSystem(SubSystem subsystem)
Delete a subsystem object. |
void |
deleteSystemProfile(SystemProfile profile)
Delete a SystemProfile. |
void |
disconnectAllSubSystems(SystemConnection conn)
Disconnect all subsystems for the given connection, if they are currently connected. |
void |
expandConnection(SystemConnection conn)
Expand the given connection in the RSE, if the RSE is the active perspective. |
void |
expandSubSystem(SubSystem subsystem)
Expand the given subsystem in the RSE, if the RSE is the active perspective. |
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,
SubSystem subsystem,
String oldName,
Viewer originatingViewer)
Notify all listeners of a change to a remote resource such as a file. |
String |
getAbsoluteNameForConnection(SystemConnection connection)
Return the absolute name for the specified connection |
String |
getAbsoluteNameForSubSystem(SubSystem subSystem)
Return the absolute name for the specified subsystem |
String[] |
getActiveSystemProfileNames()
Return the profile names currently selected by the user as his "active" profiles |
SystemProfile[] |
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 |
SystemProfile[] |
getAllSystemProfiles()
Return all defined profiles |
RemoteCmdSubSystem |
getCmdSubSystem(SystemConnection connection)
Return the first command subsystem for the given connection. |
RemoteCmdSubSystemFactory |
getCmdSubSystemFactory(String systemType)
Return the RemoteCmdSubSystemFactory for the given system type. |
RemoteCmdSubSystem[] |
getCmdSubSystems(SystemConnection connection)
Return the command subsystems for the given connection. |
SystemConnection |
getConnection(SystemProfile profile,
String connectionName)
Return a SystemConnection object given a system profile containing it, and an connection name uniquely identifying it. |
Object[] |
getConnectionChildren(SystemConnection selectedConnection)
This method is called by the connection adapter when the user expands a connection. |
int |
getConnectionCount()
Return the number of SystemConnection objects within all active profiles |
int |
getConnectionCount(String profileName)
Return the number of SystemConnection objects within the given profile |
int |
getConnectionCountWithinProfile(SystemConnection conn)
Return the number of SystemConnection objects within the given connection's owning profile |
Vector |
getConnectionNames(String profileName)
Return a vector of previously-used connection names in the given named profile. |
Vector |
getConnectionNames(SystemProfile profile)
Return a vector of previously-used connection names in the given profile. |
Vector |
getConnectionNamesForAllActiveProfiles()
Return a vector of previously-used connection names in all active profiles. |
int |
getConnectionPosition(SystemConnection conn)
Return the zero-based position of a SystemConnection object within its profile. |
int |
getConnectionPositionInView(SystemConnection conn)
Return the zero-based position of a SystemConnection object within all active profiles. |
SystemConnection[] |
getConnections()
Return all connections in all active profiles. |
SystemConnection[] |
getConnectionsByProfile(String profileName)
Return all connections in a given profile name. |
SystemConnection[] |
getConnectionsByProfile(SystemProfile profile)
Return all connections in a given profile. |
SystemConnection[] |
getConnectionsBySubSystemFactory(SubSystemFactory factory)
Return all connections for which there exists one or more subsystems owned by a given subsystem factory. |
SystemConnection[] |
getConnectionsBySubSystemFactoryCategory(String factoryCategory)
Return all connections for which there exists one or more subsystems owned by any child classes of a given subsystem factory category. |
SystemConnection[] |
getConnectionsBySubSystemFactoryId(String factoryId)
Return all connections for which there exists one or more subsystems owned by a given subsystem factory, identified by factory Id |
SystemConnection[] |
getConnectionsBySystemType(String systemType)
Return all connections for all active profiles, for the given system type. |
SystemConnection[] |
getConnectionsBySystemTypes(String[] systemTypes)
Return all connections for all active profiles, for the given system types. |
RemoteFileSubSystem |
getFileSubSystem(SystemConnection connection)
Return the first file subsystem for the given connection. |
RemoteFileSubSystemFactory |
getFileSubSystemFactory(String systemType)
Return the RemoteFileSubSystemFactory for the given system type. |
String |
getFileSubSystemFactoryId(String systemType)
Return the Id of the RemoteFileSubSystemFactory for the given system type. |
RemoteFileSubSystem[] |
getFileSubSystems(SystemConnection connection)
Return the file subsystems for the given connection. |
String[] |
getHostNames()
Return array of all previously specified hostnames. |
String[] |
getHostNames(String systemType)
Return array of previously specified hostnames for a given system type. |
Exception |
getLastException()
Return last exception object caught in any method, or null if no exception. |
SystemConnection |
getLocalConnection()
Return the first connection to localhost we can find. |
protected SystemConnection |
getPreviousConnection(SystemConnection conn)
Return the previous connection as would be shown in the view |
boolean |
getQualifyConnectionNames()
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. |
Shell |
getShell()
Return the shell of the current viewer |
SubSystem |
getSubSystem(String absoluteSubSystemName)
Resolve a subsystem from it's absolute name. |
SubSystem |
getSubSystem(String srcProfileName,
String srcConnectionName,
String subsystemFactoryId)
Resolve a subsystem from it's profile, connection and subsystem name. |
SubSystemFactory[] |
getSubSystemFactories()
Return all subsystem factories. |
protected Vector |
getSubSystemFactories(SystemConnection conn)
Return Vector of subsystem factories that apply to a given system connection |
protected Vector |
getSubSystemFactories(SystemConnection[] conns)
Return Vector of subsystem factories that apply to a given system connection array |
protected Vector |
getSubSystemFactories(SystemConnection conn,
Vector factories)
Return Vector of subsystem factories that apply to a given system connection, updating given vector |
SubSystemFactory[] |
getSubSystemFactoriesByCategory(String factoryCategory)
Return all subsystem factories which have declared themselves part of the given category. |
SubSystemFactory[] |
getSubSystemFactoriesBySystemType(String systemType)
Return all subsystem factories which support the given system type. |
SubSystemFactory |
getSubSystemFactory(String id)
Return the subsystemfactory, given its plugin.xml-declared id. |
SubSystemFactory |
getSubSystemFactory(SubSystem subsystem)
Return the parent subsystemfactory given a subsystem object. |
ISubSystemFactoryProxy[] |
getSubSystemFactoryProxies()
Public method to retrieve list of subsystem factory proxies registered by extension points. |
ISubSystemFactoryProxy[] |
getSubSystemFactoryProxiesByCategory(String factoryCategory)
Return all subsystem factory proxies matching a subsystem factory category. |
SubSystem[] |
getSubSystems(String factoryId)
Get a list of subsystem objects owned by the subsystem factory identified by its given plugin.xml-described id. |
SubSystem[] |
getSubSystems(String factoryId,
SystemConnection connection)
Get a list of subsystem objects for given connection, owned by the subsystem factory identified by its given plugin.xml-described id. |
SubSystem[] |
getSubSystems(SystemConnection conn)
Return list of subsystem objects for a given connection. |
SubSystem[] |
getSubSystems(SystemConnection conn,
boolean force)
Return list of subsystem objects for a given connection. |
SubSystem[] |
getSubSystemsBySubSystemFactoryCategory(String factoryCategory,
SystemConnection connection)
Get a list of subsystem objects for given connection, owned by a subsystem factory that is of the given category. |
SubSystem[] |
getSubSystemsLazily(SystemConnection 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 |
SystemProfile |
getSystemProfile(String profileName)
Get a SystemProfile given its name |
SystemProfileManager |
getSystemProfileManager()
Return singleton profile manager |
static SystemRegistry |
getSystemRegistry()
Return singleton instance assuming it already exists. |
static SystemRegistry |
getSystemRegistry(String logfilePath)
Return singleton instance. |
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(SystemConnection 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. |
static ModelFactory |
initMOF()
Initialize the MOF package. |
boolean |
isAnySubSystemConnected(SystemConnection conn)
Return true if any of the subsystems for the given connection are currently connected |
boolean |
isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events |
void |
loadAll()
Load everything into memory. |
SystemConnection |
moveConnection(IProgressMonitor monitor,
SystemConnection conn,
SystemProfile targetProfile,
String newName)
Move a SystemConnection to another profile. |
void |
moveConnections(String profileName,
SystemConnection[] 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 |
renameConnection(SystemConnection conn,
String newName)
Renames an existing connection. |
void |
renameSystemProfile(SystemProfile 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 |
saveConnection(SystemConnection conn)
Save specific connection |
boolean |
saveConnectionPool(SystemConnectionPool pool)
Save specific connection pool |
void |
setConnectionOffline(SystemConnection conn,
boolean offline)
Update the workoffline attribute for a connection. |
void |
setQualifyConnectionNames(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 |
setShowNewConnectionPrompt(boolean show)
Reflect the user changing the preference for showing new connection prompt |
void |
setSubSystemFactoryProxies(ISubSystemFactoryProxy[] proxies)
Private method used by SystemPlugin to tell registry all registered subsystem factories. |
void |
setSystemProfileActive(SystemProfile 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 |
updateConnection(Shell shell,
SystemConnection 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 |
Field Detail |
public static final String copyright
Constructor Detail |
protected SystemRegistryImpl(String logfilePath)
logfilePath
- Root folder. Where to place the log file.Method Detail |
public void reset()
public static SystemRegistry getSystemRegistry(String logfilePath)
logfilePath
- Root folder. Where to place the log file.public static SystemRegistry getSystemRegistry()
public static String addPathTerminator(String path)
public void showRSEPerspective()
showRSEPerspective
in interface SystemRegistry
public void expandConnection(SystemConnection conn)
expandConnection
in interface SystemRegistry
public void expandSubSystem(SubSystem subsystem)
expandSubSystem
in interface SystemRegistry
public Object[] getSystemViewRoots()
getSystemViewRoots
in interface ISystemViewInputProvider
public boolean hasSystemViewRoots()
getSystemViewRoots()
will return a non-empty list
We return true if there are any connections for any active profile.
hasSystemViewRoots
in interface ISystemViewInputProvider
public Object[] getConnectionChildren(SystemConnection selectedConnection)
getConnectionChildren
in interface ISystemViewInputProvider
public boolean hasConnectionChildren(SystemConnection selectedConnection)
hasConnectionChildren
in interface ISystemViewInputProvider
public Object getAdapter(Class adapterType)
getAdapter
in interface ISystemViewInputProvider
public void setShell(Shell shell)
setShell
in interface ISystemViewInputProvider
public Shell getShell()
getShell
in interface ISystemViewInputProvider
public boolean showActionBar()
showActionBar
in interface ISystemViewInputProvider
public boolean showButtonBar()
showButtonBar
in interface ISystemViewInputProvider
public boolean showActions()
showActions
in interface ISystemViewInputProvider
public void setViewer(Viewer viewer)
setViewer
in interface ISystemViewInputProvider
public Viewer getViewer()
getViewer
in interface ISystemViewInputProvider
public boolean showingConnections()
showingConnections
in interface ISystemViewInputProvider
public void setRunnableContext(Shell shell, IRunnableContext context)
You must call clearRunnableContext when your dialog/wizard is disposed!
setRunnableContext
in interface SystemRegistry
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()
clearRunnableContext
in interface SystemRegistry
public IRunnableContext getRunnableContext()
getRunnableContext
in interface SystemRegistry
public void setSubSystemFactoryProxies(ISubSystemFactoryProxy[] proxies)
setSubSystemFactoryProxies
in interface SystemRegistry
public ISubSystemFactoryProxy[] getSubSystemFactoryProxies()
getSubSystemFactoryProxies
in interface SystemRegistry
public ISubSystemFactoryProxy[] getSubSystemFactoryProxiesByCategory(String factoryCategory)
getSubSystemFactoryProxiesByCategory
in interface SystemRegistry
ISubSystemFactoryCategories
public SubSystemFactory getSubSystemFactory(SubSystem subsystem)
getSubSystemFactory
in interface SystemRegistry
public SubSystemFactory getSubSystemFactory(String id)
getSubSystemFactory
in interface SystemRegistry
public String getFileSubSystemFactoryId(String systemType)
getFileSubSystemFactoryId
in interface SystemRegistry
public RemoteFileSubSystemFactory getFileSubSystemFactory(String systemType)
getFileSubSystemFactory
in interface SystemRegistry
public RemoteCmdSubSystemFactory getCmdSubSystemFactory(String systemType)
getCmdSubSystemFactory
in interface SystemRegistry
public SubSystemFactory[] getSubSystemFactoriesByCategory(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.
getSubSystemFactoriesByCategory
in interface SystemRegistry
ISubSystemFactoryCategories
public SubSystemFactory[] getSubSystemFactoriesBySystemType(String systemType)
getSubSystemFactoriesBySystemType
in interface SystemRegistry
public boolean getQualifyConnectionNames()
getQualifyConnectionNames
in interface SystemRegistry
public void setQualifyConnectionNames(boolean set)
setQualifyConnectionNames
in interface SystemRegistry
public void setShowFilterPools(boolean show)
setShowFilterPools
in interface SystemRegistry
public void setShowNewConnectionPrompt(boolean show)
setShowNewConnectionPrompt
in interface SystemRegistry
public SystemProfileManager getSystemProfileManager()
getSystemProfileManager
in interface SystemRegistry
public SystemProfile[] getActiveSystemProfiles()
getActiveSystemProfiles
in interface SystemRegistry
public String[] getActiveSystemProfileNames()
getActiveSystemProfileNames
in interface SystemRegistry
public SystemProfile[] getAllSystemProfiles()
getAllSystemProfiles
in interface SystemRegistry
public String[] getAllSystemProfileNames()
getAllSystemProfileNames
in interface SystemRegistry
public Vector getAllSystemProfileNamesVector()
getAllSystemProfileNamesVector
in interface SystemRegistry
public SystemProfile getSystemProfile(String profileName)
getSystemProfile
in interface SystemRegistry
public SystemProfile createSystemProfile(String profileName, boolean makeActive) throws Exception
createSystemProfile
in interface SystemRegistry
Exception
public void renameSystemProfile(SystemProfile profile, String newName) throws Exception
renameSystemProfile
in interface SystemRegistry
Exception
public SystemProfile copySystemProfile(IProgressMonitor monitor, SystemProfile profile, String newName, boolean makeActive) throws Exception
copySystemProfile
in interface SystemRegistry
monitor
- 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(SystemProfile 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 SystemRegistry
Exception
public void setSystemProfileActive(SystemProfile profile, boolean makeActive)
setSystemProfileActive
in interface SystemRegistry
public SubSystem[] getSubSystems(SystemConnection conn)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
getSubSystems
in interface SystemRegistry
public SubSystem[] getSubSystems(SystemConnection conn, boolean force)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
getSubSystems
in interface SystemRegistry
public SubSystem getSubSystem(String absoluteSubSystemName)
getSubSystem
in interface SystemRegistry
absoluteSubSystemName
- the name of the subsystem
public SubSystem getSubSystem(String srcProfileName, String srcConnectionName, String subsystemFactoryId)
getSubSystem
in interface SystemRegistry
srcProfileName
- the name of the profilesrcConnectionName
- the name of the connectionsubsystemFactoryId
- the factory Id of the subsystem
public String getAbsoluteNameForSubSystem(SubSystem subSystem)
getAbsoluteNameForSubSystem
in interface SystemRegistry
public String getAbsoluteNameForConnection(SystemConnection connection)
getAbsoluteNameForConnection
in interface SystemRegistry
public SubSystem[] getSubSystemsLazily(SystemConnection conn)
To protect against crashes, if there are no subsystems, an array of length zero is returned.
public SubSystem[] getSubSystems(String factoryId)
This is a list that of all subsystems for all connections owned by the factory.
getSubSystems
in interface SystemRegistry
public SubSystem[] getSubSystems(String factoryId, SystemConnection connection)
getSubSystems
in interface SystemRegistry
public SubSystem[] getSubSystemsBySubSystemFactoryCategory(String factoryCategory, SystemConnection connection)
This looks for a match on the "category" of the subsystem factory's xml declaration in its plugin.xml file.
getSubSystemsBySubSystemFactoryCategory
in interface SystemRegistry
ISubSystemFactoryCategories
public RemoteFileSubSystem[] getFileSubSystems(SystemConnection connection)
getFileSubSystems
in interface SystemRegistry
RemoteFileSubSystem
public RemoteFileSubSystem getFileSubSystem(SystemConnection connection)
getFileSubSystem
in interface SystemRegistry
RemoteFileSubSystem
public RemoteCmdSubSystem[] getCmdSubSystems(SystemConnection connection)
getCmdSubSystems
in interface SystemRegistry
RemoteCmdSubSystem
public RemoteCmdSubSystem getCmdSubSystem(SystemConnection connection)
getCmdSubSystem
in interface SystemRegistry
RemoteCmdSubSystem
public SubSystemFactory[] getSubSystemFactories()
getSubSystemFactories
in interface SystemRegistry
protected Vector getSubSystemFactories(SystemConnection conn)
protected Vector getSubSystemFactories(SystemConnection conn, Vector factories)
protected Vector getSubSystemFactories(SystemConnection[] conns)
public boolean deleteSubSystem(SubSystem subsystem)
deleteSubSystem
in interface SystemRegistry
public SystemConnection getLocalConnection()
createLocalConnection(SystemProfile, String, String)
.
getLocalConnection
in interface SystemRegistry
public SystemConnection[] getConnections()
getConnections
in interface SystemRegistry
public SystemConnection[] getConnectionsByProfile(SystemProfile profile)
getConnectionsByProfile
in interface SystemRegistry
public SystemConnection[] getConnectionsByProfile(String profileName)
getConnectionsByProfile
in interface SystemRegistry
public SystemConnection[] getConnectionsBySubSystemFactory(SubSystemFactory factory)
getConnectionsBySubSystemFactory
in interface SystemRegistry
getSubSystemFactory(String)
public SystemConnection[] getConnectionsBySubSystemFactoryId(String factoryId)
getConnectionsBySubSystemFactoryId
in interface SystemRegistry
public SystemConnection[] getConnectionsBySubSystemFactoryCategory(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.
getConnectionsBySubSystemFactoryCategory
in interface SystemRegistry
ISubSystemFactoryCategories
public SystemConnection[] getConnectionsBySystemType(String systemType)
getConnectionsBySystemType
in interface SystemRegistry
public SystemConnection[] getConnectionsBySystemTypes(String[] systemTypes)
getConnectionsBySystemTypes
in interface SystemRegistry
public SystemConnection getConnection(SystemProfile profile, String connectionName)
getConnection
in interface SystemRegistry
public int getConnectionPosition(SystemConnection conn)
getConnectionPosition
in interface SystemRegistry
public int getConnectionPositionInView(SystemConnection conn)
public int getConnectionCount(String profileName)
getConnectionCount
in interface SystemRegistry
public int getConnectionCountWithinProfile(SystemConnection conn)
getConnectionCountWithinProfile
in interface SystemRegistry
public int getConnectionCount()
getConnectionCount
in interface SystemRegistry
public Vector getConnectionNames(String profileName)
getConnectionNames
in interface SystemRegistry
public Vector getConnectionNames(SystemProfile profile)
getConnectionNames
in interface SystemRegistry
public Vector getConnectionNamesForAllActiveProfiles()
getConnectionNamesForAllActiveProfiles
in interface SystemRegistry
public String[] getHostNames()
getHostNames
in interface SystemRegistry
public String[] getHostNames(String systemType)
getHostNames
in interface SystemRegistry
public Clipboard getSystemClipboard()
getSystemClipboard
in interface SystemRegistry
public List getSystemClipboardObjects(int srcType)
getSystemClipboardObjects
in interface SystemRegistry
srcType
- the transfer type
public SystemScratchpad getSystemScratchPad()
getSystemScratchPad
in interface SystemRegistry
public SystemConnection createLocalConnection(SystemProfile profile, String name, String userId)
createLocalConnection
in interface SystemRegistry
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.public SystemConnection createConnection(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:
createConnection
in interface SystemRegistry
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
systemtype 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 SystemConnection createConnection(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:
createConnection
in interface SystemRegistry
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
systemtype extension point.connectionName
- unique connection name.hostName
- ip name of host.description
- optional description of the connection. Can be null.
Exception
public SystemConnection createConnection(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:
createConnection
in interface SystemRegistry
systemType
- system type matching one of the system type names defined via the
systemtype extension point.connectionName
- unique connection name.hostName
- ip name of host.description
- optional description of the connection. Can be null.
Exception
protected SystemConnection getPreviousConnection(SystemConnection conn)
public void updateConnection(Shell shell, SystemConnection conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
updateConnection
in interface SystemRegistry
conn
- SystemConnection to be updatedsystemType
- system type matching one of the system type names defined via the
systemtype 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 Idpublic void setConnectionOffline(SystemConnection conn, boolean offline)
setConnectionOffline
in interface SystemRegistry
conn
- SystemConnection to changeoffline
- true if connection should be set offline, false if it should be set onlinepublic void deleteConnection(SystemConnection conn)
Lots to do here:
deleteConnection
in interface SystemRegistry
public void renameConnection(SystemConnection conn, String newName) throws Exception
Lots to do here:
renameConnection
in interface SystemRegistry
Exception
public void moveConnections(String profileName, SystemConnection[] conns, int delta)
moveConnections
in interface SystemRegistry
conns
- Array of SystemConnections to move.public SystemConnection copyConnection(IProgressMonitor monitor, SystemConnection conn, SystemProfile targetProfile, String newName) throws Exception
copyConnection
in interface SystemRegistry
monitor
- 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 SystemConnection moveConnection(IProgressMonitor monitor, SystemConnection conn, SystemProfile targetProfile, String newName) throws Exception
moveConnection
in interface SystemRegistry
monitor
- 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
Exception
public boolean isAnySubSystemConnected(SystemConnection conn)
isAnySubSystemConnected
in interface SystemRegistry
public boolean areAllSubSystemsConnected(SystemConnection conn)
areAllSubSystemsConnected
in interface SystemRegistry
public void disconnectAllSubSystems(SystemConnection conn)
disconnectAllSubSystems
in interface SystemRegistry
public void connectedStatusChange(SubSystem subsystem, boolean connected, boolean wasConnected)
connectedStatusChange
in interface SystemRegistry
public void connectedStatusChange(SubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree)
connectedStatusChange
in interface SystemRegistry
public void addSystemResourceChangeListener(ISystemResourceChangeListener l)
addSystemResourceChangeListener
in interface SystemRegistry
public void removeSystemResourceChangeListener(ISystemResourceChangeListener l)
removeSystemResourceChangeListener
in interface SystemRegistry
public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
isRegisteredSystemResourceChangeListener
in interface SystemRegistry
public void fireEvent(ISystemResourceChangeEvent event)
fireEvent
in interface SystemRegistry
public void fireEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event)
fireEvent
in interface SystemRegistry
public void postEvent(ISystemResourceChangeEvent event)
This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.
postEvent
in interface SystemRegistry
public void postEvent(ISystemResourceChangeListener listener, ISystemResourceChangeEvent event)
This version calls fireEvent at the next reasonable opportunity, leveraging SWT's Display.asyncExec() method.
postEvent
in interface SystemRegistry
public void addSystemModelChangeListener(ISystemModelChangeListener l)
addSystemModelChangeListener
in interface SystemRegistry
public void removeSystemModelChangeListener(ISystemModelChangeListener l)
removeSystemModelChangeListener
in interface SystemRegistry
public void fireEvent(ISystemModelChangeEvent event)
fireEvent
in interface SystemRegistry
public void fireModelChangeEvent(int eventType, int resourceType, Object resource, String oldName)
fireModelChangeEvent
in interface SystemRegistry
public void fireEvent(ISystemModelChangeListener l, ISystemModelChangeEvent event)
fireEvent
in interface SystemRegistry
public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l)
addSystemRemoteChangeListener
in interface SystemRegistry
public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
removeSystemRemoteChangeListener
in interface SystemRegistry
public void fireEvent(ISystemRemoteChangeEvent event)
fireEvent
in interface SystemRegistry
public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, SubSystem subsystem, String oldName, Viewer originatingViewer)
fireRemoteResourceChangeEvent
in interface SystemRegistry
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 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 void fireEvent(ISystemRemoteChangeListener l, ISystemRemoteChangeEvent event)
fireEvent
in interface SystemRegistry
public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
addSystemPreferenceChangeListener
in interface SystemRegistry
public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
removeSystemPreferenceChangeListener
in interface SystemRegistry
public void fireEvent(ISystemPreferenceChangeEvent event)
fireEvent
in interface SystemRegistry
public void fireEvent(ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event)
fireEvent
in interface SystemRegistry
public void loadAll()
public Exception getLastException()
getLastException
in interface SystemRegistry
public boolean save()
save
in interface SystemRegistry
public boolean saveConnectionPool(SystemConnectionPool pool)
saveConnectionPool
in interface SystemRegistry
public boolean saveConnection(SystemConnection conn)
saveConnection
in interface SystemRegistry
public boolean restore()
restore
in interface SystemRegistry
public static ModelFactory initMOF()
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |