<metaname="copyright"content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
There is also a way to <Ahref="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html#getSubSystemConfiguration(java.lang.String)">query</A> a subsystem configuration
<li><b>class</b>. A class implementing <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.html">ISubSystemConfiguration</A>
subsystem <I>instances</I> to each connection, and the intent of a subsystem instance is to present remote resources for display or manipulation purposes. Thus, you must also create a class implementing the interface <samp><Ahref="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html"><B>ISubSystem</B></A></samp>.
The intent of each subsystem is to show remote resources from the remote system
identified by the parent connection, for the user. (Subsystems can in fact be hidden, which means their their role is to return remote resources for programmatic purposes only.) When the first request is made for remote objects, the subsystem is asked to connect to the remote system if it is not already.
This job is deferred to a <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html">IConnectorService</A> object whose role it is to manage connecting and disconnecting
to the remote physical system. By use of a <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">connector service manager</a>,
one system can manage the live connections of multiple subsystems in the same system connection, should they happen to share the same communication pipe.
href="../api/properties/uiPropertiesAPI.html">property pages</A> and <A
href="../api/preferences/uiPreferencesAPI.html">preference page editors</A>. You will probably also supply a
property page for your subsystem objects, via the Eclipse <samp>propertyPages</samp> extension point, and for your remote resource objects, via the RSE <A
<P>For many of the interfaces you must implement, there are base classes supplied that you can extend to make the development effort easier.</P>
<p>The
following summarizes the minimum set of classes you will be creating in order to realize your own subsystem support, including the RSE-supplied base classes to extend:</p>
<TD>Manages a single system instance that is shared among multiple subsystems in a single connection. Even if you only have a single subsystem configuration it is useful to use this in
case you later add additional factories, and their subsystems share the same communication pipe. To enable this, all your subsystem classes need to implement a unique interface of your own creation.</TD>
<TD>Displays a wizard prompting for a new filter. Filters contain filter strings, which are up to each subsystem to design and interpret. The New Filter wizard
prompts for a single filter string (more can be added in change mode). Typically you subclass <samp>SystemFilterStringEditPane</samp> to create your own
prompt for the filter string information, and then subclass <samp>SystemNewFilterAction</samp> so as to configure the default New Filter wizard to use
<TD>The view adapter is an amalgamation of all the required information needed to populate the RSE views. You will define one class per unique remote object interface or class, and in it you will override methods to return the remote object's label, image, popup-menu actions, property sheet properties and children (if expandable). You can also decide whether to enable common RSE popup menu actions like rename, delete and refresh. <BR>Your view adapter will usually also implement the remote adapter interface, enabling the many common RSE capabilities to work, such as the copy, paste, drag and drop, and more. </TD>
</TR>
</TBODY>
</TABLE>
<h3><Aname="steps"></A>Overview of Steps</h3>
<p>Implementing a subsystem involves the following steps, in the following order:</p>
<OL>
<li>Creating an interface for your subsystem. It can, and often is, an empty interface.</li>
<li>Creating a subclass of <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">AbstractConnectorServiceManager</A>.
The code here will re-use the same system object from step 2 for all subsystems that implement the interface from step 1, within the same connection.</li>
<li>Designing the classes to represent the remote resources (your <i>model</i>) that you will show from your subsystem.
Each must implement the <samp>org.eclipse.core.runtime.IAdaptable</samp> interface from Eclipse.
It is also very helpful if they also maintain a reference to the subsystem which created them. The base class
<li>Designing the syntax of the <i>filter string</i> that will be used as a pattern to tell your subsystem what resources to show. For example, for files this might be of the
form "path/generic-name /options". It is the job of your subsystem to interpret these strings and return a list of remote resources matching the
criteria capturing in the string. You will eventually design a user interface to prompt the user for one the
contents of one of these filter strings. You might find it helps to create a class that holds one of these filter strings passed via a constructor, and
can parse it into its constituent pieces via getter methods. It should also support a default constructor and setting of constituent pieces via setter methods,
and the generation of the filter string via toString().
<li>return a singleton instance of the system manager from step 3 in its <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#getSystemManager()">getSystemManager</A> method,
<li>manage persistent properties via calls to the inherited <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#setVendorAttribute(java.lang.String, java.lang.String, java.lang.String)">setVendorAttribute</A>
and <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.htmll#getVendorAttribute(java.lang.String, java.lang.String)">getVendorAttribute</A> methods,
<li>use your communications layer to return instances of your model objects in its <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html.html#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)">internalResolveFilterString</A> method.
The input to this is one or more strings such as you designed in step 5. It will return all remote resources matching the criteria captured in the input filter string.
You may also find the <Ahref="../../reference/api/org/eclipse/rse/services/clientserver/NamePatternMatcher.html">org.eclipse.rse.services.clientserver.NamePatternMatcher</a>
<li>Creating a subclass of <Ahref="../../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">DefaultSubSystemFactoryImpl.</A></li>
<li>Defining your <Ahref="../../doc/org_eclipse_rse_ui_subsystemConfiguration.html">subsystemConfiguration extension</a> in your <samp>plugin.xml</samp> file.</li>
<li>For each remote resource class you created in step 4, you need to create an adapter class, which extends
adapter class that extends <samp><ahref="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.html">AbstractSystemRemoteAdapterFactory</a></samp>
and in it calling <samp><ahref="../../reference/api/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.html#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)">setFilterStringEditPane</a></samp>
and in it calling <samp><ahref="../../reference/api/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.html#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)">setFilterStringEditPane</a></samp>
<litype="i">Override the <samp><ahref="../../reference/api/org/eclipse/rse/ui/view/SubSystemFactoryAdapter.html#getNewFilterPoolFilterAction(org.eclipse.rse.filters.ISystemFilterPool, org.eclipse.swt.widgets.Shell)">getNewFilterPoolFilterAction(SystemFilterPool, Shell)</a></samp>
in the RSE-supplied <ahref="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">new-filter action class</a>.
<litype="i">Override the <samp><ahref="../../reference/api/org/eclipse/rse/ui/view/SubSystemFactoryAdapter.html#getChangeFilterAction(org.eclipse.rse.filters.ISystemFilter, org.eclipse.swt.widgets.Shell)">getChangeFilterAction(SystemFilter, Shell)</a></samp>