* Revised all JavaDocs impacted by recent changes at this branch.
* Renamed parameters to be more comprehensive
* Renamed getMatchedDn to getMatchedName (but this name is still ambiguous for me.)
* Made the access modifier of some internal classes to 'package'.

git-svn-id: https://svn.apache.org/repos/asf/directory/apacheds/branches/db_refactor@193167 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/src/main/java/org/apache/ldap/server/authn/AuthenticationService.java b/core/src/main/java/org/apache/ldap/server/authn/AuthenticationService.java
index c0b34c4..e8d7d13 100644
--- a/core/src/main/java/org/apache/ldap/server/authn/AuthenticationService.java
+++ b/core/src/main/java/org/apache/ldap/server/authn/AuthenticationService.java
@@ -185,10 +185,10 @@
     }
 
 
-    public Name getMatchedDn( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+    public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
     {
         authenticate();
-        return next.getMatchedDn( dn, normalized );
+        return next.getMatchedName( dn, normalized );
     }
 
 
diff --git a/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java b/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java
index 9dc849c..8a371d6 100644
--- a/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java
+++ b/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java
@@ -345,7 +345,7 @@
                 e = new LdapNameNotFoundException( dn.toString() );
             }
 
-            e.setResolvedName( nexus.getMatchedDn( dn, false ) );
+            e.setResolvedName( nexus.getMatchedName( dn, false ) );
             throw e;
         }
     }
diff --git a/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java b/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java
index 417ff38..b44cb6a 100644
--- a/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java
+++ b/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java
@@ -105,9 +105,9 @@
     }
 
 
-    public Name getMatchedDn( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+    public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
     {
-        return next.getMatchedDn( dn, normalized );
+        return next.getMatchedName( dn, normalized );
     }
 
 
diff --git a/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java b/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java
index 8ea7259..29eae32 100644
--- a/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java
+++ b/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java
@@ -117,13 +117,13 @@
      */
     Attributes getRootDSE( NextInterceptor next ) throws NamingException; 
     /**
-     * Filters {@link ContextPartitionNexus#getMatchedDn(Name, boolean)} call.
+     * Filters {@link ContextPartitionNexus#getMatchedName(Name, boolean)} call.
      */
-    Name getMatchedDn( NextInterceptor next, Name dn, boolean normalized ) throws NamingException;
+    Name getMatchedName( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
     /**
      * Filters {@link ContextPartitionNexus#getSuffix(Name, boolean)} call.
      */
-    Name getSuffix( NextInterceptor next, Name dn, boolean normalized ) throws NamingException;
+    Name getSuffix( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
     /**
      * Filters {@link ContextPartitionNexus#listSuffixes(boolean)} call.
      */
@@ -135,24 +135,24 @@
     /**
      * Filters {@link ContextPartition#add(String, Name, Attributes)} call.
      */
-    void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException;
+    void add( NextInterceptor next, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
     /**
      * Filters {@link ContextPartition#modify(Name, int, Attributes)} call.
      */
-    void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException;
+    void modify( NextInterceptor next, Name name, int modOp, Attributes attributes ) throws NamingException;
     /**
      * Filters {@link ContextPartition#modify(Name, ModificationItem[])} call.
      */
-    void modify( NextInterceptor next, Name name, ModificationItem [] mods ) throws NamingException;
+    void modify( NextInterceptor next, Name name, ModificationItem [] items ) throws NamingException;
     /**
      * Filters {@link ContextPartition#list(Name)} call.
      */
-    NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException;
+    NamingEnumeration list( NextInterceptor next, Name baseName ) throws NamingException;
     /**
      * Filters {@link ContextPartition#search(Name, Map, ExprNode, SearchControls)} call.
      */
-    NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
-                              SearchControls searchCtls ) throws NamingException;
+    NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter,
+                              SearchControls searchControls ) throws NamingException;
     /**
      * Filters {@link ContextPartition#lookup(Name)} call.
      */
@@ -176,10 +176,10 @@
     /**
      * Filters {@link ContextPartition#move(Name, Name)} call.
      */
-    void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException;
+    void move( NextInterceptor next, Name oldName, Name newParentName ) throws NamingException;
     /**
      * Filters {@link ContextPartition#move(Name, Name, String, boolean)} call.
      */
-    void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn,
+    void move( NextInterceptor next, Name oldName, Name newParentName, String newRn,
                boolean deleteOldRn ) throws NamingException;
 }
diff --git a/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java b/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
index 38fd281..9afe6e1 100644
--- a/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
+++ b/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
@@ -69,9 +69,9 @@
         }

 

 

-        public Name getMatchedDn( NextInterceptor next, Name dn, boolean normalized ) throws NamingException

+        public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException

         {

-            return ( Name ) nexus.getMatchedDn( dn, normalized ).clone();

+            return ( Name ) nexus.getMatchedName( dn, normalized ).clone();

         }

 

 

@@ -380,13 +380,13 @@
     }

 

 

-    public Name getMatchedDn( Name dn, boolean normalized ) throws NamingException

+    public Name getMatchedName( Name name, boolean normalized ) throws NamingException

     {

         Interceptor head = this.head.configuration.getInterceptor();

         NextInterceptor next = this.head.nextInterceptor;

         try

         {

-            return head.getMatchedDn( next, dn, normalized );

+            return head.getMatchedName( next, name, normalized );

         }

         catch ( NamingException ne )

         {

@@ -400,13 +400,13 @@
     }

 

 

-    public Name getSuffix( Name dn, boolean normalized ) throws NamingException

+    public Name getSuffix( Name name, boolean normalized ) throws NamingException

     {

         Interceptor head = this.head.configuration.getInterceptor();

         NextInterceptor next = this.head.nextInterceptor;

         try

         {

-            return head.getSuffix( next, dn, normalized );

+            return head.getSuffix( next, name, normalized );

         }

         catch ( NamingException ne )

         {

@@ -742,13 +742,13 @@
                     }

                 }

 

-                public Name getMatchedDn( Name dn, boolean normalized ) throws NamingException

+                public Name getMatchedName( Name dn, boolean normalized ) throws NamingException

                 {

                     Interceptor interceptor = Entry.this.nextEntry.configuration.getInterceptor();

 

                     try

                     {

-                        return interceptor.getMatchedDn( Entry.this.nextEntry.nextInterceptor, dn, normalized );

+                        return interceptor.getMatchedName( Entry.this.nextEntry.nextInterceptor, dn, normalized );

                     }

                     catch ( NamingException ne )

                     {

diff --git a/core/src/main/java/org/apache/ldap/server/interceptor/NextInterceptor.java b/core/src/main/java/org/apache/ldap/server/interceptor/NextInterceptor.java
index de26273..7230d90 100644
--- a/core/src/main/java/org/apache/ldap/server/interceptor/NextInterceptor.java
+++ b/core/src/main/java/org/apache/ldap/server/interceptor/NextInterceptor.java
@@ -45,13 +45,13 @@
      */

     Attributes getRootDSE() throws NamingException; 

     /**

-     * Calls the next interceptor's {@link Interceptor#getMatchedDn(NextInterceptor, Name, boolean)}.

+     * Calls the next interceptor's {@link Interceptor#getMatchedName(NextInterceptor, Name, boolean)}.

      */

-    Name getMatchedDn( Name dn, boolean normalized ) throws NamingException;

+    Name getMatchedName( Name name, boolean normalized ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#getSuffix(NextInterceptor, Name, boolean)}.

      */

-    Name getSuffix( Name dn, boolean normalized ) throws NamingException;

+    Name getSuffix( Name name, boolean normalized ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#listSuffixes(NextInterceptor, boolean)}.

      */

@@ -63,24 +63,24 @@
     /**

      * Calls the next interceptor's {@link Interceptor#add(NextInterceptor, String, Name, Attributes)}.

      */

-    void add( String upName, Name normName, Attributes entry ) throws NamingException;

+    void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, int, Attributes)}.

      */

-    void modify( Name name, int modOp, Attributes mods ) throws NamingException;

+    void modify( Name name, int modOp, Attributes attributes ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, ModificationItem[])}.

      */

-    void modify( Name name, ModificationItem [] mods ) throws NamingException;

+    void modify( Name name, ModificationItem[] items ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#list(NextInterceptor, Name)}.

      */

-    NamingEnumeration list( Name base ) throws NamingException;

+    NamingEnumeration list( Name baseName ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#search(NextInterceptor, Name, Map, ExprNode, SearchControls)}.

      */

-    NamingEnumeration search( Name base, Map env, ExprNode filter,

-                              SearchControls searchCtls ) throws NamingException;

+    NamingEnumeration search( Name baseName, Map environment, ExprNode filter,

+                              SearchControls searchControls ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name)}.

      */

@@ -88,7 +88,7 @@
     /**

      * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name, String[])}.

      */

-    Attributes lookup( Name dn, String [] attrIds ) throws NamingException;

+    Attributes lookup( Name name, String [] attrIds ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#hasEntry(NextInterceptor, Name)}.

      */

@@ -104,10 +104,10 @@
     /**

      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name)}.

      */

-    void move( Name oriChildName, Name newParentName ) throws NamingException;

+    void move( Name oldName, Name newParentName ) throws NamingException;

     /**

      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name, String, boolean)}.

      */

-    void move( Name oriChildName, Name newParentName, String newRn,

+    void move( Name oldName, Name newParentName, String newRn,

                boolean deleteOldRn ) throws NamingException;

 }

diff --git a/core/src/main/java/org/apache/ldap/server/jndi/ContextPartitionNexusProxy.java b/core/src/main/java/org/apache/ldap/server/jndi/ContextPartitionNexusProxy.java
index 495da23..5cc272d 100644
--- a/core/src/main/java/org/apache/ldap/server/jndi/ContextPartitionNexusProxy.java
+++ b/core/src/main/java/org/apache/ldap/server/jndi/ContextPartitionNexusProxy.java
@@ -99,14 +99,14 @@
         return this.service.isStarted();
     }
 
-    public Name getMatchedDn(Name dn, boolean normalized) throws NamingException {
+    public Name getMatchedName(Name dn, boolean normalized) throws NamingException {
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation(
                 caller, "getMatchedDn",
                 new Object[] { dn, normalized? Boolean.TRUE : Boolean.FALSE } ) );
         try
         {
-            return this.configuration.getInterceptorChain().getMatchedDn( dn, normalized );
+            return this.configuration.getInterceptorChain().getMatchedName( dn, normalized );
         }
         finally
         {
diff --git a/core/src/main/java/org/apache/ldap/server/normalization/NormalizationService.java b/core/src/main/java/org/apache/ldap/server/normalization/NormalizationService.java
index e18c6ac..c09e561 100644
--- a/core/src/main/java/org/apache/ldap/server/normalization/NormalizationService.java
+++ b/core/src/main/java/org/apache/ldap/server/normalization/NormalizationService.java
@@ -221,14 +221,14 @@
     // ------------------------------------------------------------------------
 
 
-    public Name getMatchedDn( NextInterceptor nextInterceptor, Name name, boolean normalized ) throws NamingException
+    public Name getMatchedName( NextInterceptor nextInterceptor, Name name, boolean normalized ) throws NamingException
     {
         synchronized( parser )
         {
             name = parser.parse( name.toString() );
         }
 
-        return nextInterceptor.getMatchedDn( name, normalized );
+        return nextInterceptor.getMatchedName( name, normalized );
     }
 
 
diff --git a/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java b/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
index e1c7e68..8906fd2 100644
--- a/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
+++ b/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
@@ -19,6 +19,7 @@
 

 import java.util.Map;

 

+import javax.naming.Context;

 import javax.naming.Name;

 import javax.naming.NamingEnumeration;

 import javax.naming.NamingException;

@@ -33,9 +34,12 @@
 

 

 /**

- * ContextPartitions are indivisible ContextPartitions associated with a naming

- * context as a base suffix.  All JNDI Attributes entries at and under the

- * context of this suffix are stored within this partition.

+ * An interfaces that bridges between underlying JNDI entries and JNDI

+ * {@link Context} API.  DIT (Directory Information Tree) consists one or

+ * above {@link ContextPartition}s whose parent is {@link ContextPartitionNexus},

+ * and all of them are mapped to different

+ * base suffix.  Each partition contains entries whose name ends with that

+ * base suffix.

  *

  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

  * @version $Rev$

@@ -58,8 +62,7 @@
     

     

     /**

-     * Closes or shuts down this ContextPartition.  Operations against closed

-     * ContextPartitions will fail.

+     * Deinitialized this partition.

      */

     void destroy();

 

@@ -69,9 +72,7 @@
     boolean isInitialized();

 

     /**

-     * Cue to ContextPartitions with caches to flush entry and index changes to disk.

-     *

-     * @throws NamingException if there are problems flushing caches

+     * Flushes any changes made to this partition now.

      */

     void sync() throws NamingException;

 

@@ -102,12 +103,12 @@
     /**

      * Adds an entry to this ContextPartition.

      *

-     * @param upName the user provided distinguished/absolute name of the entry

-     * @param normName the normalized distinguished/absolute name of the entry

+     * @param userProvidedName the user provided distinguished/absolute name of the entry

+     * @param normalizedName the normalized distinguished/absolute name of the entry

      * @param entry the entry to add to this ContextPartition

      * @throws NamingException if there are any problems

      */

-    void add( String upName, Name normName, Attributes entry ) throws NamingException;

+    void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;

 

     /**

      * Modifies an entry by adding, removing or replacing a set of attributes.

@@ -117,7 +118,7 @@
      * @param modOp the modification operation to perform on the entry which

      * is one of constants specified by the DirContext interface:

      * <code>ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE</code>.

-     * @param mods the attributes and their values used to affect the

+     * @param attributes the attributes and their values used to affect the

      * modification with.

      * @throws NamingException if there are any problems

      * @see javax.naming.directory.DirContext

@@ -125,18 +126,18 @@
      * @see javax.naming.directory.DirContext#REMOVE_ATTRIBUTE

      * @see javax.naming.directory.DirContext#REPLACE_ATTRIBUTE

      */

-    void modify( Name name, int modOp, Attributes mods ) throws NamingException;

+    void modify( Name name, int modOp, Attributes attributes ) throws NamingException;

 

     /**

      * Modifies an entry by using a combination of adds, removes or replace 

      * operations using a set of ModificationItems.

      *

      * @param name the normalized distinguished/absolute name of the entry to modify

-     * @param mods the ModificationItems used to affect the modification with

+     * @param items the ModificationItems used to affect the modification with

      * @throws NamingException if there are any problems

      * @see ModificationItem

      */

-    void modify( Name name, ModificationItem [] mods ) throws NamingException;

+    void modify( Name name, ModificationItem [] items ) throws NamingException;

 

     /**

      * A specialized form of one level search used to return a minimal set of 

@@ -144,11 +145,11 @@
      * used to optimize operations rather than conducting a full search with 

      * retrieval.

      *

-     * @param base the base distinguished/absolute name for the search/listing

+     * @param baseName the base distinguished/absolute name for the search/listing

      * @return a NamingEnumeration containing objects of type {@link SearchResult}

      * @throws NamingException if there are any problems

      */

-    NamingEnumeration list( Name base ) throws NamingException;

+    NamingEnumeration list( Name baseName ) throws NamingException;

     

     /**

      * Conducts a search against this ContextPartition.  Namespace specific

@@ -158,17 +159,17 @@
      * namespace specific or implementation specific key for the set of LDAP

      * Controls.

      *

-     * @param base the normalized distinguished/absolute name of the search base

-     * @param env the environment under which operation occurs

+     * @param baseName the normalized distinguished/absolute name of the search base

+     * @param environment the environment under which operation occurs

      * @param filter the root node of the filter expression tree

-     * @param searchCtls the search controls

+     * @param searchControls the search controls

      * @throws NamingException if there are any problems

      * @return a NamingEnumeration containing objects of type 

      * <a href="http://java.sun.com/j2se/1.4.2/docs/api/

      * javax/naming/directory/SearchResult.html">SearchResult</a>.

      */

-    NamingEnumeration search( Name base, Map env, ExprNode filter,

-        SearchControls searchCtls ) throws NamingException;

+    NamingEnumeration search( Name baseName, Map environment, ExprNode filter,

+        SearchControls searchControls ) throws NamingException;

 

     /**

      * Looks up an entry by distinguished/absolute name.  This is a simplified

@@ -187,12 +188,12 @@
      * convenience with a set of attributes to return.  If the attributes is

      * null or empty, the returned entry will contain all attributes.

      *

-     * @param dn the normalized distinguished name of the object to lookup

+     * @param name the normalized distinguished name of the object to lookup

      * @param attrIds the set of attributes to return

      * @return an Attributes object representing the entry

      * @throws NamingException if there are any problems

      */

-    Attributes lookup( Name dn, String [] attrIds ) throws NamingException;

+    Attributes lookup( Name name, String [] attrIds ) throws NamingException;

 

     /**

      * Fast operation to check and see if a particular entry exists.

@@ -235,11 +236,11 @@
      *

      * @param newParentName the normalized distinguished/absolute name of the

      * new parent to move the target entry to

-     * @param oriChildName the normalized distinguished/absolute name of the

+     * @param oldName the normalized distinguished/absolute name of the

      * original child name representing the child entry to move

      * @throws NamingException if there are any problems

      */

-    void move( Name oriChildName, Name newParentName ) throws NamingException;

+    void move( Name oldName, Name newParentName ) throws NamingException;

 

     /**

      * Transplants a child entry, to a position in the namespace under a new

@@ -249,7 +250,7 @@
      * namespace this parameters is ignored.  An example of a namespace where

      * this parameter is significant is the LDAP namespace.

      *

-     * @param oriChildName the normalized distinguished/absolute name of the

+     * @param oldName the normalized distinguished/absolute name of the

      * original child name representing the child entry to move

      * @param newParentName the normalized distinguished/absolute name of the

      * new parent to move the targeted entry to

@@ -258,6 +259,6 @@
      * from the entry if set to true, and has no affect if set to false

      * @throws NamingException if there are any problems

      */

-    void move( Name oriChildName, Name newParentName, String newRn,

+    void move( Name oldName, Name newParentName, String newRn,

                boolean deleteOldRn ) throws NamingException;

 }

diff --git a/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java b/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java
index 0459caf..1615d3f 100755
--- a/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java
+++ b/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java
@@ -28,23 +28,13 @@
 
 
 /**
- * The PartitionNexus is a special type of ContextPartition designed to route
- * ContextPartition operations to ContextPartitions based on namespace to respective
- * ContextPartitions attached to the nexus at the appropriate naming contexts.
- * These naming contexts are also the suffixes of ContextPartitions.  All
- * entries within a ContextPartition have the same suffix.  The PartitionNexus
- * is a singleton where as ContextPartitions can be many hanging off of
- * different contexts on the nexus.
- *
- * The PartitionNexus routes or proxies ContextPartition calls to the appropriate
- * PartitionContext implementation.  It also provides some extended operations
- * for the entire backend apparatus like listing the various naming contexts or
- * partition suffixes within the system.  The nexus is also responsibe for
- * returning the entry Attributes for the root DSE when the approapriate search
- * is conducted: empty filter String and base scope search.
+ * A root {@link ContextPartition} that contains all other partitions, and
+ * routes all operations to the child partition that matches to its base suffixes.
+ * It also provides some extended operations such as accessing rootDSE and
+ * listing base suffixes.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
+ * @version $Rev$, $Date$
  */
 public abstract class ContextPartitionNexus implements ContextPartition
 {
@@ -58,6 +48,7 @@
     public final static String USERS_BASE_NAME = "ou=users,ou=system";
     /** the base dn under which all groups reside */
     public final static String GROUPS_BASE_NAME = "ou=groups,ou=system";
+
     /**
      * System backend suffix constant.  Should be kept down to a single Dn name 
      * component or the default constructor will have to parse it instead of 
@@ -148,7 +139,7 @@
     /**
      * Gets the most significant Dn that exists within the server for any Dn.
      *
-     * @param dn the normalized distinguished name to use for matching.
+     * @param name the normalized distinguished name to use for matching.
      * @param normalized boolean if true cause the return of a normalized Dn,
      * if false it returns the original user provided distinguished name for 
      * the matched portion of the Dn as it was provided on entry creation.
@@ -157,14 +148,14 @@
      * the empty string distinguished name if no match was found.
      * @throws NamingException if there are any problems
      */
-    public abstract Name getMatchedDn( Name dn, boolean normalized ) throws NamingException;
+    public abstract Name getMatchedName( Name name, boolean normalized ) throws NamingException;
 
     /**
      * Gets the distinguished name of the suffix that would hold an entry with
      * the supplied distinguished name parameter.  If the DN argument does not
      * fall under a partition suffix then the empty string Dn is returned.
      *
-     * @param dn the normalized distinguished name to use for finding a suffix.
+     * @param name the normalized distinguished name to use for finding a suffix.
      * @param normalized if true causes the return of a normalized Dn, but
      * if false it returns the original user provided distinguished name for 
      * the suffix Dn as it was provided on suffix entry creation.
@@ -172,7 +163,7 @@
      * naming context was found for dn.
      * @throws NamingException if there are any problems
      */
-    public abstract Name getSuffix( Name dn, boolean normalized ) throws NamingException;
+    public abstract Name getSuffix( Name name, boolean normalized ) throws NamingException;
 
     /**
      * Gets an iteration over the Name suffixes of the Backends managed by this
diff --git a/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java b/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
index 7194658..8aaa55b 100644
--- a/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
+++ b/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
@@ -62,8 +62,6 @@
  * A nexus for partitions dedicated for storing entries specific to a naming
  * context.
  * 
- * TODO init() should initialize all mounted child partitions. (destroy too)
- *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
@@ -352,9 +350,9 @@
 
 
     /**
-     * @see ContextPartitionNexus#getMatchedDn(javax.naming.Name, boolean)
+     * @see ContextPartitionNexus#getMatchedName(javax.naming.Name, boolean)
      */
-    public Name getMatchedDn( Name dn, boolean normalized ) throws NamingException
+    public Name getMatchedName( Name dn, boolean normalized ) throws NamingException
     {
         dn = ( Name ) dn.clone();
 
diff --git a/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java b/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
index cc0721d..3c24a64 100644
--- a/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
+++ b/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
@@ -47,9 +47,7 @@
 
 
 /**
- * An Abstract ContextPartition using a formal database and a search engine.  All
- * the common code between a SystemContextPartition and a DefaultContextPartition
- * will be added to this super class.
+ * An abstract {@link ContextPartition} that uses general BTree operations.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
diff --git a/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java b/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
index cdd3afa..7cdcdcf 100644
--- a/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
+++ b/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
@@ -59,7 +59,8 @@
 
 
 /**
- * A Database implementation based on JDBM B+Tree implementation.
+ * A {@link ContextPartition} that stores entries in
+ * <a href="http://jdbm.sourceforge.net/">JDBM</a> database.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
diff --git a/core/src/main/java/org/apache/ldap/server/prefs/PreferencesUtils.java b/core/src/main/java/org/apache/ldap/server/prefs/PreferencesUtils.java
index b804b53..914c751 100644
--- a/core/src/main/java/org/apache/ldap/server/prefs/PreferencesUtils.java
+++ b/core/src/main/java/org/apache/ldap/server/prefs/PreferencesUtils.java
@@ -29,7 +29,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class PreferencesUtils
+class PreferencesUtils
 {
     /** the dn base of the system preference hierarchy */
     static final String SYSPREF_BASE = "prefNodeName=sysPrefRoot,ou=system";
diff --git a/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferenceException.java b/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferenceException.java
index 56ed43c..b7562bc 100644
--- a/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferenceException.java
+++ b/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferenceException.java
@@ -21,7 +21,7 @@
 
 /**
  * A {@link RuntimeException} that is thrown when accessing
- * {@link org.apache.ldap.server.prefs.ServerSystemPreferences} failed.
+ * {@link ServerSystemPreferences} failed.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
diff --git a/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferences.java b/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferences.java
index 2c20963..076542a 100644
--- a/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferences.java
+++ b/core/src/main/java/org/apache/ldap/server/prefs/ServerSystemPreferences.java
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.prefs.AbstractPreferences;
 import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
 
 import javax.naming.Context;
 import javax.naming.NameClassPair;
@@ -47,7 +48,7 @@
 
 
 /**
- * A server side system Perferences implementation.  This implementation
+ * A server side system {@link Preferences} implementation.  This implementation
  * presumes the creation of a root system preferences node in advance.  This
  * should be included with the system.ldif that is packaged with the server.
  *