directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r411687 [1/2] - in /directory/branches/apacheds/optimization: core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/authn/ core/src/main/java/org/apache/directory/server/core/authz/ core/sr...
Date Mon, 05 Jun 2006 06:03:55 GMT
Author: akarasulu
Date: Sun Jun  4 23:03:54 2006
New Revision: 411687

URL: http://svn.apache.org/viewvc?rev=411687&view=rev
Log:
Converted the following signatures on DirectoryPartition to take LdapDN 
parameters and return LdapDN parameters rather than a javax.naming.Name:

 o LdapDN getSuffix()
 o void delete( LdapDN )
 o void add( LdapDN name, Attributes entry )
 o void modify( LdapDN name, int modOp, Attributes attributes )
 o void modify( LdapDN name, ModificationItem[] items )
 o void modifyRn( LdapDN name, String newRn, boolean deleteOldRn )
 o void move( LdapDN oldName, LdapDN newParentName )
 o void move( LdapDN oldName, LdapDN newParentName, String newRn, bool ... )  

Note that this caused changes through the interceptor stack all the way into
the JNDI implemenation.


Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexusProxy.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeDirectoryPartition.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
    directory/branches/apacheds/optimization/server-sar/   (props changed)

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sun Jun  4 23:03:54 2006
@@ -441,7 +441,7 @@
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
             attributes.put( "displayName", "Directory Superuser" );
 
-            partitionNexus.add( DirectoryPartitionNexus.ADMIN_PRINCIPAL, DirectoryPartitionNexus.getAdminName(),
+            partitionNexus.add(DirectoryPartitionNexus.getAdminName(),
                 attributes );
         }
 
@@ -463,7 +463,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=users,ou=system", new LdapDN( "ou=users,ou=system" ), attributes );
+            partitionNexus.add(new LdapDN( "ou=users,ou=system" ), attributes );
         }
 
         // -------------------------------------------------------------------
@@ -484,7 +484,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=groups,ou=system", new LdapDN( "ou=groups,ou=system" ), attributes );
+            partitionNexus.add(new LdapDN( "ou=groups,ou=system" ), attributes );
         }
 
         // -------------------------------------------------------------------
@@ -492,7 +492,7 @@
         // -------------------------------------------------------------------
 
         String upName = "cn=Administrators,ou=groups,ou=system";
-        Name normName = new LdapDN( "cn=administrators,ou=groups,ou=system" );
+        LdapDN normName = new LdapDN( "cn=administrators,ou=groups,ou=system" );
         if ( !partitionNexus.hasEntry( normName ) )
         {
             firstStart = true;
@@ -507,7 +507,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( upName, normName, attributes );
+            partitionNexus.add(normName, attributes );
             AuthorizationService authzSrvc = ( AuthorizationService ) interceptorChain.get( "authorizationService" );
             authzSrvc.cacheNewGroup( upName, normName, attributes );
         }
@@ -530,7 +530,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=configuration,ou=system", new LdapDN( "ou=configuration,ou=system" ), attributes );
+            partitionNexus.add(new LdapDN( "ou=configuration,ou=system" ), attributes );
         }
 
         // -------------------------------------------------------------------
@@ -551,7 +551,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=partitions,ou=configuration,ou=system", new LdapDN(
+            partitionNexus.add(new LdapDN(
                 "ou=partitions,ou=configuration,ou=system" ), attributes );
         }
 
@@ -573,7 +573,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=services,ou=configuration,ou=system", new LdapDN(
+            partitionNexus.add(new LdapDN(
                 "ou=services,ou=configuration,ou=system" ), attributes );
         }
 
@@ -595,7 +595,7 @@
             attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            partitionNexus.add( "ou=interceptors,ou=configuration,ou=system", new LdapDN(
+            partitionNexus.add(new LdapDN(
                 "ou=interceptors,ou=configuration,ou=system" ), attributes );
         }
 
@@ -620,7 +620,7 @@
 
             LdapDN dn = new LdapDN( "prefNodeName=sysPrefRoot,ou=system" );
 
-            partitionNexus.add( "prefNodeName=sysPrefRoot,ou=system", dn, attributes );
+            partitionNexus.add(dn, attributes );
         }
 
         return firstStart;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Sun Jun  4 23:03:54 2006
@@ -44,6 +44,7 @@
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -182,19 +183,20 @@
     }
 
 
-    public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+    public void add( NextInterceptor next, LdapDN normName, Attributes entry ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {
-            log.debug( "Adding the entry " + AttributeUtils.toString( entry ) + " for DN = '" + upName + "'" );
+            log.debug( "Adding the entry " + AttributeUtils.toString( entry ) + " for DN = '"
+                    + normName.toUpName() + "'" );
         }
 
         checkAuthenticated();
-        next.add( upName, normName, entry );
+        next.add(normName, entry );
     }
 
 
-    public void delete( NextInterceptor next, Name name ) throws NamingException
+    public void delete( NextInterceptor next, LdapDN name ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {
@@ -314,7 +316,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {
@@ -326,7 +328,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {
@@ -338,7 +340,7 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {
@@ -351,7 +353,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         if ( log.isDebugEnabled() )
@@ -365,7 +367,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         if ( log.isDebugEnabled() )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Sun Jun  4 23:03:54 2006
@@ -327,7 +327,7 @@
      * -------------------------------------------------------------------------------
      */
 
-    public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+    public void add(NextInterceptor next, LdapDN normName, Attributes entry) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -337,16 +337,16 @@
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.add( upName, normName, entry );
+            next.add(normName, entry );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
         {
-            next.add( upName, normName, entry );
-            tupleCache.subentryAdded( upName, normName, entry );
-            groupCache.groupAdded( upName, normName, entry );
+            next.add(normName, entry );
+            tupleCache.subentryAdded( normName.toUpName(), normName, entry );
+            groupCache.groupAdded( normName.toUpName(), normName, entry );
             return;
         }
 
@@ -386,16 +386,16 @@
         }
 
         // if we've gotten this far then access has been granted
-        next.add( upName, normName, entry );
+        next.add(normName, entry );
 
         // if the entry added is a subentry or a groupOf[Unique]Names we must
         // update the ACITuple cache and the groups cache to keep them in sync
-        tupleCache.subentryAdded( upName, normName, entry );
-        groupCache.groupAdded( upName, normName, entry );
+        tupleCache.subentryAdded( normName.toUpName(), normName, entry );
+        groupCache.groupAdded( normName.toUpName(), normName, entry );
     }
 
 
-    public void delete( NextInterceptor next, Name name ) throws NamingException
+    public void delete( NextInterceptor next, LdapDN name ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -435,7 +435,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -500,7 +500,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -602,7 +602,7 @@
      * perms to attributes and their values results in their removal when returning
      * the entry.
      *
-     * @param user the user associated with the call
+     * @param principal the user associated with the call
      * @param dn the name of the entry being looked up
      * @param entry the raw entry pulled from the nexus
      * @throws NamingException
@@ -675,7 +675,7 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -747,7 +747,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
@@ -824,7 +824,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Sun Jun  4 23:03:54 2006
@@ -45,6 +45,7 @@
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.name.DnParser;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -102,7 +103,7 @@
     //    Lookup, search and list operations need to be handled using a filter
     // and so we need access to the filter service.
 
-    public void delete( NextInterceptor nextInterceptor, Name name ) throws NamingException
+    public void delete( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
     {
         if ( !enabled )
         {
@@ -168,7 +169,7 @@
      * users to self access these resources.  As far as we're concerned no one but
      * the admin needs access.
      */
-    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs )
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs )
         throws NamingException
     {
         if ( enabled )
@@ -186,7 +187,7 @@
      * self access these resources.  As far as we're concerned no one but the admin
      * needs access.
      */
-    public void modify( NextInterceptor nextInterceptor, Name name, ModificationItem[] items ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItem[] items ) throws NamingException
     {
         if ( enabled )
         {
@@ -246,7 +247,7 @@
     //  o The administrator entry cannot be moved or renamed by anyone
     // ------------------------------------------------------------------------
 
-    public void modifyRn( NextInterceptor nextInterceptor, Name name, String newRn, boolean deleteOldRn )
+    public void modifyRn( NextInterceptor nextInterceptor, LdapDN name, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         if ( enabled )
@@ -257,7 +258,7 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         if ( enabled )
         {
@@ -267,8 +268,8 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName, String newRn,
-        boolean deleteOldRn ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName, String newRn,
+                      boolean deleteOldRn ) throws NamingException
     {
         if ( enabled )
         {
@@ -395,7 +396,7 @@
 
 
     public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
-        SearchControls searchCtls ) throws NamingException
+                                     SearchControls searchCtls ) throws NamingException
     {
         NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
         if ( !enabled )
@@ -454,8 +455,8 @@
         {
             if ( dn.size() > 2 )
             {
-            	if ( ( dn.startsWith( USER_BASE_DN ) && ( !dn.equals( principalDn )  )) || dn.startsWith( GROUP_BASE_DN ) )
-            	{
+                if ( ( dn.startsWith( USER_BASE_DN ) && ( !dn.equals( principalDn )  )) || dn.startsWith( GROUP_BASE_DN ) )
+                {
                     return false;
                 }
             }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java Sun Jun  4 23:03:54 2006
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.ScopeNode;
 import org.apache.directory.shared.ldap.message.DerefAliasesEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.Name;
 import javax.naming.NamingException;
@@ -142,9 +143,9 @@
     }
 
 
-    public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+    public void add( NextInterceptor next, LdapDN normName, Attributes entry ) throws NamingException
     {
-        super.add( next, upName, normName, entry );
+        super.add( next, normName, entry );
         Set selecting = getSelectingSources( normName, entry );
         if ( selecting.isEmpty() )
         {
@@ -160,7 +161,7 @@
             if ( listener instanceof NamespaceChangeListener )
             {
                 NamespaceChangeListener nclistener = ( NamespaceChangeListener ) listener;
-                Binding binding = new Binding( upName, entry, false );
+                Binding binding = new Binding( normName.toUpName(), entry, false );
                 nclistener.objectAdded( new NamingEvent( rec.getEventContext(), NamingEvent.OBJECT_ADDED, binding,
                     null, entry ) );
             }
@@ -168,7 +169,7 @@
     }
 
 
-    public void delete( NextInterceptor next, Name name ) throws NamingException
+    public void delete( NextInterceptor next, LdapDN name ) throws NamingException
     {
         Attributes entry = nexus.lookup( name );
         super.delete( next, name );
@@ -222,7 +223,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         DirectoryPartitionNexusProxy proxy = invocation.getProxy();
@@ -240,7 +241,7 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         DirectoryPartitionNexusProxy proxy = invocation.getProxy();
@@ -277,7 +278,7 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         super.modifyRn( next, name, newRn, deleteOldRn );
         Name newName = ( Name ) name.clone();
@@ -287,7 +288,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         super.move( next, oriChildName, newParentName, newRn, deleteOldRn );
@@ -297,7 +298,7 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         super.move( next, oriChildName, newParentName );
         Name newName = ( Name ) newParentName.clone();

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Sun Jun  4 23:03:54 2006
@@ -76,14 +76,14 @@
      * In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.  If it
      * does an exception is raised.
      */
-    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes entry )
+    public void add( NextInterceptor nextInterceptor, LdapDN normName, Attributes entry )
         throws NamingException
     {
         // check if the entry already exists
         if ( nextInterceptor.hasEntry( normName ) )
         {
             NamingException ne = new LdapNameAlreadyBoundException( normName.toString() + " already exists!" );
-            ne.setResolvedName( new LdapDN( upName ) );
+            ne.setResolvedName( new LdapDN( normName.toUpName() ) );
             throw ne;
         }
 
@@ -97,14 +97,14 @@
         Attribute objectClass = attrs.get( "objectClass" );
         if ( objectClass.contains( "alias" ) )
         {
-            String msg = "Attempt to add entry to alias '" + upName + "' not allowed.";
+            String msg = "Attempt to add entry to alias '" + normName.toUpName() + "' not allowed.";
             ResultCodeEnum rc = ResultCodeEnum.ALIASPROBLEM;
             NamingException e = new LdapNamingException( msg, rc );
             e.setResolvedName( parentDn );
             throw e;
         }
 
-        nextInterceptor.add( upName, normName, entry );
+        nextInterceptor.add(normName, entry );
     }
 
 
@@ -112,7 +112,7 @@
      * Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
      * LdapException.
      */
-    public void delete( NextInterceptor nextInterceptor, Name name ) throws NamingException
+    public void delete( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
     {
         // check if entry to delete exists
         String msg = "Attempt to delete non-existant entry: ";
@@ -179,7 +179,7 @@
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs )
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs )
         throws NamingException
     {
         // check if entry to modify exists
@@ -216,7 +216,7 @@
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    public void modify( NextInterceptor nextInterceptor, Name name, ModificationItem[] items ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItem[] items ) throws NamingException
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
@@ -250,7 +250,7 @@
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    public void modifyRn( NextInterceptor nextInterceptor, Name dn, String newRn, boolean deleteOldRn )
+    public void modifyRn( NextInterceptor nextInterceptor, LdapDN dn, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         // check if entry to rename exists
@@ -275,7 +275,7 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
@@ -305,7 +305,7 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName, String newRn,
+    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName, String newRn,
         boolean deleteOldRn ) throws NamingException
     {
         // check if child to move exists

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Sun Jun  4 23:03:54 2006
@@ -37,6 +37,7 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerContext;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -96,13 +97,13 @@
     // Interceptor's Invoke Method
     // ------------------------------------------------------------------------
 
-    public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+    public void add(NextInterceptor next, LdapDN normName, Attributes entry) throws NamingException
     {
-        next.add( upName, normName, entry );
+        next.add(normName, entry );
     }
 
 
-    public void delete( NextInterceptor next, Name name ) throws NamingException
+    public void delete( NextInterceptor next, LdapDN name ) throws NamingException
     {
         next.delete( name );
     }
@@ -162,39 +163,39 @@
     }
 
 
-    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         next.modify( name, modOp, mods );
     }
 
 
-    public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         next.modify( name, mods );
     }
 
 
-    public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         next.modifyRn( name, newRn, deleteOldRn );
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         next.move( oriChildName, newParentName, newRn, deleteOldRn );
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
+    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         next.move( oriChildName, newParentName );
     }
 
 
     public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
-        SearchControls searchCtls ) throws NamingException
+                                     SearchControls searchCtls ) throws NamingException
     {
         return next.search( base, env, filter, searchCtls );
     }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Sun Jun  4 23:03:54 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.server.core.partition.DirectoryPartition;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -158,28 +159,28 @@
 
 
     /**
-     * Filters {@link DirectoryPartition#delete(Name)} call.
+     * Filters {@link DirectoryPartition#delete(org.apache.directory.shared.ldap.name.LdapDN)} call.
      */
-    void delete( NextInterceptor next, Name name ) throws NamingException;
+    void delete( NextInterceptor next, LdapDN name ) throws NamingException;
 
 
     /**
-     * Filters {@link DirectoryPartition#add(String, Name, Attributes)} call.
+     * Filters {@link DirectoryPartition#add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes)} call.
      */
-    void add( NextInterceptor next, String userProvidedName, Name normalizedName, Attributes entry )
+    void add(NextInterceptor next, LdapDN name, Attributes entry)
         throws NamingException;
 
 
     /**
-     * Filters {@link DirectoryPartition#modify(Name, int, Attributes)} call.
+     * Filters {@link DirectoryPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes)} call.
      */
-    void modify( NextInterceptor next, Name name, int modOp, Attributes attributes ) throws NamingException;
+    void modify( NextInterceptor next, LdapDN name, int modOp, Attributes attributes ) throws NamingException;
 
 
     /**
-     * Filters {@link DirectoryPartition#modify(Name, ModificationItem[])} call.
+     * Filters {@link DirectoryPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[])} call.
      */
-    void modify( NextInterceptor next, Name name, ModificationItem[] items ) throws NamingException;
+    void modify( NextInterceptor next, LdapDN name, ModificationItem[] items ) throws NamingException;
 
 
     /**
@@ -192,7 +193,7 @@
      * Filters {@link DirectoryPartition#search(Name, Map, ExprNode, SearchControls)} call.
      */
     NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter,
-        SearchControls searchControls ) throws NamingException;
+                              SearchControls searchControls ) throws NamingException;
 
 
     /**
@@ -220,21 +221,21 @@
 
 
     /**
-     * Filters {@link DirectoryPartition#modifyRn(Name, String, boolean)} call.
+     * Filters {@link DirectoryPartition#modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)} call.
      */
-    void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException;
+    void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException;
 
 
     /**
-     * Filters {@link DirectoryPartition#move(Name, Name)} call.
+     * Filters {@link DirectoryPartition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)} call.
      */
-    void move( NextInterceptor next, Name oldName, Name newParentName ) throws NamingException;
+    void move( NextInterceptor next, LdapDN oldName, LdapDN newParentName ) throws NamingException;
 
 
     /**
-     * Filters {@link DirectoryPartition#move(Name, Name, String, boolean)} call.
+     * Filters {@link DirectoryPartition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean)} call.
      */
-    void move( NextInterceptor next, Name oldName, Name newParentName, String newRn, boolean deleteOldRn )
+    void move( NextInterceptor next, LdapDN oldName, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException;
 
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Sun Jun  4 23:03:54 2006
@@ -36,6 +36,7 @@
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -97,25 +98,25 @@
         }
 
 
-        public void delete( NextInterceptor next, Name name ) throws NamingException
+        public void delete( NextInterceptor next, LdapDN name ) throws NamingException
         {
             nexus.delete( name );
         }
 
 
-        public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+        public void add(NextInterceptor next, LdapDN normName, Attributes entry) throws NamingException
         {
-            nexus.add( upName, normName, entry );
+            nexus.add( normName, entry );
         }
 
 
-        public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
+        public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
         {
             nexus.modify( name, modOp, mods );
         }
 
 
-        public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
+        public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
         {
             nexus.modify( name, mods );
         }
@@ -158,20 +159,20 @@
         }
 
 
-        public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn )
+        public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn )
             throws NamingException
         {
             nexus.modifyRn( name, newRn, deleteOldRn );
         }
 
 
-        public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
+        public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
         {
             nexus.move( oriChildName, newParentName );
         }
 
 
-        public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+        public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
             throws NamingException
         {
             nexus.move( oriChildName, newParentName, newRn, deleteOldRn );
@@ -670,7 +671,7 @@
     }
 
 
-    public void delete( Name name ) throws NamingException
+    public void delete( LdapDN name ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -690,14 +691,14 @@
     }
 
 
-    public void add( String upName, Name normName, Attributes entry ) throws NamingException
+    public void add( LdapDN normName, Attributes entry ) throws NamingException
     {
         Entry node = getStartingEntry();
         Interceptor head = node.configuration.getInterceptor();
         NextInterceptor next = node.nextInterceptor;
         try
         {
-            head.add( next, upName, normName, entry );
+            head.add( next, normName, entry );
         }
         catch ( NamingException ne )
         {
@@ -750,7 +751,7 @@
     }
 
 
-    public void modify( Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -770,7 +771,7 @@
     }
 
 
-    public void modify( Name name, ModificationItem[] mods ) throws NamingException
+    public void modify( LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -917,7 +918,7 @@
     }
 
 
-    public void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -937,7 +938,7 @@
     }
 
 
-    public void move( Name oriChildName, Name newParentName ) throws NamingException
+    public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -957,7 +958,7 @@
     }
 
 
-    public void move( Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException
+    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -1145,7 +1146,7 @@
                 }
 
 
-                public void delete( Name name ) throws NamingException
+                public void delete( LdapDN name ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1165,14 +1166,14 @@
                 }
 
 
-                public void add( String upName, Name normName, Attributes entry ) throws NamingException
+                public void add( LdapDN normName, Attributes entry ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
 
                     try
                     {
-                        interceptor.add( next.nextInterceptor, upName, normName, entry );
+                        interceptor.add( next.nextInterceptor, normName, entry );
                     }
                     catch ( NamingException ne )
                     {
@@ -1185,7 +1186,7 @@
                 }
 
 
-                public void modify( Name name, int modOp, Attributes mods ) throws NamingException
+                public void modify( LdapDN name, int modOp, Attributes mods ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1205,7 +1206,7 @@
                 }
 
 
-                public void modify( Name name, ModificationItem[] mods ) throws NamingException
+                public void modify( LdapDN name, ModificationItem[] mods ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1352,7 +1353,7 @@
                 }
 
 
-                public void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException
+                public void modifyRn( LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1372,7 +1373,7 @@
                 }
 
 
-                public void move( Name oriChildName, Name newParentName ) throws NamingException
+                public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1392,7 +1393,7 @@
                 }
 
 
-                public void move( Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+                public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
                     throws NamingException
                 {
                     Entry next = getNextEntry();

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java Sun Jun  4 23:03:54 2006
@@ -31,6 +31,7 @@
 import org.apache.directory.server.core.configuration.DirectoryPartitionConfiguration;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -86,27 +87,27 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, Name)}.
+     * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, org.apache.directory.shared.ldap.name.LdapDN)}.
      */
-    void delete( Name name ) throws NamingException;
+    void delete( LdapDN name ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#add(NextInterceptor, String, Name, Attributes)}.
+     * Calls the next interceptor's {@link Interceptor#add(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes)}.
      */
-    void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
+    void add(LdapDN normName, Attributes entry) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, int, Attributes)}.
+     * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes)}.
      */
-    void modify( Name name, int modOp, Attributes attributes ) throws NamingException;
+    void modify( LdapDN name, int modOp, Attributes attributes ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, ModificationItem[])}.
+     * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[])}.
      */
-    void modify( Name name, ModificationItem[] items ) throws NamingException;
+    void modify( LdapDN name, ModificationItem[] items ) throws NamingException;
 
 
     /**
@@ -147,21 +148,21 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor, Name, String, boolean)}.
+     * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,String,boolean)}.
      */
-    void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException;
+    void modifyRn( LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name)}.
+     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)}.
      */
-    void move( Name oldName, Name newParentName ) throws NamingException;
+    void move( LdapDN oldName, LdapDN newParentName ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name, String, boolean)}.
+     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean)}.
      */
-    void move( Name oldName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException;
+    void move( LdapDN oldName, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException;
 
 
     /**

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Sun Jun  4 23:03:54 2006
@@ -138,8 +138,6 @@
      * constructor is used to propagate new contexts from existing contexts.
      *
      * @param principal the directory user principal that is propagated
-     * @param nexusProxy the intercepting proxy to the nexus
-     * @param env the environment properties used by this context
      * @param dn the distinguished name of this context
      */
     protected ServerContext(DirectoryService service, LdapPrincipal principal, Name dn) throws NamingException
@@ -303,7 +301,7 @@
          * we need to copy over the controls as well to propagate the complete 
          * environment besides whats in the hashtable for env.
          */
-        nexusProxy.add( target.toString(), target, attributes );
+        nexusProxy.add(target, attributes );
         return new ServerLdapContext( service, principal, target );
     }
 
@@ -322,7 +320,7 @@
      */
     public void destroySubcontext( Name name ) throws NamingException
     {
-        Name target = buildTarget( name );
+        LdapDN target = buildTarget( name );
         if ( target.size() == 0 )
         {
             throw new LdapNoPermissionException( "can't delete the rootDSE" );
@@ -352,8 +350,8 @@
 
         if ( outAttrs != null )
         {
-            Name target = buildTarget( name );
-            nexusProxy.add( target.toString(), target, outAttrs );
+            LdapDN target = buildTarget( name );
+            nexusProxy.add( target, outAttrs );
             return;
         }
 
@@ -382,11 +380,11 @@
                 }
             }
 
-            Name target = buildTarget( name );
+            LdapDN target = buildTarget( name );
 
             // Serialize object into entry attributes and add it.
             JavaLdapSupport.serialize( attributes, obj );
-            nexusProxy.add( target.toString(), target, attributes );
+            nexusProxy.add( target, attributes );
         }
         else if ( obj instanceof DirContext )
         {
@@ -401,8 +399,8 @@
                 }
             }
 
-            Name target = buildTarget( name );
-            nexusProxy.add( target.toString(), target, attributes );
+            LdapDN target = buildTarget( name );
+            nexusProxy.add( target, attributes );
         }
         else
         {
@@ -425,15 +423,15 @@
      */
     public void rename( Name oldName, Name newName ) throws NamingException
     {
-        Name oldDn = buildTarget( oldName );
-        Name newDn = buildTarget( newName );
+        LdapDN oldDn = buildTarget( oldName );
+        LdapDN newDn = buildTarget( newName );
         if ( oldDn.size() == 0 )
         {
             throw new LdapNoPermissionException( "can't rename the rootDSE" );
         }
 
-        Name oldBase = oldName.getPrefix( 1 );
-        Name newBase = newName.getPrefix( 1 );
+        LdapDN oldBase = ( LdapDN ) oldName.getPrefix( 1 );
+        LdapDN newBase = ( LdapDN ) newName.getPrefix( 1 );
         String newRdn = newName.get( newName.size() - 1 );
         String oldRdn = oldName.get( oldName.size() - 1 );
         boolean delOldRdn = true;
@@ -464,7 +462,7 @@
         }
         else
         {
-            Name parent = newDn.getPrefix( 1 );
+            LdapDN parent = ( LdapDN ) newDn.getPrefix( 1 );
             if ( newRdn.equalsIgnoreCase( oldRdn ) )
             {
                 nexusProxy.move( oldDn, parent );
@@ -491,7 +489,7 @@
      */
     public void rebind( Name name, Object obj ) throws NamingException
     {
-        Name target = buildTarget( name );
+        LdapDN target = buildTarget( name );
         if ( nexusProxy.hasEntry( target ) )
         {
             nexusProxy.delete( target );
@@ -791,7 +789,6 @@
      */
     LdapDN buildTarget( Name relativeName ) throws InvalidNameException
     {
-        // Clone our DN or absolute path
         LdapDN target = ( LdapDN ) dn.clone();
 
         // Add to left hand side of cloned DN the relative name arg

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Sun Jun  4 23:03:54 2006
@@ -82,8 +82,6 @@
      * set the PROVIDER_URL to the distinguished name for this context.
      *
      * @param principal the principal which is propagated
-     * @param nexusProxy the intercepting proxy to the nexus
-     * @param env the environment properties used by this context
      * @param dn the distinguished name of this context
      */
     protected ServerDirContext(DirectoryService service, LdapPrincipal principal, Name dn) throws NamingException
@@ -207,8 +205,8 @@
         if ( null == obj )
         {
             Attributes clone = ( Attributes ) attrs.clone();
-            Name target = buildTarget( name );
-            getNexusProxy().add( target.toString(), target, clone );
+            LdapDN target = buildTarget( name );
+            getNexusProxy().add( target, clone );
             return;
         }
 
@@ -218,7 +216,7 @@
 
         if ( outAttrs != attrs )
         {
-            Name target = buildTarget( name );
+            LdapDN target = buildTarget( name );
             Attributes attributes = ( Attributes ) attrs.clone();
             if ( outAttrs != null && outAttrs.size() > 0 )
             {
@@ -228,7 +226,7 @@
                     attributes.put( ( Attribute ) list.next() );
                 }
             }
-            getNexusProxy().add( target.toString(), target, attributes );
+            getNexusProxy().add( target, attributes );
             return;
         }
 
@@ -257,11 +255,11 @@
                     attributes.put( ( Attribute ) list.next() );
                 }
             }
-            Name target = buildTarget( name );
+            LdapDN target = buildTarget( name );
 
             // Serialize object into entry attributes and add it.
             JavaLdapSupport.serialize( attributes, obj );
-            getNexusProxy().add( target.toString(), target, attributes );
+            getNexusProxy().add( target, attributes );
         }
         else if ( obj instanceof DirContext )
         {
@@ -275,8 +273,8 @@
                     attributes.put( ( Attribute ) list.next() );
                 }
             }
-            Name target = buildTarget( name );
-            getNexusProxy().add( target.toString(), target, attributes );
+            LdapDN target = buildTarget( name );
+            getNexusProxy().add( target, attributes );
         }
         else
         {
@@ -301,7 +299,7 @@
      */
     public void rebind( Name name, Object obj, Attributes attrs ) throws NamingException
     {
-        Name target = buildTarget( name );
+        LdapDN target = buildTarget( name );
         if ( getNexusProxy().hasEntry( target ) )
         {
             getNexusProxy().delete( target );
@@ -331,7 +329,7 @@
             return ( DirContext ) super.createSubcontext( name );
         }
 
-        Name target = buildTarget( name );
+        LdapDN target = buildTarget( name );
         String rdn = name.get( name.size() - 1 );
         String rdnAttribute = NamespaceTools.getRdnAttribute( rdn );
         String rdnValue = NamespaceTools.getRdnValue( rdn );
@@ -348,7 +346,7 @@
         }
 
         // Add the new context to the server which as a side effect adds
-        getNexusProxy().add( target.toString(), target, attributes );
+        getNexusProxy().add( target, attributes );
 
         // Initialize the new context
         return new ServerLdapContext( getService(), getPrincipal(), target );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java Sun Jun  4 23:03:54 2006
@@ -39,6 +39,7 @@
 // TODO get rid of the use of DnParser with LdapDN
 import org.apache.directory.shared.ldap.name.DnParser;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.EmptyEnumeration;
 
@@ -85,58 +86,58 @@
     // Normalize all Name based arguments for ContextPartition interface operations
     // ------------------------------------------------------------------------
 
-    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes attrs )
+    public void add(NextInterceptor nextInterceptor, LdapDN name, Attributes attrs)
         throws NamingException
     {
-        normName = parser.parse( normName.toString() );
-        nextInterceptor.add( upName, normName, attrs );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        nextInterceptor.add( normalized, attrs );
     }
 
 
-    public void delete( NextInterceptor nextInterceptor, Name name ) throws NamingException
+    public void delete( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
     {
-        name = parser.parse( name.toString() );
-        nextInterceptor.delete( name );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        nextInterceptor.delete( normalized );
     }
 
 
-    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs )
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs )
         throws NamingException
     {
-        name = parser.parse( name.toString() );
-        nextInterceptor.modify( name, modOp, attrs );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        nextInterceptor.modify( normalized, modOp, attrs );
     }
 
 
-    public void modify( NextInterceptor nextInterceptor, Name name, ModificationItem[] items ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItem[] items ) throws NamingException
     {
-        name = parser.parse( name.toString() );
-        nextInterceptor.modify( name, items );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        nextInterceptor.modify( normalized, items );
     }
 
 
-    public void modifyRn( NextInterceptor nextInterceptor, Name name, String newRn, boolean deleteOldRn )
+    public void modifyRn( NextInterceptor nextInterceptor, LdapDN name, String newRn, boolean deleteOldRn )
         throws NamingException
     {
-        name = parser.parse( name.toString() );
-        nextInterceptor.modifyRn( name, newRn, deleteOldRn );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        nextInterceptor.modifyRn( normalized, newRn, deleteOldRn );
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name name, Name newParentName ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException
     {
-        name = parser.parse( name.toString() );
-        newParentName = parser.parse( newParentName.toString() );
-        nextInterceptor.move( name, newParentName );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        newParentName = LdapDN.normalize( newParentName, registry.getNormalizerMapping() );
+        nextInterceptor.move( normalized, newParentName );
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name name, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
-        name = parser.parse( name.toString() );
-        newParentName = parser.parse( newParentName.toString() );
-        nextInterceptor.move( name, newParentName, newRn, deleteOldRn );
+        LdapDN normalized = LdapDN.normalize( name, registry.getNormalizerMapping() );
+        newParentName = LdapDN.normalize( newParentName, registry.getNormalizerMapping() );
+        nextInterceptor.move( normalized, newParentName, newRn, deleteOldRn );
     }
 
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java Sun Jun  4 23:03:54 2006
@@ -46,6 +46,7 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -107,7 +108,7 @@
     /**
      * Adds extra operational attributes to the entry before it is added.
      */
-    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes entry )
+    public void add(NextInterceptor nextInterceptor, LdapDN normName, Attributes entry)
         throws NamingException
     {
         String principal = getPrincipal().getName();
@@ -120,11 +121,11 @@
         attribute.add( DateUtils.getGeneralizedTime() );
         entry.put( attribute );
 
-        nextInterceptor.add( upName, normName, entry );
+        nextInterceptor.add(normName, entry );
     }
 
 
-    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs )
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs )
         throws NamingException
     {
         nextInterceptor.modify( name, modOp, attrs );
@@ -143,7 +144,7 @@
     }
 
 
-    public void modify( NextInterceptor nextInterceptor, Name name, ModificationItem[] items ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItem[] items ) throws NamingException
     {
         nextInterceptor.modify( name, items );
 
@@ -161,7 +162,7 @@
     }
 
 
-    public void modifyRn( NextInterceptor nextInterceptor, Name name, String newRn, boolean deleteOldRn )
+    public void modifyRn( NextInterceptor nextInterceptor, LdapDN name, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         nextInterceptor.modifyRn( name, newRn, deleteOldRn );
@@ -176,12 +177,12 @@
         attribute.add( DateUtils.getGeneralizedTime() );
         attributes.put( attribute );
 
-        Name newDn = name.getPrefix( 1 ).add( newRn );
+        LdapDN newDn = ( LdapDN ) name.getPrefix( 1 ).add( newRn );
         nexus.modify( newDn, DirContext.REPLACE_ATTRIBUTE, attributes );
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name name, Name newParentName ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException
     {
         nextInterceptor.move( name, newParentName );
 
@@ -199,7 +200,7 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, Name name, Name newParentName, String newRn, boolean deleteOldRn )
+    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName, String newRn, boolean deleteOldRn )
         throws NamingException
     {
         nextInterceptor.move( name, newParentName, newRn, deleteOldRn );
@@ -252,7 +253,7 @@
 
 
     public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
-        SearchControls searchCtls ) throws NamingException
+                                     SearchControls searchCtls ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java Sun Jun  4 23:03:54 2006
@@ -19,6 +19,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import javax.naming.Name;
 import javax.naming.NameNotFoundException;
@@ -50,6 +51,8 @@
     private DirectoryPartitionConfiguration cfg;
     /** <tt>true</tt> if and only if this partition is initialized. */
     private boolean initialized;
+    /** the normalized suffix DN for this partition */
+    private LdapDN suffixDn;
 
 
     protected AbstractDirectoryPartition()
@@ -161,23 +164,23 @@
     }
 
 
-    public final Name getSuffix( boolean normalized ) throws NamingException
+    public final LdapDN getSuffix() throws NamingException
     {
-        if ( normalized )
+        if ( suffixDn == null )
         {
-            return getConfiguration().getNormalizedSuffix(
-                getFactoryConfiguration().getGlobalRegistries().getMatchingRuleRegistry() );
-        }
-        else
-        {
-            return new LdapDN( getConfiguration().getSuffix() );
+            suffixDn = new LdapDN( cfg.getSuffix() );
+            Map oids = getFactoryConfiguration().getGlobalRegistries().getAttributeTypeRegistry()
+                    .getNormalizerMapping();
+            suffixDn = LdapDN.normalize( suffixDn, oids );
         }
+
+        return suffixDn;
     }
 
 
     public final boolean isSuffix( Name name ) throws NamingException
     {
-        return getSuffix( true ).equals( name ) || getSuffix( false ).equals( name );
+        return getSuffix().equals( name );
     }
 
 
@@ -220,12 +223,12 @@
 
     /**
      * This method forwards the request to
-     * {@link DirectoryPartition#modify(Name, ModificationItem[])} after
+     * {@link DirectoryPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[])} after
      * translating parameters to {@link ModificationItem}<tt>[]</tt> by default.
      * Please override this method if there is more effactive way for your
      * implementation.
      */
-    public void modify( Name name, int modOp, Attributes mods ) throws NamingException
+    public void modify( LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         List items = new ArrayList( mods.size() );
         NamingEnumeration e = mods.getAll();
@@ -241,14 +244,14 @@
 
 
     /**
-     * This method calls {@link DirectoryPartition#move(Name, Name)} and
-     * {@link DirectoryPartition#modifyRn(Name, String, boolean)} subsequently
+     * This method calls {@link DirectoryPartition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)} and
+     * {@link DirectoryPartition#modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)} subsequently
      * by default.  Please override this method if there is more effactive
      * way for your implementation.
      */
-    public void move( Name oldName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException
+    public void move( LdapDN oldName, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException
     {
-        Name newName = ( Name ) newParentName.clone();
+        LdapDN newName = ( LdapDN ) newParentName.clone();
         newName.add( newRn );
         move( oldName, newParentName );
         modifyRn( newName, newRn, deleteOldRn );
@@ -259,7 +262,7 @@
      * This method throws {@link OperationNotSupportedException} by default.
      * Please override this method to implement move operation.
      */
-    public void move( Name oldName, Name newParentName ) throws NamingException
+    public void move( LdapDN oldName, LdapDN newParentName ) throws NamingException
     {
         throw new OperationNotSupportedException( "Moving an entry to other parent entry is not supported." );
     }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java Sun Jun  4 23:03:54 2006
@@ -259,7 +259,7 @@
         systemCfg.setContextEntry( systemEntry );
 
         system.init( factoryCfg, systemCfg );
-        String key = system.getSuffix( true ).toString();
+        String key = system.getSuffix().toString();
         if ( partitions.containsKey( key ) )
         {
             throw new ConfigurationException( "Duplicate partition suffix: " + key );
@@ -267,7 +267,7 @@
         partitions.put( key, system );
 
         Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
-        namingContexts.add( system.getSuffix( false ).toString() );
+        namingContexts.add( system.getSuffix().toString() );
 
         return systemCfg;
     }
@@ -425,10 +425,10 @@
         }
 
         partition.init( factoryCfg, config );
-        partitions.put( partition.getSuffix( true ).toString(), partition );
+        partitions.put( partition.getSuffix().toString(), partition );
 
         Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
-        namingContexts.add( partition.getSuffix( false ).toString() );
+        namingContexts.add( partition.getSuffix().toString() );
     }
 
 
@@ -442,7 +442,7 @@
         }
 
         Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
-        namingContexts.remove( partition.getSuffix( false ).toString() );
+        namingContexts.remove( partition.getSuffix().toString() );
         partitions.remove( key );
 
         partition.sync();
@@ -485,7 +485,7 @@
     }
 
 
-    public Name getSuffix( boolean normalized )
+    public LdapDN getSuffix()
     {
         return LdapDN.EMPTY_LDAPDN;
     }
@@ -497,7 +497,7 @@
     public Name getSuffix( Name dn, boolean normalized ) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
-        return backend.getSuffix( normalized );
+        return backend.getSuffix();
     }
 
 
@@ -531,8 +531,8 @@
     private void unregister( DirectoryPartition partition ) throws NamingException
     {
         Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
-        namingContexts.remove( partition.getSuffix( false ).toString() );
-        partitions.remove( partition.getSuffix( true ).toString() );
+        namingContexts.remove( partition.getSuffix().toString() );
+        partitions.remove( partition.getSuffix().toString() );
     }
 
 
@@ -555,9 +555,9 @@
 
 
     /**
-     * @see DirectoryPartition#delete(javax.naming.Name)
+     * @see DirectoryPartition#delete(org.apache.directory.shared.ldap.name.LdapDN)
      */
-    public void delete( Name dn ) throws NamingException
+    public void delete( LdapDN dn ) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
         backend.delete( dn );
@@ -571,19 +571,19 @@
      * here so backend implementors do not have to worry about performing these
      * kinds of checks.
      *
-     * @see org.apache.directory.server.core.partition.DirectoryPartition#add(String, Name, Attributes)
+     * @see DirectoryPartition#add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes)
      */
-    public void add( String updn, Name dn, Attributes an_entry ) throws NamingException
+    public void add(LdapDN dn, Attributes an_entry) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
-        backend.add( updn, dn, an_entry );
+        backend.add(dn, an_entry );
     }
 
 
     /**
-     * @see DirectoryPartition#modify(Name, int,Attributes)
+     * @see DirectoryPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes)
      */
-    public void modify( Name dn, int modOp, Attributes mods ) throws NamingException
+    public void modify( LdapDN dn, int modOp, Attributes mods ) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
         backend.modify( dn, modOp, mods );
@@ -591,10 +591,9 @@
 
 
     /**
-     * @see DirectoryPartition#modify(javax.naming.Name,
-     * javax.naming.directory.ModificationItem[])
+     * @see DirectoryPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[])
      */
-    public void modify( Name dn, ModificationItem[] mods ) throws NamingException
+    public void modify( LdapDN dn, ModificationItem[] mods ) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
         backend.modify( dn, mods );
@@ -737,9 +736,9 @@
 
 
     /**
-     * @see DirectoryPartition#modifyRn(Name, String, boolean)
+     * @see DirectoryPartition#modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)
      */
-    public void modifyRn( Name dn, String newRdn, boolean deleteOldRdn ) throws NamingException
+    public void modifyRn( LdapDN dn, String newRdn, boolean deleteOldRdn ) throws NamingException
     {
         DirectoryPartition backend = getBackend( dn );
         backend.modifyRn( dn, newRdn, deleteOldRdn );
@@ -747,9 +746,9 @@
 
 
     /**
-     * @see DirectoryPartition#move(Name, Name)
+     * @see DirectoryPartition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)
      */
-    public void move( Name oriChildName, Name newParentName ) throws NamingException
+    public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         DirectoryPartition backend = getBackend( oriChildName );
         backend.move( oriChildName, newParentName );
@@ -757,10 +756,9 @@
 
 
     /**
-     * @see DirectoryPartition#move(javax.naming.Name,
-     * javax.naming.Name, java.lang.String, boolean)
+     * @see DirectoryPartition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean)
      */
-    public void move( Name oldChildDn, Name newParentDn, String newRdn, boolean deleteOldRdn ) throws NamingException
+    public void move( LdapDN oldChildDn, LdapDN newParentDn, String newRdn, boolean deleteOldRdn ) throws NamingException
     {
         DirectoryPartition backend = getBackend( oldChildDn );
         backend.move( oldChildDn, newParentDn, newRdn, deleteOldRdn );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java Sun Jun  4 23:03:54 2006
@@ -32,6 +32,7 @@
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.DirectoryPartitionConfiguration;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -50,7 +51,7 @@
     /** The objectClass name for aliases: 'alias' */
     String ALIAS_OBJECT = "alias";
 
-    /** 
+    /**
      * The aliased Dn attribute name: aliasedObjectName for LDAP and
      * aliasedEntryName or X.500.
      */
@@ -85,13 +86,10 @@
      * Gets the distinguished/absolute name of the suffix for all entries
      * stored within this ContextPartition.
      *
-     * @param normalized boolean value used to control the normalization of the
-     * returned Name.  If true the normalized Name is returned, otherwise the 
-     * original user provided Name without normalization is returned.
      * @return Name representing the distinguished/absolute name of this
      * ContextPartitions root context.
      */
-    Name getSuffix( boolean normalized ) throws NamingException;
+    LdapDN getSuffix() throws NamingException;
 
 
     /**
@@ -102,18 +100,17 @@
      * delete from this ContextPartition.
      * @throws NamingException if there are any problems
      */
-    void delete( Name name ) throws NamingException;
+    void delete( LdapDN name ) throws NamingException;
 
 
     /**
      * Adds an entry to this ContextPartition.
      *
-     * @param userProvidedName the user provided distinguished/absolute name of the entry
-     * @param normalizedName the normalized distinguished/absolute name of the entry
+     * @param name
      * @param entry the entry to add to this ContextPartition
      * @throws NamingException if there are any problems
      */
-    void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
+    void add( LdapDN name, Attributes entry ) throws NamingException;
 
 
     /**
@@ -132,7 +129,7 @@
      * @see javax.naming.directory.DirContext#REMOVE_ATTRIBUTE
      * @see javax.naming.directory.DirContext#REPLACE_ATTRIBUTE
      */
-    void modify( Name name, int modOp, Attributes attributes ) throws NamingException;
+    void modify( LdapDN name, int modOp, Attributes attributes ) throws NamingException;
 
 
     /**
@@ -144,7 +141,7 @@
      * @throws NamingException if there are any problems
      * @see ModificationItem
      */
-    void modify( Name name, ModificationItem[] items ) throws NamingException;
+    void modify( LdapDN name, ModificationItem[] items ) throws NamingException;
 
 
     /**
@@ -241,20 +238,20 @@
      * from the entry if set to true, and has no affect if set to false
      * @throws NamingException if there are any problems
      */
-    void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException;
+    void modifyRn( LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException;
 
 
     /**
      * Transplants a child entry, to a position in the namespace under a new
      * parent entry.
      *
-     * @param newParentName the normalized distinguished/absolute name of the
-     * new parent to move the target entry to
      * @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 target entry to
      * @throws NamingException if there are any problems
      */
-    void move( Name oldName, Name newParentName ) throws NamingException;
+    void move( LdapDN oldName, LdapDN newParentName ) throws NamingException;
 
 
     /**
@@ -274,7 +271,7 @@
      * 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 oldName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException;
+    void move( LdapDN oldName, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException;
 
 
     /**

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java?rev=411687&r1=411686&r2=411687&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java Sun Jun  4 23:03:54 2006
@@ -64,9 +64,9 @@
      * Gets the DN for the admin user.
      * @return the admin user DN
      */
-    public static final Name getAdminName()
+    public static final LdapDN getAdminName()
     {
-        Name adminDn = null;
+        LdapDN adminDn = null;
 
         try
         {



Mime
View raw message