Skip Headers
Oracle® Identity Manager Connector Guide for UNIX Telnet
Release 9.0.4

Part Number E10448-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

C Sample Transformation Class

When you use this connector, you can transform reconciled data according to your requirements. This feature has been described in "Transforming Data Reconciled Into Oracle Identity Manager", along with the discussion on the Transform Lookup Code and Use Transform Mapping attributes.

If you want to transform the value of a target system field that is fetched during reconciliation, then the first step is to implement the required transformation logic in a Java class. This transformation class must implement the com.thortech.xl.schedule.telnetssh.tasks.AttributeTransformer interface and the transform method.

The following is a sample transformation class:

package com.thortech.xl.schedule.telnetssh.tasks;
import java.util.Hashtable;
import com.thortech.util.logging.Logger;
import com.thortech.xl.integration.telnetssh.util.TelnetSSHConstants;
public class AppendTransformer implements AttributeTransformer
{
/** 
         * sample transformation method
         *  it appends '123' to the key if present in the data to be reconciled 
         *  @param sKeyToBeTransformed - key to be transformed for example: Users.GECOS
         *  @param        htReconData - hash table of the data to be reconciled
*/
        public Hashtable transform(String sKeyToBeTransformed, Hashtable htReconData)
        {
                if(htReconData != null && sKeyToBeTransformed != null ) {
                        if(htReconData.get(sKeyToBeTransformed) != null) {
String sValue = (String)htReconData.get(sKeyToBeTransformed) ;
                                sValue+="123";
                                htReconData.put(sKeyToBeTransformed, sValue);
                        }
                }
                return htReconData;
        }
}

The method defined in this class accepts the value of the field to be transformed, appends the string 123 to it, and returns the transformed string value.