com.ibm.etools.systems.dftsubsystem.impl
Class DefaultSubSystemImpl
java.lang.Object
EObjectImpl
com.ibm.etools.systems.subsystems.impl.SubSystemImpl
com.ibm.etools.systems.dftsubsystem.impl.DefaultSubSystemImpl
- All Implemented Interfaces:
- DefaultSubSystem, IAdaptable, IRemoteObjectResolver, ISystemResourceChangeEvents, SubSystem, SystemFilterPoolReferenceManagerProvider
- public class DefaultSubSystemImpl
- extends SubSystemImpl
- implements DefaultSubSystem
- See Also:
- Serialized Form
Fields inherited from class com.ibm.etools.systems.subsystems.impl.SubSystemImpl |
_connectionError, _disconnecting, _system, ADDITIONAL_ATTRIBUTES_EDEFAULT, additionalAttributes, additionalAttributesESet, cancelable, DELIM_VENDOR_ATTR_VALUE, DELIM_VENDOR_ATTRS, DELIM_VENDOR_NAME, doConnection, FACTORY_ID_EDEFAULT, factoryId, filterPoolReferenceManager, hidden, HIDDEN_EDEFAULT, IBM_ATTRIBUTES_EDEFAULT, ibmAttributes, ibmAttributesESet, ibmAttrs, monitor, name, NAME_EDEFAULT, operation, OPERATION_CANCEL_SHELL, OPERATION_CONNECT, OPERATION_DISCONNECT, OPERATION_GET_PROPERTIES, OPERATION_GET_PROPERTY, OPERATION_REMOVE_SHELL, OPERATION_RESOLVE_ABSOLUTE, OPERATION_RESOLVE_ABSOLUTES, OPERATION_RESOLVE_RELATIVE, OPERATION_RUN_COMMAND, OPERATION_RUN_SHELL, OPERATION_SEND_COMMAND_TO_SHELL, OPERATION_SET_PROPERTIES, OPERATION_SET_PROPERTY, parentConnection, parentSubSystemFactory, pmDialog, port, PORT_EDEFAULT, previousUserIdKey, remoteServerLauncher, runContext, runException, runInput, runInput2, runInputs, runInputs2, runInterpret, runInThread, runObject, runOutput, runOutputs, runOutputString, runOutputStrings, saveFileName, shell, sortResults, SUBSYSTEM_FILE_NAME, supportsConnecting, USE_SSL_EDEFAULT, USER_ID_EDEFAULT, userId, useSSL, VENDOR_ATTRIBUTES_EDEFAULT, vendorAttributes, vendorAttributesESet, vendorAttrs |
Fields inherited from interface com.ibm.etools.systems.model.ISystemResourceChangeEvents |
EVENT_ADD, EVENT_ADD_FILTER_REFERENCE, EVENT_ADD_FILTERSTRING_REFERENCE, EVENT_ADD_MANY, EVENT_ADD_RELATIVE, EVENT_CHANGE_CHILDREN, EVENT_CHANGE_FILTER_REFERENCE, EVENT_CHANGE_FILTERSTRING_REFERENCE, EVENT_COLLAPSE_ALL, EVENT_COLLAPSE_SELECTED, EVENT_COMMAND_FINISHED, EVENT_COMMAND_HISTORY_UPDATE, EVENT_COMMAND_MESSAGE, EVENT_COMMAND_RUN, EVENT_COMMAND_SHELL_FINISHED, EVENT_COMMAND_SHELL_REMOVED, EVENT_COMPILE_COMMAND_RUN, EVENT_DELETE, EVENT_DELETE_FILTER_REFERENCE, EVENT_DELETE_FILTERSTRING_REFERENCE, EVENT_DELETE_MANY, EVENT_EXPAND_SELECTED, EVENT_ICON_CHANGE, EVENT_MOVE_FILTER_REFERENCES, EVENT_MOVE_FILTERSTRING_REFERENCES, EVENT_MOVE_MANY, EVENT_MUST_COLLAPSE, EVENT_PROPERTY_CHANGE, EVENT_PROPERTYSHEET_UPDATE, EVENT_REFRESH, EVENT_REFRESH_REMOTE, EVENT_REFRESH_SELECTED, EVENT_REFRESH_SELECTED_FILTER, EVENT_REFRESH_SELECTED_PARENT, EVENT_RENAME, EVENT_RENAME_FILTER_REFERENCE, EVENT_REPLACE_CHILDREN, EVENT_REVEAL_AND_SELECT, EVENT_SEARCH_FINISHED, EVENT_SELECT, EVENT_SELECT_EXPAND, EVENT_SELECT_REMOTE, PROPERTYSHEET_UPDATE_EVENT |
Constructor Summary |
protected |
DefaultSubSystemImpl()
Constructor
Subclasses must call this via super(). |
Method Summary |
Object |
eGet(EStructuralFeature eFeature,
boolean resolve)
|
NotificationChain |
eInverseAdd(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
|
NotificationChain |
eInverseRemove(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
|
boolean |
eIsSet(EStructuralFeature eFeature)
|
void |
eSet(EStructuralFeature eFeature,
Object newValue)
|
protected EClass |
eStaticClass()
|
void |
eUnset(EStructuralFeature eFeature)
|
PropertyPage |
getPropertyPage(Composite parent)
Optionally override in order to supply a property sub-page to the tabbed
notebook in the owning connection's Properties page. |
AbstractSystemManager |
getSystemManager()
Remote-connecting method, that returns null by default. |
protected Object[] |
internalResolveFilterString(IProgressMonitor monitor,
Object parent,
String filterString)
Remote-accessing method, that does nothing by default. |
protected Object[] |
internalResolveFilterString(IProgressMonitor monitor,
String filterString)
Remote-accessing method, that does nothing by default. |
Methods inherited from class com.ibm.etools.systems.subsystems.impl.SubSystemImpl |
addResolvedFilterStringObjects, basicSetFilterPoolReferenceManager, basicSetRemoteServerLauncher, cancelShell, checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, displayAsyncMsg, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, doesFilterTypeMatch, filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, forceUserIdToUpperCase, getActiveWorkbenchShell, getActiveWorkbenchWindow, getAdapter, getAdditionalAttributes, getCacheManager, getChildren, getCommandSubSystem, getConnectionOwnedFilterPoolName, getConnectionPrivateFilterPool, getExecutedCommands, getFactoryId, getFilterPoolReferenceManager, getFilterReferenceWithAbsoluteName, getFirstParentFilterString, getHostName, getIBMAttribute, getIbmAttributes, getLocalUserId, getLocalUserId, getName, getObjectWithAbsoluteName, getParentSubSystemFactory, getPort, getPortAsInt, getPreferencesKey, getPreferencesKey, getPreferencesManager, getPrimarySubSystem, getProperties, getProperty, getQueryingMessage, getQueryingMessage, getRemoteServerLauncher, getResolvingMessage, getRunnableContext, getRunningMessage, getSaveFileName, getSettingMessage, getSettingMessage, getShell, getSystem, getSystemConnection, getSystemConnectionName, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getSystemType, getTargetForFilter, getUDActionSubsystem, getUniqueOwningSystemFilterPool, getUserId, getUserIdGen, getVendorAttribute, getVendorAttributes, hasChildren, internalCancelShell, internalConnect, internalDisconnect, internalGetProperties, internalGetProperty, internalRemoveShell, internalResolveFilterStrings, internalRunCommand, internalRunCommand, internalRunShell, internalSendCommandToShell, internalSetProperties, internalSetProperty, isConnected, isConnectionError, isHidden, isOffline, isSetAdditionalAttributes, isSetIbmAttributes, isSetVendorAttributes, isUseSSL, removeShell, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterStrings, resolveFilterStrings, run, runCommand, runCommand, runShell, selectCommandSubSystem, sendCommandToShell, setAdditionalAttributes, setConnectionError, setFactoryId, setFilterPoolReferenceManager, setHidden, setIBMAttribute, setIbmAttributes, setName, setParentConnection, setParentSubSystemFactory, setPort, setProperties, setProperty, setRemoteServerLauncher, setSaveFileName, setUserId, setUserIdGen, setUseSSL, setVendorAttribute, setVendorAttributes, showConnectCancelledMessage, showConnectErrorMessage, showDisconnectCancelledMessage, showDisconnectErrorMessage, showOperationCancelledMessage, showOperationErrorMessage, showOperationMessage, sortResolvedFilterStringObjects, supportsCaching, toString, unsetAdditionalAttributes, unsetIbmAttributes, unsetVendorAttributes |
Methods inherited from interface com.ibm.etools.systems.subsystems.SubSystem |
checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getAdditionalAttributes, getCacheManager, getChildren, getCommandSubSystem, getFactoryId, getFilterPoolReferenceManager, getIbmAttributes, getLocalUserId, getName, getParentSubSystemFactory, getPort, getPortAsInt, getPrimarySubSystem, getProperties, getProperty, getRemoteServerLauncher, getSaveFileName, getSystem, getSystemConnection, getSystemConnectionName, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUDActionSubsystem, getUserId, getVendorAttribute, getVendorAttributes, hasChildren, isConnected, isConnectionError, isHidden, isOffline, isSetAdditionalAttributes, isSetIbmAttributes, isSetVendorAttributes, isUseSSL, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterStrings, resolveFilterStrings, setAdditionalAttributes, setConnectionError, setFactoryId, setFilterPoolReferenceManager, setHidden, setIbmAttributes, setName, setParentConnection, setParentSubSystemFactory, setPort, setProperties, setProperty, setRemoteServerLauncher, setSaveFileName, setUserId, setUseSSL, setVendorAttribute, setVendorAttributes, supportsCaching, unsetAdditionalAttributes, unsetIbmAttributes, unsetVendorAttributes |
copyright
public static final String copyright
-
- See Also:
- Constant Field Values
DefaultSubSystemImpl
protected DefaultSubSystemImpl()
- Constructor
Subclasses must call this via super().
eStaticClass
protected EClass eStaticClass()
-
- Overrides:
eStaticClass
in class SubSystemImpl
eInverseAdd
public NotificationChain eInverseAdd(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
-
- Overrides:
eInverseAdd
in class SubSystemImpl
eInverseRemove
public NotificationChain eInverseRemove(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
-
- Overrides:
eInverseRemove
in class SubSystemImpl
eGet
public Object eGet(EStructuralFeature eFeature,
boolean resolve)
-
- Overrides:
eGet
in class SubSystemImpl
eSet
public void eSet(EStructuralFeature eFeature,
Object newValue)
-
- Overrides:
eSet
in class SubSystemImpl
eUnset
public void eUnset(EStructuralFeature eFeature)
-
- Overrides:
eUnset
in class SubSystemImpl
eIsSet
public boolean eIsSet(EStructuralFeature eFeature)
-
- Overrides:
eIsSet
in class SubSystemImpl
getPropertyPage
public PropertyPage getPropertyPage(Composite parent)
- Optionally override in order to supply a property sub-page to the tabbed
notebook in the owning connection's Properties page.
Return the single property page to show in the tabbed notebook for the
for SubSystem property of the parent Connection object, in the Remote Systems
view.
Return null if no page is to be contributed for this. You are limited to a single
page, so you may have to compress. It is recommended you prompt for the port
if applicable since the common base subsystem property page is not shown
To help with this you can use the SystemPortPrompt
widget.
Returns null by default.
- Specified by:
getPropertyPage
in interface SubSystem
- Overrides:
getPropertyPage
in class SubSystemImpl
getSystemManager
public AbstractSystemManager getSystemManager()
- Remote-connecting method, that returns null by default. Override!
Return a singleton instance of an AbstractSystemManager
subclass that manages a pool of ISystem
objects, one per system connection.
You should not instantiate your AbstractSystemManager subclass more than once, which is usually
done be maintaining a static variable in that class, and supplying a getTheSystemManager method
that sets the static variable to a new'd instance if it is null, and returns that static variable.
By default, SubSystemImpl.getSystem()
calls this,
unless you override that.
- Specified by:
getSystemManager
in interface SubSystem
- Overrides:
getSystemManager
in class SubSystemImpl
internalResolveFilterString
protected Object[] internalResolveFilterString(IProgressMonitor monitor,
String filterString)
throws InvocationTargetException,
InterruptedException
- Remote-accessing method, that does nothing by default. Override if filter strings are supported.
Resolve an absolute filter string. This is only applicable if the subsystem
factory reports true for SubSystemFactoryImpl.supportsFilters()
,
which is the default. Otherwise, SubSystemImpl.getChildren()
is called when the subsystem itself is expanded.
When a user expands a filter this method is invoked for each filter string and the
results are concatenated and displayed to the user. You can affect the post-concatenated
result by overriding SubSystemImpl.sortResolvedFilterStringObjects(Object[])
if you desire to
sort the result, say, or pick our redundancies.
The resulting objects are displayed in the tree in the Remote System view
.
There are two requirements on the returned objects:
- They must implement
IAdaptable
.
- Their must be an RSE
remote-adapter
registered
for the object's class or interface type. Further, if this subsystem is visible
in the RSE, which is the default, then there must also be an RSE GUI-adapter
registered
with the platform. The base class implementation of this interface is AbstractSystemViewAdapter
.
A good place to start with your remote-resource classes to subclasss AbstractResource
, as it
already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
implementing the remote-adapter
.
Be sure to register your adapter factory in your plugin's startup method.
As per IRunnableWithProgress rules:
- if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- do not worry about calling monitor.done() ... caller will do that!
YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- Overrides:
internalResolveFilterString
in class SubSystemImpl
- Parameters:
monitor
- - the progress monitor in effect while this operation performsfilterString
- - one of the filter strings from the expanded filter
- Throws:
InvocationTargetException
InterruptedException
internalResolveFilterString
protected Object[] internalResolveFilterString(IProgressMonitor monitor,
Object parent,
String filterString)
throws InvocationTargetException,
InterruptedException
- Remote-accessing method, that does nothing by default. Override if filter strings are supported.
Resolve a relative filter string.
When a user expands a remote resource this method is invoked and the
results are potentially sorted and displayed to the user. You can affect the sorting
behaviour by overriding SubSystemImpl.sortResolvedFilterStringObjects(Object[])
if you desire to
sort the result, say, or pick our redundancies. This is only called if the parent object's adapter indicated it can have children.
The resulting objects are displayed in the tree in the Remote System view
.
There are two requirements on the returned objects:
- They must implement
IAdaptable
.
- Their must be an RSE
remote-adapter
registered
for the object's class or interface type. Further, if this subsystem is visible
in the RSE, which is the default, then there must also be an RSE GUI-adapter
registered
with the platform. The base class implementation of this interface is AbstractSystemViewAdapter
.
A good place to start with your remote-resource classes to subclasss AbstractResource
, as it
already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
implementing the remote-adapter
.
Be sure to register your adapter factory in your plugin's startup method.
As per IRunnableWithProgress rules:
- if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- do not worry about calling monitor.done() ... caller will do that!
YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- Overrides:
internalResolveFilterString
in class SubSystemImpl
- Parameters:
monitor
- - the progress monitor in effect while this operation performsparent
- - the parent resource object being expandedfilterString
- - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- Throws:
InvocationTargetException
InterruptedException
Copyright © 2005 IBM Corp. All Rights Reserved.
Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.