directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r411648 - in /directory/branches/apacheds/optimization: core-unit/src/test/java/org/apache/directory/server/core/authz/ core-unit/src/test/java/org/apache/directory/server/core/jndi/ core/src/main/java/org/apache/directory/server/core/ core...
Date Mon, 05 Jun 2006 03:08:01 GMT
Author: akarasulu
Date: Sun Jun  4 20:07:59 2006
New Revision: 411648

URL: http://svn.apache.org/viewvc?rev=411648&view=rev
Log:
replaced all usages of LdapName with LdapDN

Modified:
    directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationTest.java
    directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationTest.java
    directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralTest.java
    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/AbstractAuthenticator.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/authn/LdapPrincipal.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.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/jndi/LdapJndiProperties.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/jndi/ServerLdapContext.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/normalization/ValueNormalizingVisitor.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/DirectoryPartitionNexus.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.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/gui/PartitionViewer.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/partition/impl/btree/jdbm/JdbmTable.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.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/subtree/SubentryService.java
    directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java
    directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
    directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java

Modified: directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationTest.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationTest.java (original)
+++ directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationTest.java Sun Jun  4 20:07:59 2006
@@ -20,7 +20,7 @@
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.core.unit.AbstractTestCase;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.directory.*;
 import javax.naming.NamingException;
@@ -108,7 +108,7 @@
         objectClass.add( "groupOfUniqueNames" );
         group.put( "uniqueMember", firstMemberDn );
         adminCtx.createSubcontext( "cn=" + cn + ",ou=groups", group );
-        return new LdapName( "cn=" + cn + ",ou=groups,ou=system" );
+        return new LdapDN( "cn=" + cn + ",ou=groups,ou=system" );
     }
 
 
@@ -150,7 +150,7 @@
         user.put( "sn", uid );
         user.put( "cn", uid );
         adminCtx.createSubcontext( "uid=" + uid + ",ou=users", user );
-        return new LdapName( "uid=" + uid + ",ou=users,ou=system" );
+        return new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
     }
 
 

Modified: directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationTest.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationTest.java (original)
+++ directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationTest.java Sun Jun  4 20:07:59 2006
@@ -19,7 +19,7 @@
 
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
 import javax.naming.directory.*;
@@ -68,13 +68,13 @@
         try
         {
             // create the entry as admin
-            LdapName userName = new LdapName( "uid=" + uid + ",ou=users,ou=system" );
+            LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
             adminContext.createSubcontext( entryRdn, testEntry );
 
             // compare the telephone numbers
             DirContext userContext = getContextAs( userName, password );
             ServerLdapContext ctx = ( ServerLdapContext ) userContext.lookup( "" );
-            ctx.compare( new LdapName( entryRdn + ",ou=system" ), "telephoneNumber", number );
+            ctx.compare( new LdapDN( entryRdn + ",ou=system" ), "telephoneNumber", number );
 
             // don't return compare result which can be false but true since op was permitted
             return true;
@@ -215,7 +215,7 @@
         adminCtx.createSubcontext( "uid=bob,ou=users", user );
 
         ServerLdapContext ctx = ( ServerLdapContext ) adminCtx.lookup( "" );
-        assertTrue( ctx.compare( new LdapName( "uid=bob,ou=users,ou=system" ), "userPassword", "bobspassword" ) );
+        assertTrue( ctx.compare( new LdapDN( "uid=bob,ou=users,ou=system" ), "userPassword", "bobspassword" ) );
     }
 
 }

Modified: directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralTest.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralTest.java (original)
+++ directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralTest.java Sun Jun  4 20:07:59 2006
@@ -43,7 +43,7 @@
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -340,7 +340,7 @@
         {
             if ( td.refCtx instanceof ServerLdapContext )
             {
-                LdapName dn = new LdapName( "cn=alex karasulu,ou=users,ou=system" );
+                LdapDN dn = new LdapDN( "cn=alex karasulu,ou=users,ou=system" );
                 ( ( ServerLdapContext ) td.refCtx ).compare( dn, "sn", "karasulu" );
             }
             else
@@ -376,7 +376,7 @@
         {
             if ( td.refCtx instanceof ServerLdapContext )
             {
-                LdapName dn = new LdapName( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
+                LdapDN dn = new LdapDN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
                 ( ( ServerLdapContext ) td.refCtx ).compare( dn, "sn", "karasulu" );
             }
             else

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -17,10 +17,8 @@
 package org.apache.directory.server.core;
 
 
-import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.Set;
 import java.util.HashSet;
 
@@ -44,7 +42,6 @@
 import org.apache.directory.server.core.schema.GlobalRegistries;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
-import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
@@ -52,11 +49,8 @@
 import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DnOidContainer;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
-import org.apache.directory.shared.ldap.schema.OidNormalizer;
 import org.apache.directory.shared.ldap.util.DateUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -694,71 +688,6 @@
     }
 
 
-    private void setupOidsMap( BootstrapRegistries bootstrapRegistries ) throws NamingException
-    {
-        Iterator keys = bootstrapRegistries.getOidRegistry().getOidByName().keySet().iterator();
-
-        Map oidsMap = new HashMap();
-        Map oidName = new HashMap();
-
-        while ( keys.hasNext() )
-        {
-            String name = StringTools.deepTrimToLower( ( String ) keys.next() );
-            String principal = null;
-
-            if ( OID.isOID( name ) )
-            {
-                continue;
-            }
-
-            String oid = bootstrapRegistries.getOidRegistry().getOid( name );
-
-            OidNormalizer oidNormalizer = null;
-
-            if ( oidName.containsKey( oid ) )
-            {
-                principal = StringTools.deepTrimToLower( ( String ) oidName.get( oid ) );
-
-                if ( principal.length() > name.length() )
-                {
-                    OidNormalizer oldOidNormalizer = ( OidNormalizer ) oidsMap.get( principal );
-
-                    oidNormalizer = new OidNormalizer( name, oldOidNormalizer.getNormalizer() );
-
-                    oidName.remove( oid );
-                    oidName.put( oid, name );
-                    oidsMap.remove( principal );
-                    oidsMap.remove( oid );
-                    oidsMap.put( principal, oidNormalizer );
-                    oidsMap.put( name, oidNormalizer );
-                    oidsMap.put( oid, oidNormalizer );
-                    continue;
-                }
-            }
-            else
-            {
-                principal = name;
-                oidName.put( oid, principal );
-
-                if ( bootstrapRegistries.getNormalizerRegistry().hasNormalizer( oid ) )
-                {
-                    oidNormalizer = new OidNormalizer( principal, bootstrapRegistries.getNormalizerRegistry().lookup(
-                        oid ) );
-                }
-                else
-                {
-                    oidNormalizer = new OidNormalizer( principal, new NoOpNormalizer() );
-                }
-
-                oidsMap.put( name, oidNormalizer );
-                oidsMap.put( oid, oidNormalizer );
-            }
-        }
-
-        DnOidContainer.setOids( oidsMap );
-    }
-
-
     /**
      * Kicks off the initialization of the entire system.
      *
@@ -778,7 +707,6 @@
         BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );
-        setupOidsMap( bootstrapRegistries );
 
         java.util.List errors = bootstrapRegistries.checkRefInteg();
         if ( !errors.isEmpty() )

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java Sun Jun  4 20:07:59 2006
@@ -24,7 +24,7 @@
 import org.apache.directory.server.core.configuration.AuthenticatorConfiguration;
 import org.apache.directory.server.core.jndi.ServerContext;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -143,7 +143,7 @@
     protected static LdapPrincipal createLdapPrincipal( String name, AuthenticationLevel authenticationLeve )
         throws NamingException
     {
-        LdapName principalDn = new LdapName( name );
+        LdapDN principalDn = new LdapDN( name );
         return new LdapPrincipal( principalDn, AuthenticationLevel.SIMPLE );
     }
 }

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=411648&r1=411647&r2=411648&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 20:07:59 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.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java Sun Jun  4 20:07:59 2006
@@ -23,7 +23,7 @@
 import javax.naming.Name;
 
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -68,7 +68,7 @@
      */
     private LdapPrincipal()
     {
-        this.name = new LdapName();
+        this.name = new LdapDN();
         this.authenticationLevel = AuthenticationLevel.NONE;
     }
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Sun Jun  4 20:07:59 2006
@@ -35,9 +35,10 @@
 import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.directory.shared.ldap.util.Base64;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -119,7 +120,7 @@
 
         // ---- lookup the principal entry's userPassword attribute
 
-        LdapName principalDn = new LdapName( principal );
+        LdapDN principalDn = new LdapDN( principal );
         Invocation invocation = InvocationStack.getInstance().peek();
         DirectoryPartitionNexusProxy proxy = invocation.getProxy();
         Attributes userEntry;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Sun Jun  4 20:07:59 2006
@@ -30,7 +30,7 @@
 import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 import javax.naming.NamingException;
@@ -135,7 +135,7 @@
         for ( int ii = 0; ii < subentries.size(); ii++ )
         {
             String subentryDnStr = ( String ) subentries.get( ii );
-            Name subentryDn = new LdapName( subentryDnStr );
+            Name subentryDn = new LdapDN( subentryDnStr );
             Attributes subentry = nexus.lookup( subentryDn );
             NamingEnumeration attrIds = subentry.getIDs();
             while ( attrIds.hasMore() )

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfiguration.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfiguration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfiguration.java Sun Jun  4 20:07:59 2006
@@ -33,7 +33,7 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmDirectoryPartition;
 import org.apache.directory.server.core.schema.MatchingRuleRegistry;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
 
@@ -188,7 +188,7 @@
      */
     public Name getNormalizedSuffix( Normalizer normalizer ) throws NamingException
     {
-        return new LdapName( normalizer.normalize( suffix ).toString() );
+        return new LdapDN( normalizer.normalize( suffix ).toString() );
     }
 
 
@@ -200,7 +200,7 @@
         suffix = suffix.trim();
         try
         {
-            new LdapName( suffix );
+            new LdapDN( suffix );
         }
         catch ( NamingException e )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java Sun Jun  4 20:07:59 2006
@@ -24,7 +24,7 @@
 
 import org.apache.directory.server.core.partition.DirectoryPartition;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -43,7 +43,7 @@
 
     public RemoveDirectoryPartitionConfiguration(String suffix) throws NamingException
     {
-        this( new LdapName( suffix.trim() ) );
+        this( new LdapDN( suffix.trim() ) );
     }
 
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java Sun Jun  4 20:07:59 2006
@@ -33,6 +33,8 @@
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
+
+// TODO remove DnParser usage with LdapDN
 import org.apache.directory.shared.ldap.name.DnParser;
 
 import org.slf4j.Logger;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java Sun Jun  4 20:07:59 2006
@@ -36,7 +36,7 @@
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.message.AbandonListener;
 import org.apache.directory.shared.ldap.message.AbandonableRequest;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -245,7 +245,8 @@
         DirContext ctx = ( DirContext ) invocation.getCaller();
         Hashtable env = ctx.getEnvironment();
         Attributes attrs = result.getAttributes();
-        Name name = new LdapName( result.getName() );
+        Name name = new LdapDN( result.getName() );
+        
         try
         {
             Object obj = DirectoryManager.getObjectInstance( null, name, ctx, env, attrs );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java Sun Jun  4 20:07:59 2006
@@ -24,6 +24,8 @@
 
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.ScopeNode;
+
+//TODO remove DnParser usage with LdapDN
 import org.apache.directory.shared.ldap.name.DnParser;
 
 

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -36,7 +36,7 @@
 import org.apache.directory.shared.ldap.exception.*;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -83,7 +83,7 @@
         if ( nextInterceptor.hasEntry( normName ) )
         {
             NamingException ne = new LdapNameAlreadyBoundException( normName.toString() + " already exists!" );
-            ne.setResolvedName( new LdapName( upName ) );
+            ne.setResolvedName( new LdapDN( upName ) );
             throw ne;
         }
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java Sun Jun  4 20:07:59 2006
@@ -27,7 +27,7 @@
 
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -42,8 +42,8 @@
 {
     private static final String SASL_AUTHID = "java.naming.security.sasl.authorizationId";
 
-    private LdapName providerDn;
-    private LdapName bindDn;
+    private LdapDN providerDn;
+    private LdapDN bindDn;
     private String saslAuthId;
     private AuthenticationLevel level;
     private List mechanisms = new ArrayList();
@@ -130,11 +130,11 @@
 
         if ( url.trim().equals( "" ) )
         {
-            props.providerDn = LdapName.EMPTY_LDAP_NAME;
+            props.providerDn = LdapDN.EMPTY_LDAPDN;
         }
         else
         {
-            props.providerDn = new LdapName( url );
+            props.providerDn = new LdapDN( url );
         }
 
         // -------------------------------------------------------------------
@@ -203,11 +203,11 @@
 
         if ( ( ( String ) principal ).trim().equals( "" ) )
         {
-            props.bindDn = LdapName.EMPTY_LDAP_NAME;
+            props.bindDn = LdapDN.EMPTY_LDAPDN;
         }
         else
         {
-            props.bindDn = new LdapName( ( String ) principal );
+            props.bindDn = new LdapDN( ( String ) principal );
         }
 
         if ( env.get( SASL_AUTHID ) != null && props.level == AuthenticationLevel.STRONG )
@@ -254,13 +254,13 @@
     }
 
 
-    public LdapName getBindDn()
+    public LdapDN getBindDn()
     {
         return bindDn;
     }
 
 
-    public LdapName getProviderDn()
+    public LdapDN getProviderDn()
     {
         return providerDn;
     }

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -52,7 +52,8 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.DnParser;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -78,7 +79,7 @@
     private final Hashtable env;
 
     /** The distinguished name of this Context */
-    private final LdapName dn;
+    private final LdapDN dn;
 
     /** The set of registered NamingListeners */
     private final Set listeners = new HashSet();
@@ -144,7 +145,7 @@
     protected ServerContext(DirectoryService service, LdapPrincipal principal, Name dn) throws NamingException
     {
         this.service = service;
-        this.dn = ( LdapName ) dn.clone();
+        this.dn = ( LdapDN ) dn.clone();
 
         this.env = ( Hashtable ) service.getConfiguration().getEnvironment().clone();
         this.env.put( PROVIDER_URL, dn.toString() );
@@ -275,7 +276,7 @@
      */
     public Context createSubcontext( String name ) throws NamingException
     {
-        return createSubcontext( new LdapName( name ) );
+        return createSubcontext( new LdapDN( name ) );
     }
 
 
@@ -285,7 +286,7 @@
     public Context createSubcontext( Name name ) throws NamingException
     {
         Attributes attributes = new LockableAttributesImpl();
-        LdapName target = buildTarget( name );
+        LdapDN target = buildTarget( name );
 
         String rdn = name.get( name.size() - 1 );
         String rdnAttribute = NamespaceTools.getRdnAttribute( rdn );
@@ -312,7 +313,7 @@
      */
     public void destroySubcontext( String name ) throws NamingException
     {
-        destroySubcontext( new LdapName( name ) );
+        destroySubcontext( new LdapDN( name ) );
     }
 
 
@@ -336,7 +337,7 @@
      */
     public void bind( String name, Object obj ) throws NamingException
     {
-        bind( new LdapName( name ), obj );
+        bind( new LdapDN( name ), obj );
     }
 
 
@@ -415,7 +416,7 @@
      */
     public void rename( String oldName, String newName ) throws NamingException
     {
-        rename( new LdapName( oldName ), new LdapName( newName ) );
+        rename( new LdapDN( oldName ), new LdapDN( newName ) );
     }
 
 
@@ -481,7 +482,7 @@
      */
     public void rebind( String name, Object obj ) throws NamingException
     {
-        rebind( new LdapName( name ), obj );
+        rebind( new LdapDN( name ), obj );
     }
 
 
@@ -504,7 +505,7 @@
      */
     public void unbind( String name ) throws NamingException
     {
-        unbind( new LdapName( name ) );
+        unbind( new LdapDN( name ) );
     }
 
 
@@ -524,11 +525,11 @@
     {
         if ( StringTools.isEmpty( name ) )
         {
-            return lookup( LdapName.EMPTY_LDAP_NAME );
+            return lookup( LdapDN.EMPTY_LDAPDN );
         }
         else
         {
-            return lookup( new LdapName( name ) );
+            return lookup( new LdapDN( name ) );
         }
     }
 
@@ -539,7 +540,7 @@
     public Object lookup( Name name ) throws NamingException
     {
         Object obj;
-        LdapName target = buildTarget( name );
+        LdapDN target = buildTarget( name );
         Attributes attributes = nexusProxy.lookup( target );
 
         try
@@ -610,7 +611,7 @@
      */
     public NameParser getNameParser( String name ) throws NamingException
     {
-        return LdapName.getNameParser();
+        return new DnParser();
     }
 
 
@@ -624,7 +625,7 @@
      */
     public NameParser getNameParser( Name name ) throws NamingException
     {
-        return LdapName.getNameParser();
+        return new DnParser();
     }
 
 
@@ -633,7 +634,7 @@
      */
     public NamingEnumeration list( String name ) throws NamingException
     {
-        return list( new LdapName( name ) );
+        return list( new LdapDN( name ) );
     }
 
 
@@ -651,7 +652,7 @@
      */
     public NamingEnumeration listBindings( String name ) throws NamingException
     {
-        return listBindings( new LdapName( name ) );
+        return listBindings( new LdapDN( name ) );
     }
 
 
@@ -674,7 +675,7 @@
      */
     public String composeName( String name, String prefix ) throws NamingException
     {
-        return composeName( new LdapName( name ), new LdapName( prefix ) ).toString();
+        return composeName( new LdapDN( name ), new LdapDN( prefix ) ).toString();
     }
 
 
@@ -747,7 +748,7 @@
 
     public void addNamingListener( String name, int scope, NamingListener namingListener ) throws NamingException
     {
-        addNamingListener( new LdapName( name ), scope, namingListener );
+        addNamingListener( new LdapDN( name ), scope, namingListener );
     }
 
 
@@ -788,10 +789,10 @@
      * @throws InvalidNameException if relativeName is not a valid name in
      *      the LDAP namespace.
      */
-    LdapName buildTarget( Name relativeName ) throws InvalidNameException
+    LdapDN buildTarget( Name relativeName ) throws InvalidNameException
     {
         // Clone our DN or absolute path
-        LdapName target = ( LdapName ) dn.clone();
+        LdapDN target = ( LdapDN ) dn.clone();
 
         // Add to left hand side of cloned DN the relative name arg
         target.addAll( target.size(), relativeName );

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -46,7 +46,7 @@
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
@@ -101,7 +101,7 @@
      */
     public Attributes getAttributes( String name ) throws NamingException
     {
-        return getAttributes( new LdapName( name ) );
+        return getAttributes( new LdapDN( name ) );
     }
 
 
@@ -120,7 +120,7 @@
      */
     public Attributes getAttributes( String name, String[] attrIds ) throws NamingException
     {
-        return getAttributes( new LdapName( name ), attrIds );
+        return getAttributes( new LdapDN( name ), attrIds );
     }
 
 
@@ -140,7 +140,7 @@
      */
     public void modifyAttributes( String name, int modOp, Attributes attrs ) throws NamingException
     {
-        modifyAttributes( new LdapName( name ), modOp, attrs );
+        modifyAttributes( new LdapDN( name ), modOp, attrs );
     }
 
 
@@ -160,7 +160,7 @@
      */
     public void modifyAttributes( String name, ModificationItem[] mods ) throws NamingException
     {
-        modifyAttributes( new LdapName( name ), mods );
+        modifyAttributes( new LdapDN( name ), mods );
     }
 
 
@@ -180,7 +180,7 @@
      */
     public void bind( String name, Object obj, Attributes attrs ) throws NamingException
     {
-        bind( new LdapName( name ), obj, attrs );
+        bind( new LdapDN( name ), obj, attrs );
     }
 
 
@@ -291,7 +291,7 @@
      */
     public void rebind( String name, Object obj, Attributes attrs ) throws NamingException
     {
-        rebind( new LdapName( name ), obj, attrs );
+        rebind( new LdapDN( name ), obj, attrs );
     }
 
 
@@ -316,7 +316,7 @@
      */
     public DirContext createSubcontext( String name, Attributes attrs ) throws NamingException
     {
-        return createSubcontext( new LdapName( name ), attrs );
+        return createSubcontext( new LdapDN( name ), attrs );
     }
 
 
@@ -401,7 +401,7 @@
      */
     public NamingEnumeration search( String name, Attributes matchingAttributes ) throws NamingException
     {
-        return search( new LdapName( name ), matchingAttributes, null );
+        return search( new LdapDN( name ), matchingAttributes, null );
     }
 
 
@@ -422,7 +422,7 @@
     public NamingEnumeration search( String name, Attributes matchingAttributes, String[] attributesToReturn )
         throws NamingException
     {
-        return search( new LdapName( name ), matchingAttributes, attributesToReturn );
+        return search( new LdapDN( name ), matchingAttributes, attributesToReturn );
     }
 
 
@@ -501,7 +501,7 @@
      */
     public NamingEnumeration search( String name, String filter, SearchControls cons ) throws NamingException
     {
-        return search( new LdapName( name ), filter, cons );
+        return search( new LdapDN( name ), filter, cons );
     }
 
 
@@ -566,7 +566,7 @@
     public NamingEnumeration search( String name, String filterExpr, Object[] filterArgs, SearchControls cons )
         throws NamingException
     {
-        return search( new LdapName( name ), filterExpr, filterArgs, cons );
+        return search( new LdapDN( name ), filterExpr, filterArgs, cons );
     }
 
 
@@ -654,7 +654,7 @@
     public void addNamingListener( String name, String filter, SearchControls searchControls,
         NamingListener namingListener ) throws NamingException
     {
-        addNamingListener( new LdapName( name ), filter, searchControls, namingListener );
+        addNamingListener( new LdapDN( name ), filter, searchControls, namingListener );
     }
 
 
@@ -696,6 +696,6 @@
     public void addNamingListener( String name, String filter, Object[] objects, SearchControls searchControls,
         NamingListener namingListener ) throws NamingException
     {
-        addNamingListener( new LdapName( name ), filter, objects, searchControls, namingListener );
+        addNamingListener( new LdapDN( name ), filter, objects, searchControls, namingListener );
     }
 }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Sun Jun  4 20:07:59 2006
@@ -31,8 +31,7 @@
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.referral.ReferralService;
 import org.apache.directory.shared.ldap.NotImplementedException;
-
-import com.sun.jndi.ldap.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -179,7 +178,7 @@
     public void ldapUnbind() throws NamingException
     {
         String bindDn = ( String ) getEnvironment().get( Context.SECURITY_PRINCIPAL );
-        super.getNexusProxy().unbind( new LdapName( bindDn ) );
+        super.getNexusProxy().unbind( new LdapDN( bindDn ) );
     }
 
 

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -35,10 +35,13 @@
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.LeafNode;
+
+// 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.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.EmptyEnumeration;
+
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/ValueNormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/ValueNormalizingVisitor.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/ValueNormalizingVisitor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/ValueNormalizingVisitor.java Sun Jun  4 20:07:59 2006
@@ -23,6 +23,7 @@
 import org.apache.directory.shared.ldap.filter.LeafNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -31,7 +31,7 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.DirectoryPartitionConfiguration;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -170,7 +170,7 @@
         }
         else
         {
-            return new LdapName( getConfiguration().getSuffix() );
+            return new LdapDN( getConfiguration().getSuffix() );
         }
     }
 

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -60,7 +60,7 @@
 import org.apache.directory.shared.ldap.message.PersistentSearchControl;
 import org.apache.directory.shared.ldap.message.SubentriesControl;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.util.DateUtils;
@@ -295,7 +295,7 @@
             String suffix = ( String ) suffixes.next();
             try
             {
-                removeContextPartition( new LdapName( suffix ) );
+                removeContextPartition( new LdapDN( suffix ) );
             }
             catch ( NamingException e )
             {
@@ -487,7 +487,7 @@
 
     public Name getSuffix( boolean normalized )
     {
-        return new LdapName();
+        return LdapDN.EMPTY_LDAPDN;
     }
 
 

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=411648&r1=411647&r2=411648&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 20:07:59 2006
@@ -26,7 +26,7 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.server.core.configuration.DirectoryPartitionConfiguration;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -70,7 +70,7 @@
 
         try
         {
-            adminDn = new LdapName( ADMIN_PRINCIPAL );
+            adminDn = new LdapDN( ADMIN_PRINCIPAL );
         }
         catch ( NamingException e )
         {
@@ -92,7 +92,7 @@
 
         try
         {
-            groupsBaseDn = new LdapName( GROUPS_BASE_NAME );
+            groupsBaseDn = new LdapDN( GROUPS_BASE_NAME );
         }
         catch ( NamingException e )
         {
@@ -114,7 +114,7 @@
 
         try
         {
-            usersBaseDn = new LdapName( USERS_BASE_NAME );
+            usersBaseDn = new LdapDN( USERS_BASE_NAME );
         }
         catch ( NamingException e )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java Sun Jun  4 20:07:59 2006
@@ -30,7 +30,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.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -112,7 +112,7 @@
          */
         else if ( null != aliasedBase ) // mode = FINDING || ALWAYS
         {
-            effectiveBase = new LdapName( aliasedBase );
+            effectiveBase = new LdapDN( aliasedBase );
         }
         /*
          * I the base not an alias the we just set the base to the given base

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java Sun Jun  4 20:07:59 2006
@@ -33,7 +33,7 @@
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
 import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
 import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -187,7 +187,7 @@
 
         try
         {
-            LdapName dn = new LdapName( partition.getEntryDn( id ) );
+            LdapDN dn = new LdapDN( partition.getEntryDn( id ) );
             buf.append( "(" ).append( id ).append( ") " );
             buf.append( dn.getRdn() );
         }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java Sun Jun  4 20:07:59 2006
@@ -31,6 +31,7 @@
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sun Jun  4 20:07:59 2006
@@ -63,14 +63,16 @@
 import org.apache.directory.server.core.partition.impl.btree.Index;
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
 import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
+
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.DerefAliasesEnum;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -444,7 +446,7 @@
                 String updn = entry.getDn();
                 Attributes attrs = entry.getAttributes();
                 
-                LdapName ndn = new LdapName( StringTools.deepTrimToLower( updn ) );
+                LdapDN ndn = new LdapDN( StringTools.deepTrimToLower( updn ) );
 
                 if ( null == partition.getEntryId( ndn.toString() ) )
                 {
@@ -644,7 +646,7 @@
 
         env.put( DerefAliasesEnum.JNDI_PROP, DerefAliasesEnum.DEREFALWAYS_NAME );
 
-        NamingEnumeration cursor = eng.search( new LdapName( base ), env, root, ctls );
+        NamingEnumeration cursor = eng.search( new LdapDN( base ), env, root, ctls );
         String[] cols = new String[2];
         cols[0] = "id";
         cols[1] = "dn";

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java Sun Jun  4 20:07:59 2006
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.BTreeDirectoryPartition;
 import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java Sun Jun  4 20:07:59 2006
@@ -48,16 +48,18 @@
 import org.apache.directory.server.core.partition.impl.btree.IndexAssertionEnumeration;
 import org.apache.directory.server.core.partition.impl.btree.IndexNotFoundException;
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
+
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -122,7 +124,7 @@
     public synchronized void init( DirectoryServiceConfiguration factoryCfg, DirectoryPartitionConfiguration cfg )
         throws NamingException
     {
-        this.upSuffix = new LdapName( cfg.getSuffix() );
+        this.upSuffix = new LdapDN( cfg.getSuffix() );
         this.normSuffix = cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() );
 
         File workingDirectory = new File( factoryCfg.getStartupConfiguration().getWorkingDirectory().getPath()
@@ -560,7 +562,7 @@
         String targetDn = ( String ) aliasIdx.reverseLookup( aliasId );
         BigInteger targetId = getEntryId( targetDn );
         String aliasDn = getEntryDn( aliasId );
-        Name ancestorDn = new LdapName( aliasDn ).getPrefix( 1 );
+        Name ancestorDn = new LdapDN( aliasDn ).getPrefix( 1 );
         BigInteger ancestorId = getEntryId( ancestorDn.toString() );
 
         /*
@@ -610,7 +612,7 @@
 
         // Access aliasedObjectName, normalize it and generate the Name 
         normalizer = oneAliasIdx.getAttribute().getEquality().getNormalizer();
-        targetDn = new LdapName( ( String ) normalizer.normalize( aliasTarget ) );
+        targetDn = new LdapDN( ( String ) normalizer.normalize( aliasTarget ) );
 
         /*
          * Check For Cycles
@@ -1005,7 +1007,7 @@
         if ( mods.getID().equals( DirectoryPartition.ALIAS_ATTRIBUTE ) )
         {
             String ndnStr = ( String ) ndnIdx.reverseLookup( id );
-            addAliasIndices( id, new LdapName( ndnStr ), ( String ) mods.get() );
+            addAliasIndices( id, new LdapDN( ndnStr ), ( String ) mods.get() );
         }
     }
 
@@ -1118,7 +1120,7 @@
         if ( mods.getID().equals( DirectoryPartition.ALIAS_ATTRIBUTE ) )
         {
             String ndnStr = ( String ) ndnIdx.reverseLookup( id );
-            addAliasIndices( id, new LdapName( ndnStr ), ( String ) mods.get() );
+            addAliasIndices( id, new LdapDN( ndnStr ), ( String ) mods.get() );
         }
     }
 
@@ -1224,7 +1226,7 @@
         String newRdnValue = NamespaceTools.getRdnValue( newRdn );
         BigInteger id = getEntryId( dn.toString() );
         Attributes entry = lookup( id );
-        Name updn = new LdapName( getEntryUpdn( id ) );
+        Name updn = new LdapDN( getEntryUpdn( id ) );
 
         /* 
          * H A N D L E   N E W   R D N
@@ -1361,7 +1363,7 @@
 
             if ( null != aliasTarget )
             {
-                addAliasIndices( id, new LdapName( getEntryDn( id ) ), aliasTarget );
+                addAliasIndices( id, new LdapDN( getEntryDn( id ) ), aliasTarget );
             }
         }
 
@@ -1377,8 +1379,8 @@
              * new name and adding the child's old upRdn to new name as its Rdn
              */
             Name childUpdn = ( Name ) updn.clone();
-            Name oldUpdn = new LdapName( getEntryUpdn( childId ) );
-            String rdn = LdapName.getRdn( oldUpdn );
+            Name oldUpdn = new LdapDN( getEntryUpdn( childId ) );
+            String rdn = oldUpdn.get( oldUpdn.size() - 1 );
             childUpdn.add( childUpdn.size(), rdn );
 
             // Recursively change the names of the children below
@@ -1443,9 +1445,9 @@
          * user provided RDN & the new parent's UPDN.  Basically add the child's
          * UpRdn String to the tail of the new parent's Updn Name.
          */
-        Name childUpdn = new LdapName( getEntryUpdn( childId ) );
+        Name childUpdn = new LdapDN( getEntryUpdn( childId ) );
         String childRdn = childUpdn.get( childUpdn.size() - 1 );
-        Name newUpdn = new LdapName( getEntryUpdn( newParentId ) );
+        Name newUpdn = new LdapDN( getEntryUpdn( newParentId ) );
         newUpdn.add( newUpdn.size(), childRdn );
 
         // Call the modifyDn operation with the new updn

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Sun Jun  4 20:07:59 2006
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.partition.impl.btree.TupleEnumeration;
 import org.apache.directory.server.core.partition.impl.btree.TupleRenderer;
 import org.apache.directory.server.core.schema.SerializableComparator;
+
 import org.apache.directory.shared.ldap.util.EmptyEnumeration;
 import org.apache.directory.shared.ldap.util.SingletonEnumeration;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java Sun Jun  4 20:07:59 2006
@@ -16,11 +16,11 @@
  */
 package org.apache.directory.server.core.prefs;
 
-
+ 
 import javax.naming.Name;
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -45,7 +45,7 @@
      */
     public static Name toSysDn( String absPrefPath ) throws NamingException
     {
-        LdapName dn = new LdapName( SYSPREF_BASE );
+        LdapDN dn = new LdapDN( SYSPREF_BASE );
 
         String[] comps = absPrefPath.split( "/" );
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java Sun Jun  4 20:07:59 2006
@@ -41,6 +41,7 @@
 import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
+
 import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.util.PreferencesDictionary;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.java Sun Jun  4 20:07:59 2006
@@ -23,7 +23,7 @@
 import javax.naming.InvalidNameException;
 import javax.naming.Name;
 
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -83,7 +83,7 @@
     {
         if ( dn == null )
             throw new IllegalArgumentException( "dn cannot be null" );
-        Name farthest = new LdapName();
+        Name farthest = new LdapDN();
         for ( int ii = 0; ii < dn.size(); ii++ )
         {
             try

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Sun Jun  4 20:07:59 2006
@@ -53,6 +53,7 @@
 import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy;
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
 import org.apache.directory.server.core.schema.ConcreteNameComponentNormalizer;
+
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
@@ -62,8 +63,10 @@
 import org.apache.directory.shared.ldap.filter.LeafNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+
+// TODO remove the need for the parser by using LdapDN
 import org.apache.directory.shared.ldap.name.DnParser;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -165,7 +168,7 @@
         Iterator suffixes = nexus.listSuffixes( true );
         while ( suffixes.hasNext() )
         {
-            Name suffix = new LdapName( ( String ) suffixes.next() );
+            Name suffix = new LdapDN( ( String ) suffixes.next() );
             addReferrals( nexus.search( suffix, env, getReferralFilter(), getControls() ), suffix );
         }
     }
@@ -220,7 +223,7 @@
              * name past the farthest referral DN which the target name extends.
              */
             int diff = targetUpdn.size() - farthest.size();
-            Name extra = new LdapName();
+            Name extra = new LdapDN();
             for ( int jj = 0; jj < diff; jj++ )
             {
                 extra.add( targetUpdn.get( farthest.size() + jj ) );
@@ -276,7 +279,7 @@
 
             Attributes referral = invocation.getProxy().lookup( farthest, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
             Attribute refs = referral.get( REF_ATTR );
-            doReferralException( farthest, new LdapName( upName ), refs );
+            doReferralException( farthest, new LdapDN( upName ), refs );
         }
         else if ( refval.equals( FOLLOW ) )
         {
@@ -1042,7 +1045,7 @@
 
             Name urlDn = parser.parse( ldapUrl.getDn().toString() );
             int diff = targetUpdn.size() - farthest.size();
-            Name extra = new LdapName();
+            Name extra = new LdapDN();
             for ( int jj = 0; jj < diff; jj++ )
             {
                 extra.add( targetUpdn.get( farthest.size() + jj ) );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Sun Jun  4 20:07:59 2006
@@ -27,6 +27,7 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.server.core.schema.ConcreteNameComponentNormalizer;
+
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
@@ -38,8 +39,10 @@
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SubentriesControl;
+
+// TODO remove DnParser and just use LdapDN instead
 import org.apache.directory.shared.ldap.name.DnParser;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
 
@@ -245,7 +248,7 @@
         while ( list.hasNext() )
         {
             String subentryDnStr = ( String ) list.next();
-            Name subentryDn = new LdapName( subentryDnStr );
+            Name subentryDn = new LdapDN( subentryDnStr );
             Name apDn = ( Name ) subentryDn.clone();
             apDn.remove( apDn.size() - 1 );
             SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn );
@@ -403,7 +406,7 @@
             while ( list.hasNext() )
             {
                 String subentryDnStr = ( String ) list.next();
-                Name subentryDn = new LdapName( subentryDnStr );
+                Name subentryDn = new LdapDN( subentryDnStr );
                 Name apDn = ( Name ) subentryDn.clone();
                 apDn.remove( apDn.size() - 1 );
                 SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn );
@@ -583,7 +586,7 @@
         while ( subentries.hasNext() )
         {
             String subentryDn = ( String ) subentries.next();
-            Name apDn = new LdapName( subentryDn );
+            Name apDn = new LdapDN( subentryDn );
             apDn.remove( apDn.size() - 1 );
             SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn );
             boolean isOldNameSelected = evaluator.evaluate( ss, apDn, oldName, objectClasses );

Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java (original)
+++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java Sun Jun  4 20:07:59 2006
@@ -17,10 +17,10 @@
 package org.apache.directory.server.core.prefs;
 
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.prefs.PreferencesUtils;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import junit.framework.TestCase;
 
@@ -45,35 +45,35 @@
 
         String test = "/org/apache/kerberos/";
 
-        Name dn = PreferencesUtils.toSysDn( test );
+        LdapDN dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.toString(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
+        assertEquals( dn.toUpName(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
             + PreferencesUtils.SYSPREF_BASE );
 
         // simple test without trailing '/'
 
         test = "/org/apache/kerberos";
 
-        dn = PreferencesUtils.toSysDn( test );
+        dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.toString(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
+        assertEquals( dn.toUpName(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
             + PreferencesUtils.SYSPREF_BASE );
 
         // basis condition tests
 
         test = "/";
 
-        dn = PreferencesUtils.toSysDn( test );
+        dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.toString(), PreferencesUtils.SYSPREF_BASE );
+        assertEquals( dn.toUpName(), PreferencesUtils.SYSPREF_BASE );
 
         // endpoint tests
 
         test = "//////";
 
-        dn = PreferencesUtils.toSysDn( test );
+        dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.toString(), PreferencesUtils.SYSPREF_BASE );
+        assertEquals( dn.toUpName(), PreferencesUtils.SYSPREF_BASE );
 
     }
 }

Modified: directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java (original)
+++ directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java Sun Jun  4 20:07:59 2006
@@ -19,6 +19,7 @@
 
 import java.util.Hashtable;
 
+import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 import javax.naming.event.EventContext;
 import javax.naming.event.NamingExceptionEvent;
@@ -64,7 +65,7 @@
     }
 
 
-    public void notificationReceived( UnsolicitedNotificationEvent evt )
+    public void notificationReceived( UnsolicitedNotificationEvent evt ) 
     {
         notification = evt.getNotification();
 
@@ -77,7 +78,18 @@
         else if ( notification.getID().equals( GracefulDisconnect.EXTENSION_OID ) )
         {
             System.out.println( "Recieved GracefulDisconnect: " + GracefulDisconnect.EXTENSION_OID );
-            GracefulDisconnect gd = new GracefulDisconnect( notification.getEncodedValue() );
+            GracefulDisconnect gd = null;
+            
+            try
+            {
+                gd = new GracefulDisconnect( notification.getEncodedValue() );
+            }
+            catch ( NamingException e )
+            {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            
             System.out.println( "LDAP server will shutdown in " + gd.getDelay() + " seconds." );
             System.out.println( "LDAP server will be back online in " + gd.getTimeOffline() + " minutes." );
 

Modified: directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java?rev=411648&r1=411647&r2=411648&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java (original)
+++ directory/branches/apacheds/optimization/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java Sun Jun  4 20:07:59 2006
@@ -138,7 +138,7 @@
         bb.clear();
     }
 
-    private LdapMessage readResponse( ByteBuffer bb ) throws IOException, DecoderException
+    private LdapMessage readResponse( ByteBuffer bb ) throws IOException, DecoderException, NamingException
     {
 
         LdapMessage messageResp = null;
@@ -526,7 +526,7 @@
      * 
      * @param messageId The message Id
      */
-    private void bind( int messageId ) throws InvalidNameException, EncoderException, DecoderException, IOException
+    private void bind( int messageId ) throws NamingException, EncoderException, DecoderException, IOException
     {
         BindRequest bindRequest = new BindRequest();
         LdapMessage message = new LdapMessage();



Mime
View raw message