Sunday, March 4, 2012

OIM Develop Connectors using ICF and SPI APIS.. Part 3

OIM Develop Connectors using ICF and SPI APIS.. Part3:: Implement Filters

This connector supports only the ContainsAllValuesFilter operation. Implement the ContainsAllValuesFilter operation The following code illustrates the sample implementation of org.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<T> that defines the filter operation.

 package org.identityconnectors.flatfile.filteroperations;

import java.util.HashMap;
import java.util.Map;

import org.identityconnectors.framework.common.objects.Attribute;
import org.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator;
import org.identityconnectors.framework.common.objects.filter.ContainsAllValuesFilter;

public class ContainsAllValuesImpl extends AbstractFilterTranslator<Map<String, String>> {
    protected Map<String, String> createContainsAllValuesExpression(ContainsAllValuesFilter filter,
                                                                    boolean not) {
        Map<String, String> containsAllMap = new HashMap<String, String>();
        Attribute attr = filter.getAttribute();
        containsAllMap.put(attr.getName(), attr.getValue().get(0).toString());
        return containsAllMap;


No comments:

Post a Comment

ForgeRock IAM : OpenDS (Open Directory Server). Importing LDIF files

The most efficient method of importing LDIF data is to take the OpenDJ server offline. Alternatively, you can schedule a task to import the ...