|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISubSystem
Interface implemented by SubSystem objects. While connections contain information to identify a particular remote system, it is the subsystem objects within a connection that contain information unique to a particular tool for that remote system, such as the port the tool uses and the user ID for making the connection. There are a set of default properties, but these can be extended by subsystem providers, by extending SubSystem.
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
Method Summary | |
---|---|
boolean |
canSwitchTo(ISubSystemConfiguration configuration)
Determine is this subsystem is compatible with this specified configuration. |
void |
checkIsConnected(IProgressMonitor monitor)
Check if the subsystem is connected, and connect if it's not. |
void |
clearLocalUserId()
Called to clear the local user Id such that subsequent requests to getUserId() will return the parent connection's default user Id. |
void |
connect(boolean forcePrompt,
IRSECallback callback)
Asynchronously connect to the remote system, optionally forcing a signon prompt even if the password is cached in memory or on disk. |
void |
connect(IProgressMonitor monitor,
boolean forcePrompt)
Synchronously connect to the remote system. |
void |
deletingConnection()
Private method called when the parent connection is being deleted, so the subsystem can do any pre-death cleanup it needs to. |
void |
disconnect()
Disconnect from the remote system. |
void |
disconnect(boolean collapseTree)
Disconnect from the remote system. |
boolean |
doesFilterListContentsOf(ISystemFilter filter,
String remoteObjectAbsoluteName)
Return true if the given filter lists the contents of the given remote object. |
boolean |
doesFilterMatch(ISystemFilter filter,
String remoteObjectAbsoluteName)
Return true if the given remote object name will pass the filtering criteria for any of the filter strings in this filter. |
boolean |
doesFilterStringListContentsOf(ISystemFilterString filterString,
String remoteObjectAbsoluteName)
Return true if the given filter string lists the contents of the given remote object. |
boolean |
doesFilterStringMatch(String filterString,
String remoteObjectAbsoluteName,
boolean caseSensitive)
Return true if the given remote object name will pass the filtering criteria for the given filter string in this filter. |
boolean |
forceUserIdToUpperCase()
Return true if userId and password should be forced to uppercase. |
ICacheManager |
getCacheManager()
Return the CacheManager for this subsystem. |
Object[] |
getChildren()
Return the children for this subsystem. |
String |
getConfigurationId()
|
IConnectorService |
getConnectorService()
Return the IConnectorService object that represents the live connection for this system. |
ISystemFilterPoolReferenceManager |
getFilterPoolReferenceManager()
Generated persistent property method Return the object that manages the list of filter pools referenced by this subsystem. |
IHost |
getHost()
Return the connection object this subsystem is associated with. |
String |
getHostAliasName()
|
String |
getLocalUserId()
Alternative to getUserId when we don't want to resolve it from parent connection. |
String |
getName()
|
ISubSystem |
getPrimarySubSystem()
Return the primary subsystem associated with this subsystem's IConnectorService |
String[] |
getProperties(Object subject,
String[] keys)
Deprecated. this shouldn't be used |
String |
getProperty(Object subject,
String key)
Deprecated. this shouldn't be used |
Class |
getServiceType()
Returns the interface type (i.e. a Class object that is an Interface) of a service subsystem. |
ISubSystemConfiguration |
getSubSystemConfiguration()
Return the parent subsystem factory that owns this subsystem. |
ISystemFilterPoolReferenceManager |
getSystemFilterPoolReferenceManager()
Return the system filter pool reference manager, as per the interface SystemFilterPoolReferenceManagerProvider |
ISystemProfile |
getSystemProfile()
Return the system profile object this subsystem is associated with. |
String |
getSystemProfileName()
|
Object |
getTargetForFilter(ISystemFilterReference filterRef)
Returns the parent object associated with a filter reference. |
String |
getUserId()
Returns the value of this subsystem's user id if it is not null. |
String |
getVendorAttribute(String vendorName,
String attributeName)
Deprecated. Subsystems can now take named property sets. These should be used instead. See IPropertySet |
boolean |
hasChildren()
Return true if this subsystem has children objects to be displayed in the Remote System View explorer. |
void |
initializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it connects successfully. |
boolean |
isConnected()
Return true if this subsystem is currently connected to its remote system. |
boolean |
isConnectionError()
Return true if the last attempt to connect this subsystem to its remote system failed. |
boolean |
isHidden()
Generated persistent property method Return true if this subsystem is to be hidden so it doesn't show in the Remote Systems view when a connection is expanded. |
boolean |
isOffline()
Return true if this subsystem is currently being used in "offline" mode. |
boolean |
isPrimarySubSystem()
|
void |
renamingConnection(String newName)
Private method called when the parent connection is being renamed, so the subsystem can do any cleanup it needs to. |
void |
renamingProfile(String oldName,
String newName)
Private method called when the parent profile is being renamed, so the subsystem can do any cleanup it needs to. |
Object[] |
resolveFilterString(Object parent,
String filterString,
IProgressMonitor monitor)
Resolve a relative filter string. |
Object[] |
resolveFilterString(String filterString,
IProgressMonitor monitor)
Resolve an absolute filter string. |
Object[] |
resolveFilterStrings(String[] filterStrings,
IProgressMonitor monitor)
Resolve multiple absolute filter strings. |
void |
setConfigurationId(String value)
|
void |
setConnectionError(boolean error)
Sets whether the last attempt to connect this subsystem to its remote system failed. |
void |
setConnectorService(IConnectorService connectorService)
Set the connector service for this subsystem |
void |
setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager value)
Generated persistent property method Set the object that manages the list of filter pools referenced by this subsystem. |
void |
setHidden(boolean value)
Generated persistent property method Specify true if this subsystem is to be hidden so it doesn't show in the Remote Systems view when a connection is expanded. |
void |
setHost(IHost conn)
Set the parent connection that owns this subsystem. |
void |
setName(String value)
|
Object |
setProperties(Object subject,
String[] keys,
String[] values)
Deprecated. this shouldn't be used |
Object |
setProperty(Object subject,
String key,
String value)
Deprecated. this shouldn't be used |
void |
setSubSystemConfiguration(ISubSystemConfiguration ssf)
Set the parent subsystem factory that owns this subsystem. |
void |
setVendorAttribute(String vendorName,
String attributeName,
String attributeValue)
Deprecated. Subsystems can now take named property sets. These should be used instead. See IPropertySet |
boolean |
supportsCaching()
Check if the SubSystem supports caching. |
void |
switchServiceFactory(ISubSystemConfiguration configuration)
Requests a service subsystem to switch to a new configuration. |
void |
uninitializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it disconnects |
Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
---|
getObjectWithAbsoluteName, getObjectWithAbsoluteName |
Methods inherited from interface org.eclipse.core.runtime.jobs.ISchedulingRule |
---|
contains, isConflicting |
Methods inherited from interface org.eclipse.rse.core.model.IRSEModelObject |
---|
getDescription |
Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
Method Detail |
---|
ISubSystemConfiguration getSubSystemConfiguration()
void setSubSystemConfiguration(ISubSystemConfiguration ssf)
void setHost(IHost conn)
void setConnectorService(IConnectorService connectorService)
connectorService
- connector service object to setISystemProfile getSystemProfile()
getName()
IHost getHost()
void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
IConnectorService
after it connects successfully. This call is
always made on a background Thread, so it's allowed to be long-running.
monitor
- a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.
SystemMessageException
- if an error occurs during initialization.void uninitializeSubSystem(IProgressMonitor monitor)
IConnectorService
after it disconnects
monitor
- a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.boolean isPrimarySubSystem()
IConnectorService
ISubSystem getPrimarySubSystem()
String getHostAliasName()
String getSystemProfileName()
void renamingProfile(String oldName, String newName)
void renamingConnection(String newName)
void deletingConnection()
void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
connect()
method
as appropriate. It also performs some exception parsing, converting
Exceptions from connect() into SystemMessageException that can be
displayed to the user by using a method in it.
If the subsystem is marked offline, or supports caching and is currently
restoring from its memento, no connect will be performed.
SystemMessageException
- in case of an error connectingvoid setVendorAttribute(String vendorName, String attributeName, String attributeValue)
IPropertySet
String getVendorAttribute(String vendorName, String attributeName)
IPropertySet
boolean forceUserIdToUpperCase()
String getLocalUserId()
Unlike getUserId() this one does not defer to the connection's default user Id if the subsystem's userId attribute is null.
To set the local user Id, simply call setUserId(String id). To clear it, call
clearLocalUserId()
.
IHost.getDefaultUserId()
,
clearLocalUserId()
,
getUserId()
void clearLocalUserId()
IHost.getDefaultUserId()
,
getUserId()
,
getLocalUserId()
Object[] getChildren()
By default, if the parent subsystem factory supports filters, then we return getSystemFilterPoolReferencesArray. If filters are not supported (supportsFilters() returns false from factory) then we return null. In this case you should override this.
boolean hasChildren()
boolean doesFilterListContentsOf(ISystemFilter filter, String remoteObjectAbsoluteName)
The default algorithm calls doesFilterStringListContentsOf for each filter string.
boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName)
boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName)
boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive)
ISystemFilterPoolReferenceManager getSystemFilterPoolReferenceManager()
getSystemFilterPoolReferenceManager
in interface ISystemFilterPoolReferenceManagerProvider
String getName()
getName
in interface IRSEModelObject
void setName(String value)
value
- The new value of the Name attributeString getUserId()
In fact, we now don't store the user Id in the subsystem object itself, but rather store it in the user preferences, so that such things are not shared among the team on a synchronize operation. This is transparent to callers of this method however, as this method resolves from the preferences.
IHost.getDefaultUserId()
,
getLocalUserId()
,
clearLocalUserId()
String getConfigurationId()
void setConfigurationId(String value)
value
- The new value of the ConfigurationId attributeIConnectorService getConnectorService()
boolean supportsCaching()
ICacheManager getCacheManager()
supportsCaching()
boolean isConnected()
boolean isConnectionError()
void setConnectionError(boolean error)
boolean isOffline()
void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception
monitor
- the progress monitor. Must not be null
.forcePrompt
- forces the prompt dialog to be displayed
even if the password is currently in memory.
Exception
- an exception if there is a failure to connect.
Typically, this will be a SystemMessageException
.
An OperationCanceledException
will be thrown if the user cancels the connect.void connect(boolean forcePrompt, IRSECallback callback) throws Exception
getConnectorService().connect(IProgressMonitor)
.
forcePrompt
- forces the prompt dialog even if the password is in memcallback
- to call after connect is complete.
May be null
.
Exception
- an exception if there is a failure to connect.
Typically, this will be a SystemMessageException
.
An OperationCanceledException
will be thrown if the user cancels the connect.void disconnect() throws Exception
Exception
void disconnect(boolean collapseTree) throws Exception
Exception
Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
When a user expands a filter containing filter strings, this method is invoked for each filter string.
The resulting objects are displayed in the remote system view tree. They can be anything, but at a minimum must support IAdaptable in order to drive the property sheet. You can just defer the getAdapter request to the platform's Adapter manager if desired.
You should supply an adapter class for the returned object's class, to render objects in the Remote System Explorer view. It will uses a label and content provider that defers all requests to the adapter, which it gets by querying the platform's adapter manager for the object type. Be sure to register your adapter factory.
filterString
- filter pattern for objects to return.monitor
- the process monitor associated with this operation
Exception
Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor) throws Exception
This is the same as resolveFilterString(String, IProgressMonitor)
but takes an array of
filter strings versus a single filter string.
filterStrings
- array of filter patterns for objects to return.monitor
- the process monitor associated with this operation
Exception
Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor) throws Exception
When a user expands an object that came from a previous filter string expansion, (such as expanding a folder), this method is invoked to get the children of that object. The user can choose to expand all, or choose a pre-defined relative filter string to subset/filter the children. In either case, the relative filter string is passed in as well as the to-be-expanded parent object.
The resulting objects are displayed in the remote system view tree. They can be anything, but at a minimum must support IAdaptable in order to drive the property sheet. You can just defer the getAdapter request to the platform's Adapter manager if desired.
You should supply an adapter class for the returned object's class, to render objects in the Remote System Explorer view. It will uses a label and content provider that defers all requests to the adapter, which it gets by querying the platform's adapter manager for the object type. Be sure to register your adapter factory.
parent
- Object that is being expanded.filterString
- filter pattern for children of parent.monitor
- the process monitor associated with this operation
Exception
Object setProperty(Object subject, String key, String value) throws Exception
subject
- Identifies which object to get the properties ofkey
- Identifies property to setvalue
- Value to set property to
Exception
String getProperty(Object subject, String key) throws Exception
subject
- Identifies which object to get the properties ofkey
- Identifies property to get value of
Exception
Object setProperties(Object subject, String[] keys, String[] values) throws Exception
subject
- Identifies which object to get the properties ofkeys
- Identifies the properties to setvalues
- Values to set properties to. One to one mapping to keys by index number
Exception
String[] getProperties(Object subject, String[] keys) throws Exception
subject
- Identifies which object to get the properties ofkeys
- Identifies properties to get value of
Exception
boolean isHidden()
void setHidden(boolean value)
value
- The new value of the Hidden attributeISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
void setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager value)
l
- The new value of the FilterPoolReferenceManager referenceObject getTargetForFilter(ISystemFilterReference filterRef)
filterRef
- the filter reference to determine a target object from.
Class getServiceType()
null
.void switchServiceFactory(ISubSystemConfiguration configuration)
canSwitchTo(ISubSystemConfiguration)
. If the configuration is
not compatible with this subsystem then this must do nothing and must
answer false to canSwitchTo(ISubSystemConfiguration)
.
configuration
- the configuration to which to switch.boolean canSwitchTo(ISubSystemConfiguration configuration)
configuration
- the configuration which may be switched to
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |