Show TOC

Background documentationCustomizing Options Locate this document in the navigation structure

 

All the customizing options require implementation of a class that extends the TransformersProvider class and change the class name property in the portalapp.xml file.

Changing Folder Structure

To place the Transformers.xml in a different location, overwrite the method getTransformersResourcePath(). This method returns a full path name to a file holding the list of transformers.

To change the location of the XSL files, overwrite the getXSLTransformerPath(String tXSLPath)method. This method receives the SourceName property from the Transformers.xml file and returns the full path name to the XSL file.

Adding Transformers by Coding

Transformer providers can add transformers without defining them in the Transformers.xml file by overwriting the init(IServiceContext serviceContext) method and implementing it in one of the following ways:

Option 1

  1. Call the default implementation super(serviceContext).

  2. Create the new transformer information using the createTransformerInformation() method of the transformation service.

  3. Set the transformer by calling the appropriate setTransformer() method in the service.

Option 2

  1. Load transformers information by calling loadTransformers() method and hold the received list.

  2. Create your transformer using createTransformerInformation() of the service and add the ITransformerInformation result to the list of transformers.

  3. Call method setTransformers() with the list of transformers information.

This customization is useful when there is additional information needed to add a transformer or when your provider is used for other purposes.

Adding Packages to the SAX Class Names

Overwrite method String getSAXClassName(String tClassName) that receives the value of the SourcePath property in the transformer definition in the transformers.xml file. This method must return a full qualified class name including the package name.

Standalone Provider

This is a provider that does not inherit from class com.sap.portal.httpconnectivity.transformationservice.TransformersProvider. When you develop a standalone provider, make sure that:

  1. Provider is a portal service.

  2. The provider is registered in the portal registry, when deployed.

  3. Transformers are added using the ITransformersService methods so they are registered when initialized.

  4. Transformer is unregistered when a provider is removed or updated.

  5. Provider is unregistered from the portal registry when removed.