D Sample Transformation Class

You can transform reconciled data according to your requirements. This feature has been described in "Transforming Data Reconciled Into Oracle Identity Manager".

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

The following is a sample transformation class:

import com.thortech.xl.schedule.tasks.AttributeTransformer;
import java.util.HashMap;
import com.thortech.xl.integration.ActiveDirectory.utils.ConnectorLogger;
public class AppendNumberToFirstName implements AttributeTransformer 
{
    private ConnectorLogger logger = new ConnectorLogger("OIMCP.ADCS");
    private String sClassName = this.getClass().getName();
    /**
    *  @param HashMap value: This is the input HashMap data of *parent or child
    *  form to be transformed.
    *  @param String value: This is the input string to be  *transformed.
    *  @return StringHashMap: This is the modified string HashMap that is
    *  returned.
    */
    public String HashMap transform(HashMap hmUserAttributes,String sAttributeKeyvalue) 
        {
        String sMethodName = "transform";
        logger.setMethodStartLog(sClassName, sMethodName);
        String sOldValue = (String) hmUserAttributes.get(sAttributeKey);
        sOldValue = sOldValue +"123";                                     hmUserAttributes.put(sAttributeKey,sOldValue);
        logger.setMethodFinishLog(sClassName,sMethodName);
        return hmUserAttributes;value=value+"123";
        return value;
    }
}

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