From d89aacc0431eab3dce367e8fe9575eb8f83aa535 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 08 Feb 2013 11:37:59 +0000
Subject: [PATCH] Checkpoint changes: clean up APIs, separate out MVCC and naming strategies.

---
 opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/AttributeMapper.java |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/AttributeMapper.java b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/AttributeMapper.java
index 9240bac..cdb9c5c 100644
--- a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/AttributeMapper.java
+++ b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/AttributeMapper.java
@@ -30,7 +30,15 @@
  * An attribute mapper is responsible for converting JSON values to and from
  * LDAP attributes.
  */
-public interface AttributeMapper {
+public abstract class AttributeMapper {
+    /*
+     * This interface is an abstract class so that methods can be made package
+     * private until API is finalized.
+     */
+
+    AttributeMapper() {
+        // Nothing to do.
+    }
 
     /**
      * Adds the names of the LDAP attributes required by this attribute mapper
@@ -48,7 +56,7 @@
      *            The set into which the required LDAP attribute names should be
      *            put.
      */
-    void getLDAPAttributes(Context c, JsonPointer jsonAttribute, Set<String> ldapAttributes);
+    abstract void getLDAPAttributes(Context c, JsonPointer jsonAttribute, Set<String> ldapAttributes);
 
     /**
      * Transforms the provided REST comparison filter parameters to an LDAP
@@ -80,8 +88,8 @@
      * @param h
      *            The result handler.
      */
-    void getLDAPFilter(Context c, FilterType type, JsonPointer jsonAttribute, String operator,
-            Object valueAssertion, ResultHandler<Filter> h);
+    abstract void getLDAPFilter(Context c, FilterType type, JsonPointer jsonAttribute,
+            String operator, Object valueAssertion, ResultHandler<Filter> h);
 
     /**
      * Transforms attributes contained in the provided LDAP entry to JSON
@@ -99,7 +107,7 @@
      * @param h
      *            The result handler.
      */
-    void toJSON(Context c, Entry e, ResultHandler<Map<String, Object>> h);
+    abstract void toJSON(Context c, Entry e, ResultHandler<Map<String, Object>> h);
 
     /**
      * Transforms JSON content in the provided JSON value to LDAP attributes,
@@ -116,7 +124,7 @@
      * @param h
      *            The result handler.
      */
-    void toLDAP(Context c, JsonValue v, ResultHandler<List<Attribute>> h);
+    abstract void toLDAP(Context c, JsonValue v, ResultHandler<List<Attribute>> h);
 
     // TODO: methods for obtaining schema information (e.g. name, description,
     // type information).

--
Gitblit v1.10.0