B Sample Transformation Class

When you use this connector, you can transform reconciled data according to your requirements. This feature has been described in Section 4.4, "Transforming Data Reconciled Into Oracle Identity Manager," along with the discussion on the TransformLookupName and UseTransformMapping 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.