RSE
Release 2.0

org.eclipse.rse.core.servicesubsystem
Class ServiceSubSystem

java.lang.Object
  extended by org.eclipse.rse.core.model.RSEPersistableObject
      extended by org.eclipse.rse.core.model.PropertySetContainer
          extended by org.eclipse.rse.core.model.RSEModelObject
              extended by org.eclipse.rse.core.subsystems.SubSystem
                  extended by org.eclipse.rse.core.servicesubsystem.ServiceSubSystem
All Implemented Interfaces:
IAdaptable, ISchedulingRule, ISystemFilterPoolReferenceManagerProvider, IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer, IRemoteObjectResolver, IServiceSubSystem, ISubSystem

public abstract class ServiceSubSystem
extends SubSystem
implements IServiceSubSystem


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.rse.core.subsystems.SubSystem
SubSystem.ChangeStatusJob, SubSystem.ConnectJob, SubSystem.DisconnectJob, SubSystem.DisplayErrorMessageJob, SubSystem.GetPropertiesJob, SubSystem.GetPropertyJob, SubSystem.ResolveAbsoluteJob, SubSystem.ResolveAbsolutesJob, SubSystem.ResolveRelativeJob, SubSystem.SetPropertiesJob, SubSystem.SetPropertyJob, SubSystem.SubSystemOperationJob, SubSystem.SystemMessageDialogRunnable
 
Field Summary
 
Fields inherited from class org.eclipse.rse.core.subsystems.SubSystem
_connectionError, _connectorService, _disconnecting, _hidden, _host, _name, _subsystemConfigurationId, cancelable, doConnection, filterPoolReferenceManager, 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, parentSubSystemConfiguration, pmDialog, previousUserIdKey, runInThread, saveFileName, shell, sortResults, SUBSYSTEM_FILE_NAME, supportsConnecting
 
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer
NO_CHILDREN
 
Constructor Summary
protected ServiceSubSystem(IHost host, IConnectorService connectorService)
          Constructor Subclasses must call this via super().
 
Method Summary
 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.
protected  Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
          Remote-accessing method, that does nothing by default.
protected  Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
          Remote-accessing method, that does nothing by default.
 
Methods inherited from class org.eclipse.rse.core.subsystems.SubSystem
addResolvedFilterStringObjects, checkIsConnected, clearLocalUserId, commit, connect, connect, connect, contains, 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, getCacheManager, getChildren, getConfigurationId, getConnectionOwnedFilterPoolName, getConnectionPrivateFilterPool, getConnectorService, getExecutedCommands, getFilterPoolReferenceManager, getFilterReferenceWithAbsoluteName, getFirstParentFilterString, getHost, getHostAliasName, getHostName, getLocalUserId, getLocalUserId, getName, getObjectWithAbsoluteName, getPersistableChildren, getPersistableParent, getPreferencesKey, getPreferencesKey, getPrimarySubSystem, getProperties, getProperty, getQueryingMessage, getQueryingMessage, getRemoteAttribute, getResolvingMessage, getRunnableContext, getRunningMessage, getSettingMessage, getSettingMessage, getShell, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getTargetsForFilter, getUniqueOwningSystemFilterPool, getUserId, getVendorAttribute, hasChildren, implicitConnect, initializeSubSystem, internalConnect, internalDisconnect, internalGetProperties, internalGetProperty, internalResolveFilterStrings, internalSetProperties, internalSetProperty, isConflicting, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, promptForPassword, promptForPassword, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, scheduleJob, selectCommandSubSystem, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setRemoteAttribute, setSubSystemConfiguration, setVendorAttribute, showConnectCancelledMessage, showConnectErrorMessage, showDisconnectCancelledMessage, showDisconnectErrorMessage, showOperationCancelledMessage, showOperationErrorMessage, showOperationMessage, sortResolvedFilterStringObjects, supportsCaching, uninitializeSubSystem
 
Methods inherited from class org.eclipse.rse.core.model.RSEModelObject
getDescription
 
Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
Methods inherited from class org.eclipse.rse.core.model.RSEPersistableObject
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.core.subsystems.IServiceSubSystem
getServiceType, switchServiceFactory
 
Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystem
checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getCacheManager, getChildren, getConfigurationId, getConnectorService, getFilterPoolReferenceManager, getHost, getHostAliasName, getLocalUserId, getName, getPrimarySubSystem, getProperties, getProperty, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUserId, getVendorAttribute, hasChildren, initializeSubSystem, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching, uninitializeSubSystem
 
Methods inherited from interface org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider
filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, getUniqueOwningSystemFilterPool
 
Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver
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
 

Constructor Detail

ServiceSubSystem

protected ServiceSubSystem(IHost host,
                           IConnectorService connectorService)
Constructor Subclasses must call this via super().

Method Detail

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.

Overrides:
getPropertyPage in class SubSystem

internalResolveFilterString

protected Object[] internalResolveFilterString(String filterString,
                                               IProgressMonitor monitor)
                                        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 SubSystemConfiguration.supportsFilters(), which is the default. Otherwise, SubSystem.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 SubSystem.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:

  1. They must implement IAdaptable.
  2. 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:

YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!

Overrides:
internalResolveFilterString in class SubSystem
Parameters:
filterString - - one of the filter strings from the expanded filter
monitor - - the progress monitor in effect while this operation performs
Throws:
InvocationTargetException
InterruptedException

internalResolveFilterString

protected Object[] internalResolveFilterString(Object parent,
                                               String filterString,
                                               IProgressMonitor monitor)
                                        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 SubSystem.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:

  1. They must implement IAdaptable.
  2. 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:

YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!

Overrides:
internalResolveFilterString in class SubSystem
Parameters:
parent - - the parent resource object being expanded
filterString - - typically defaults to "*". In future additional user-specific quick-filters may be supported.
monitor - - the progress monitor in effect while this operation performs
Throws:
InvocationTargetException
InterruptedException

RSE
Release 2.0

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