IBM DB2 UDB
Plugin Interface
for Extending the Control Center

com.ibm.db2.tools.cc.navigator
Interface CCExtension


public interface CCExtension

The CCExtension interface allows users to extend the Control Center user interface by adding new toolbar buttons, new menu items for objects in the tree and new objects to the Control Center tree.

To do so, create a java file which imports the com.ibm.db2.tools.cc.navigator package and implements this interface. The new file provides the implementation of the getObjects() and getToolbarActions() methods.

The getObjects() method returns an array of CCObjects which defines the existing Control Center objects which the user would like to add new menu actions to, add new plugin objects under or remove existing menu actions from (i.e. change or configure menu actions).

The getToolbarActions() method returns an array of CCToolbarActions which is added to the Control Center main toolbar.

A single CCExtension subclass file or multiple CCExtension subclass files can be used to define the Control Center extensions. In order for the Control Center to make use of these extensions, use the following setup procedures:

  1. Create a "db2plug.zip" file which contains all the CCExtension subclass files. The files should not be compressed. For example, if the CCExtension files are in the plugin package and they are located in the plugin directory, issue zip -r0 db2plug.zip plugin\*.class This command will put all the plugin package class files into the db2plug.zip file and preserve their relative path information.

  2. To run the Control Center as an application, put the db2plug.zip in a directory pointed to by the CLASSPATH envirnoment variable and where the Control Center is run.

    On Windows operating system, put db2plug.zip in the DRIVE:\sqllib\tools directory where DRIVE: represents the drive on which DB2 is installed.

    On UNIX platforms, put db2plug.zip in the /u/db2inst1/sqllib/tools directory where /u/db2inst1 represents the directory on which DB2 is installed.

    Note: The db2cc command sets the classpath to point to db2plug.zip in the tools directory.

Guidelines for Control Center plugin developers

Since multiple plugins can be contained in the db2plug.zip file, plugin developers should follow these guidelines when creating a plugin for the Control Center:

Control Center Plugin Compatibility

Source and Binary Compatibility

There is no guarantee that plugins are upwards binary and source compatible from point release to point release of DB2. This means that plugins built with an earlier version of DB2 may require code to be modified and recompiled with the current release. For example, a 8.1 plugin may require updates to run in the 8.2 release.

Plugins which use new release features are not usable with earlier versions of DB2.

Deprecated APIs

Deprecated methods and classes in this package are not guaranteed to be supported in future releases of DB2. It is recommended that plugin code be modified to remove usage of deprecated methods and classes.


Method Summary
 CCObject[] getObjects()
          Get an array of CCObject subclass objects which define a list of objects to be overrided in the Control Center
 CCToolbarAction[] getToolbarActions()
          Get an array of CCToolbarAction subclass objects which represent a list of buttons to be added to the Control Center main toolbar.
 

Method Detail

getObjects

public CCObject[] getObjects()
Get an array of CCObject subclass objects which define a list of objects to be overrided in the Control Center

Returns:
an array of CCObject subclass objects or null

getToolbarActions

public CCToolbarAction[] getToolbarActions()
Get an array of CCToolbarAction subclass objects which represent a list of buttons to be added to the Control Center main toolbar.

Returns:
an array of CCToolbarAction subclass objects or null

IBM DB2 UDB
Plugin Interface
for Extending the Control Center

(C)Copyright IBM Corp. 2002, 2004. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.