From 58ffacee660a4eb792f49dd311a4e2ddda05afad Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 25 May 2012 22:12:32 +0000
Subject: [PATCH] Checkpoint local changes: add more attribute mapping support.

---
 opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/CompositeAttributeMapper.java |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/CompositeAttributeMapper.java b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/CompositeAttributeMapper.java
index f62c6f1..2d53f3e 100644
--- a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/CompositeAttributeMapper.java
+++ b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/CompositeAttributeMapper.java
@@ -19,7 +19,6 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -37,7 +36,6 @@
  *
  */
 public final class CompositeAttributeMapper implements AttributeMapper {
-    private final Set<String> allLDAPAttributes = new LinkedHashSet<String>();
     private final List<AttributeMapper> attributeMappers = new LinkedList<AttributeMapper>();
 
     /**
@@ -50,23 +48,15 @@
 
     public CompositeAttributeMapper addMapper(AttributeMapper mapper) {
         attributeMappers.add(mapper);
-        mapper.getLDAPAttributes(allLDAPAttributes);
         return this;
     }
 
     /**
      * {@inheritDoc}
      */
-    public void getLDAPAttributes(Set<String> ldapAttributes) {
-        ldapAttributes.addAll(allLDAPAttributes);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void getLDAPAttributes(Set<String> ldapAttributes, JsonPointer resourceAttribute) {
+    public void getLDAPAttributes(JsonPointer jsonAttribute, Set<String> ldapAttributes) {
         for (AttributeMapper attribute : attributeMappers) {
-            attribute.getLDAPAttributes(ldapAttributes, resourceAttribute);
+            attribute.getLDAPAttributes(jsonAttribute, ldapAttributes);
         }
     }
 

--
Gitblit v1.10.0