WebSphere Message Brokers
File: as04499_
Writer: Lorraine Waitt

Task topic

This build: July 31, 2007 21:37:04

Adding a property editor or compiler

Before you start:

You must complete the following tasks:
  1. Creating a user-defined node project
  2. Creating the user-defined node plug-in files
  3. Defining the node properties

To control how the properties of your node are displayed, create a property editor by using the IPropertyEditor interface. A property editor can contain many controls, such as text fields and lists.

To create a custom compiler, for example to encrypt a value before sending it to the server, use the IPropertyCompiler interface.

Importing the plug-in API into the workbench

To create a property editor or compiler, you must first import the plug-in API into the workbench, as follows:
  1. Click File > Import > External Plug-ins and Fragments.
  2. Click Next.
  3. Select the com.ibm.etools.mft.api plug-in.
  4. When the plug-in is imported in the workspace, right-click the plug-in, and click Update Classpath.
  5. Click Finish.
  6. From the Window menu, click Preferences.
  7. Expand Plug-in development and select Target Platform.
  8. Click Not in Workspace to select all plug-ins except the com.ibm.etools.mft.api plug-in that you have just imported into the workbench.
  9. Click OK.
  10. Switch to the Java perspective.
  11. Select your user-defined node project in the Package Explorer, and click Project > Clean Project.
  12. Right-click your user-defined node project, and click Update Classpath.

Creating a Java class

To create a new Java class for your property editor or compiler, complete the following steps.
  1. Switch to the Java perspective.
  2. Select your user-defined node project in the Package Explorer, and click Project > Clean Project
  3. Right-click your user-defined node project, and click Update Classpath…
  4. In the user-defined node project, select the /src directory, and click File > New > Class.
  5. Type a name for your class in the Name text field.
  6. Perform the following steps, according to whether you are creating a property editor or a property compiler.
    • If you are creating a property editor:
    1. Delete any text in the Superclass text field, and click Browse….
    2. Select the AbstractPropertyEditor class and click OK.
    • If you are creating a property compiler:
    1. Click Add… next to the Interfaces text field.
    2. Select the IPropertyCompiler interface and click OK.
  7. Click Finish.

Testing your property editor or compiler

To test your property editor, launch another instance of the workbench (see Enabling PDE runtime capabilities) and select Run > Run as > Runtime Workbench. See the PDE Guide for more information about testing using the Runtime Workbench for testing your node.

To test your compiler, deploy to a broker the flow that contains your user-defined node.

Related reference
User-defined extensions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:37:04

as04499_ This topic's URL is: