Skip Headers
Oracle® Identity Manager Connector Guide for Microsoft Active Directory User Management
Release 9.1.1

Part Number E11197-13
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
PDF · Mobi · ePub

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.