Define transformations using the <transformation:transformation/>
in ibm-portal-transformation.xml,
which is deployed to the console along with the transformation code.
About this task
Each transformation definition contains a description, a
title, and one of the following elements depending on the transformation
type:
<transformation:java-class/>
element that
provides the fully-qualified class name of the JAR file with the transformation
class
<transformation:function-name/>
element that
provides the name of the JavaScript function
<transformation:url/>
element that provides
the relative or absolute URL to the servlet performing the transformation.
The servlet must be deployed on the same application server as the
console.
- Open the ibm-portal-transformation.xml file.
- Enter a
<transformation:transformation/>
element,
its description, and title. <transformation:transformation uniqueName=
"com.ibm.TIP.samples.actions.transformation.JavaTransformationSample">
<transformation:description uniqueName=
"com.ibm.TIP.samples.actions.transformations.JavaTransformationSample.description">
<base:nls-ref key="JavaTransformationSample.description" locationName=
"classes/com/ibm/TIP/samples/actions/transformations/nl/JavaTransformationSample" />
</transformation:description>
<transformation:title uniqueName=
"com.ibm.TIP.samples.transformation.JavaTransformationSample.title">
<base:nls-ref key="JavaTransformationSample.title" locationName=
"classes/com/ibm/TIP/samples/actions/transformations/nl/JavaTransformationSample" />
</transformation:title>
</transformation:transformation>
- If it is a Java transformation, enter the
<transformation:java-class/>
element.
<transformation:java-class>
com.ibm.TIP.samples.actions.transformations.JavaTransformationSample
</transformation:java-class>
- If it is a JavaScript transformation, enter the
<transformation:function-name/>
element.
<transformation:function-name>
TIPJavaScriptTransformationSample
</transformation:function-name>
- If it is a URL servlet transformation, enter the
<transformation:url/>
element.
<transformation:url>
https://www.example.com:9046/ibm/ClientSideActions/servlet/com.ibm.TIP.
URLTransformationSampleServlet
</transformation:url>