Adding a property editor or compiler

Create a custom compiler by using the IPropertyCompiler interface; for example, to encrypt a value before sending it to the server.

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

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:
  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

Start of change

Start of changeTo test your property editor, see Testing a user-defined node.End of change

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

A custom property editor can use RAD or Eclipse APIs. When you migrate to a new version of WebSphere® Message Broker, your custom property editor might not work if the RAD or Eclipse APIs change. Update your property editor code to comply with the changed API.

End of change
Related reference
User-defined extensions
Related information
Property editor API
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:23:06

as04499_