Subsystem Factory
Identifier
com.ibm.etools.systems.core.subsystemfactoryDescription
This extension point allows tool-writers to extend the capability
of the Remote System Explorer,
by identifying a subsystem factory that produces a subsystem
whenever a new connection is created.
This subsystem appears under the connection when it is expanded
in the Remote Systems view of
the Remote System Explorer perspective. The subsystem factory
is called by the Remote System
framework when the user creates a new connection, when the connection's
system type is one of the
types identified as supported by this subsystem factory extension.
There is one subsystem
object per connection, and the role of a subsystem is to allow
users to work with remote resources
for the remote system identified by the containing connection.
Defining a subsystem factory involves more than the single subsystem
factory class. There must
also be a subsystem class defined, and a system class defined.
There may also be other classes
defined, such as classes for the content area of wizards for
defining filters, user actions
and compile commands, if the subsystem factory wishes to support
these. See the plugin
com.ibm.etools.systems.doc.isv for documentation details on defining
subsystems. To enable it, rename toc.xml.off to toc.xml.
Markup
<!ELEMENT extension (factory+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
<!ELEMENT factory EMPTY>
<!ATTLIST factory
id CDATA #REQUIRED
vendor CDATA #REQUIRED
icon CDATA #REQUIRED
iconlive CDATA #REQUIRED
class CDATA #REQUIRED
name CDATA #REQUIRED
systemtypes CDATA #IMPLIED
category CDATA #IMPLIED
>
- id - A unique ID for this subsystem factory. This will be used as a folder name for
information contained by the subsystem factory, or by any of its subsystems.
- vendor - Name of the vendor supplying this subsystem factory.
- icon - The icon to dipslay for subsystems of this factory, when not connected.
Specify the path of the .gif file, relative to your plugin directory.
- iconlive - The icon to display for subsystems of this factory, when there is a live connection. This
is usually derived from the normal icon, but adorned with a bright green arrow. Specify
a path to the icon's .gif file, relative to your plugin directory.
- class - A class that implements com.ibm.etools.systems.subsystems.SubSystemFactory,
or better yet extends com.ibm.etools.systems.dftsubsystem.impl.DefaultSubSystemFactoryImpl.
- name - Translatable name for subsystems created by this factory. These appear immediately
under a connection when the connection is expanded in the Remote Systems view of the
Remote System Explorer perspective.
- systemtypes - A semi-colon separated list of system types that subsystems from this factory support.
For example, "Windows;Unix;Linux". If not specified, defaults to all system types.
- category - This optional attribute allows subsystem providers to classify
the type of remote resources
that are listed by this subsystem factory. It is possible for
multiple subsystem factories to
support the same remote resource category. This category is used
in the popupMenus and
propertyPages extension points, to scope actions and property
pages to only remote resources
of a particular category, via their subsystemfactoryCategory attribute.
For example, if listing database resources
you might specify a
category of "database".
IBM-supplied categories include "files", "cmds" and "jobs".
Example
Example of using this extension point:
<extension
point="com.ibm.etools.systems.core.subsystemfactory">
<factory
systemtypes="Unix;Linux;Local"
name="Databases"
icon="icons/dbsubsys.gif"
iconlive="icons/dbsubsyslive.gif"
id="com.acme.etools.mypkg.myfactory"
class="com.acme.etools.db.DBSubSystemFactory"
category="databases"
vendor="ACME"
>
</factory>
</extension>
Defining the xml for the extension point is easy. There is a fair amount to know about
creating the classes needed for a subsystem factory, however. For this information, consult
the Remote System Explorer developer documention, including the JavaDoc for the supplied
classes and interfaces for this task.
API Information
The provider of subsystem factories must implement the interface
com.ibm.etools.systems.subsystems.SubSystemFactory,
although it is not recommended to create a new class from scratch.
Rather, it is highly recommended
to use the supplied base class com.ibm.etools.systems.dftsubsystem.impl.DefaultSubSystemFactory.
This base class pre-supplies much functionality, including support for
persisting properties and metadata, and support for filters.Supplied Implementation
All IBM-supplied subsystems are implemented via use of this extension
point. See
the plugin.xml files for plugins com.ibm.etools.systems.core,
com.ibm.etools.systems.universal and com.ibm.etools.iseries.core
for examples.
(C) Copyright IBM Corp. 2002 All Rights Reserved.