Validating properties in target transforms and transformation extensions

You can create a transformation extension to validate the properties of a transformation extension or a target transform. The core transformation functionality does not distinguish between the properties of a transformation extension and the properties of the target transform.

Before you begin

The target transform must be registered with the transformation service. The transformation extension that extends the target transform must contain the properties to validate.

About this task

You can create a transformation extension that validates the properties, or you can add a TransformationExtension element to an existing transformation extension.

To enable the validation of properties in a target transform and transformation extension:

Procedure

  1. Optional: Create an Eclipse plug-in project.
  2. In the META-INF folder of the plug-in project, double-click the MANIFEST.MF file.
  3. In the manifest file editor, on the Dependencies tab, in the Required Plug-ins area, add the following dependency: com.ibm.xtools.transform.core.
  4. If a TransformationExtension element does not exist, in the manifest editor, on the Extensions tab, in the All Extensions area, add a com.ibm.xtools.transform.core.transformationExtensions extension point.
  5. On the Extensions tab, in the All Extensions area, click a TransformationExtension element.
  6. Click helperClass.
  7. In the New Java Class window, in the Name field, specify a name for the class.
  8. Click Finish. The Java file editor displays the new class.
  9. Specify the Java code to override the validateContext() method. For more information about this method, which is contained in the class named com.ibm.xtools.transform.core.extension.AbstractTransformExtensionHelper, see the Rational® Developer Guide.
  10. Click File > Save.

Results

The validation code is invoked the next time that the target transform and the transformation extension run.


Feedback