directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r412285 - in /directory/branches/apacheds/optimization: core/src/main/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/authz/support/ core/src/main/java/org/apache/directory/server/core/config...
Date Wed, 07 Jun 2006 04:16:12 GMT
Author: akarasulu
Date: Tue Jun  6 21:16:10 2006
New Revision: 412285

URL: http://svn.apache.org/viewvc?rev=412285&view=rev
Log:
removed LdapName and DnParser as well as dependent clases

Modified:
    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/authz/GroupCache.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.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/event/ScopeEvaluator.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/partition/DirectoryPartitionNexus.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/schema/bootstrap/SystemComparatorProducer.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java
    directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/branches/apacheds/optimization/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java
    directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
    directory/branches/apacheds/optimization/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -41,7 +41,6 @@
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DnParser;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import org.slf4j.Logger;
@@ -130,8 +129,6 @@
     private GroupCache groupCache;
     /** a normalizing ACIItem parser */
     private ACIItemParser aciParser;
-    /** a normalizing DN parser */
-    private DnParser dnParser;
     /** use and instance of the ACDF engine */
     private ACDFEngine engine;
     /** interceptor chain */
@@ -348,7 +345,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.add(normName, entry );
             tupleCache.subentryAdded( normName.toUpName(), normName, entry );
@@ -418,7 +415,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.delete( name );
             tupleCache.subentryDeleted( name, entry );
@@ -458,7 +455,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.modify( name, modOp, mods );
             tupleCache.subentryModified( name, modOp, mods, entry );
@@ -523,7 +520,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.modify( name, mods );
             tupleCache.subentryModified( name, mods, entry );
@@ -578,7 +575,7 @@
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN userName = parseNormalized( principal.getName() );
 
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled
             || name.toString().trim().equals( "" ) ) // no checks on the rootdse
         {
             return next.hasEntry( name );
@@ -654,7 +651,7 @@
         Attributes entry = proxy.lookup( dn, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
 
-        if ( principal.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
+        if ( principal.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return next.lookup( dn, attrIds );
         }
@@ -671,7 +668,7 @@
         Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
         LdapPrincipal user = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
 
-        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
+        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return next.lookup( name );
         }
@@ -691,7 +688,7 @@
         LdapDN userName = parseNormalized( principal.getName() );
         LdapDN newName = ( LdapDN ) name.clone();
         newName.remove( name.size() - 1 );
-        newName.add( dnParser.parse( newRn ).get( 0 ) );
+        newName.add( parseNormalized( newRn ).get( 0 ) );
 
         // bypass authz code if we are disabled
         if ( !enabled )
@@ -701,7 +698,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.modifyRn( name, newRn, deleteOldRn );
             tupleCache.subentryRenamed( name, newName );
@@ -773,7 +770,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.move( oriChildName, newParentName, newRn, deleteOldRn );
             tupleCache.subentryRenamed( oriChildName, newName );
@@ -849,7 +846,7 @@
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
             next.move( oriChildName, newParentName );
             tupleCache.subentryRenamed( oriChildName, newName );
@@ -887,7 +884,7 @@
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapPrincipal user = ctx.getPrincipal();
         NamingEnumeration e = next.list( base );
-        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
+        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return e;
         }
@@ -906,7 +903,7 @@
 
         boolean isSubschemaSubentryLookup = subschemaSubentryDn.equals( base.toString() );
         boolean isRootDSELookup = base.size() == 0 && searchCtls.getSearchScope() == SearchControls.OBJECT_SCOPE;
-        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled || isRootDSELookup
+        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled || isRootDSELookup
             || isSubschemaSubentryLookup )
         {
             return e;
@@ -925,7 +922,7 @@
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN userName = parseNormalized( principal.getName() );
 
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return next.compare( name, oid, value );
         }
@@ -952,7 +949,7 @@
         DirectoryPartitionNexusProxy proxy = invocation.getProxy();
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN userName = parseNormalized( principal.getName() );
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
+        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return next.getMatchedName( dn );
         }
@@ -1059,35 +1056,16 @@
         return true;
     }
 
+
     /**
      * WARNING: create one of these filters fresh every time for each new search.
      */
     class AuthorizationFilter implements SearchResultFilter
     {
-        /** dedicated normalizing parser for this search - cheaper than synchronization */
-        final DnParser parser;
-
-
-        public AuthorizationFilter() throws NamingException
-        {
-            parser = new DnParser( new ConcreteNameComponentNormalizer( attrRegistry ) );
-        }
-
-
         public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
             throws NamingException
         {
             LdapDN normName = parseNormalized( result.getName() );
-
-            // looks like isRelative returns true even when the names for results are absolute!!!!
-            // @todo this is a big bug in JNDI provider
-
-            //            if ( result.isRelative() )
-            //            {
-            //                LdapDN base = parser.parse( ctx.getNameInNamespace() );
-            //                normName = base.addAll( normName );
-            //            }
-
             return filter( invocation, normName, result );
         }
     }

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -59,17 +59,17 @@
     /**
      * the administrator's distinguished {@link Name}
      */
-    private static Name ADMIN_DN;
+    private static LdapDN ADMIN_DN;
 
     /**
      * the base distinguished {@link Name} for all users
      */
-    private static Name USER_BASE_DN;
+    private static LdapDN USER_BASE_DN;
 
     /**
      * the base distinguished {@link Name} for all groups
      */
-    private static Name GROUP_BASE_DN;
+    private static LdapDN GROUP_BASE_DN;
 
     /**
      * the name parser used by this service
@@ -443,22 +443,22 @@
     private boolean isSearchable( Invocation invocation, SearchResult result ) throws NamingException
     {
         Name dn;
-        Name principalDn = ( ( ServerContext ) invocation.getCaller() ).getPrincipal().getJndiName();
+        LdapDN principalDn = ( LdapDN ) ( ( ServerContext ) invocation.getCaller() ).getPrincipal().getJndiName();
 
         dn = new LdapDN( result.getName() );
         principalDn = new LdapDN( principalDn.toString() );
 
-        if ( !principalDn.equals( ADMIN_DN ) )
+        if ( !principalDn.toString().equals( ADMIN_DN.toUpName() ) )
         {
             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.toString().equals( principalDn.toUpName() )  )) || dn.startsWith( GROUP_BASE_DN ) )
                 {
                     return false;
                 }
             }
 
-            if ( dn.equals( ADMIN_DN ) )
+            if ( dn.toString().equals( ADMIN_DN.toUpName() ) )
             {
                 return false;
             }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Tue Jun  6 21:16:10 2006
@@ -19,10 +19,8 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
-import org.apache.directory.server.core.schema.ConcreteNameComponentNormalizer;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.name.DnParser;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -61,8 +59,6 @@
     private final DirectoryPartitionNexus nexus;
     /** the env to use for searching */
     private final Hashtable env;
-    /** the normalizing Dn parser for member names */
-    private DnParser parser;
 
 
     /**
@@ -74,12 +70,18 @@
     {
         this.nexus = factoryCfg.getPartitionNexus();
         this.env = ( Hashtable ) factoryCfg.getEnvironment().clone();
-        this.parser = new DnParser( new ConcreteNameComponentNormalizer( factoryCfg.getGlobalRegistries()
-            .getAttributeTypeRegistry() ) );
         initialize();
     }
 
 
+    private LdapDN parseNormalized( String name ) throws NamingException
+    {
+        LdapDN dn = new LdapDN( name );
+        dn.normalize();
+        return dn;
+    }
+
+
     private void initialize() throws NamingException
     {
         // search all naming contexts for static groups and generate
@@ -102,7 +104,7 @@
             {
                 SearchResult result = ( SearchResult ) results.next();
                 String groupDn = result.getName();
-                groupDn = parser.parse( groupDn ).toString();
+                groupDn = parseNormalized( groupDn ).toString();
                 Attribute members = getMemberAttribute( result.getAttributes() );
 
                 if ( members != null )
@@ -182,7 +184,7 @@
 
             try
             {
-                memberDn = parser.parse( memberDn ).toString();
+                memberDn = parseNormalized( memberDn ).toString();
             }
             catch ( NamingException e )
             {
@@ -210,7 +212,7 @@
 
             try
             {
-                memberDn = parser.parse( memberDn ).toString();
+                memberDn = parseNormalized( memberDn ).toString();
             }
             catch ( NamingException e )
             {
@@ -401,7 +403,7 @@
     {
         try
         {
-            member = parser.parse( member ).toString();
+            member = parseNormalized( member ).toString();
         }
         catch ( NamingException e )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Tue Jun  6 21:16:10 2006
@@ -39,7 +39,6 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DnParser;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 import org.slf4j.Logger;
@@ -74,8 +73,6 @@
     private final DirectoryPartitionNexus nexus;
     /** a normalizing ACIItem parser */
     private final ACIItemParser aciParser;
-    /** a normalizing DN parser */
-    private final DnParser dnParser;
 
 
     /**
@@ -89,11 +86,18 @@
         AttributeTypeRegistry registry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
         NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( registry );
         aciParser = new ACIItemParser( ncn );
-        dnParser = new DnParser( ncn );
         env = ( Hashtable ) factoryCfg.getEnvironment().clone();
         initialize();
     }
 
+    
+    private LdapDN parseNormalized( String name ) throws NamingException
+    {
+        LdapDN dn = new LdapDN( name );
+        dn.normalize();
+        return dn;
+    }
+
 
     private void initialize() throws NamingException
     {
@@ -120,7 +124,7 @@
                     continue;
                 }
 
-                Name normName = dnParser.parse( subentryDn );
+                Name normName = parseNormalized( subentryDn );
                 subentryAdded( subentryDn, normName, result.getAttributes() );
             }
             results.close();

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Tue Jun  6 21:16:10 2006
@@ -21,7 +21,6 @@
 
 import java.util.*;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -33,10 +32,8 @@
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
-import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
-import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Tue Jun  6 21:16:10 2006
@@ -21,7 +21,6 @@
 
 import java.util.*;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Tue Jun  6 21:16:10 2006
@@ -22,7 +22,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Tue Jun  6 21:16:10 2006
@@ -19,10 +19,9 @@
 package org.apache.directory.server.core.authz.support;
 
 
-import java.util.Collection;
+import java.util.Collection;  
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Tue Jun  6 21:16:10 2006
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Tue Jun  6 21:16:10 2006
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -19,7 +19,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.partition.DirectoryPartition;

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -57,7 +57,6 @@
     private final int scope;
     private SearchResult prefetched;
     private int refIndex = -1;
-    private AttributeTypeRegistry registry;
 
 
     public ReferralHandlingEnumeration( NamingEnumeration underlying, ReferralLut lut, AttributeTypeRegistry registry,
@@ -68,7 +67,6 @@
         this.lut = lut;
         this.scope = scope;
         this.nexus = nexus;
-        this.registry = registry;
         prefetch();
     }
 

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -18,15 +18,12 @@
 
 
 import javax.naming.NamingException;
-import javax.naming.Name;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.Attributes;
 
 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;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -37,12 +34,8 @@
  */
 public class ScopeEvaluator implements Evaluator
 {
-    private DnParser parser = null;
-
-
     public ScopeEvaluator() throws NamingException
     {
-        parser = new DnParser();
     }
 
 
@@ -60,8 +53,8 @@
             case ( SearchControls.ONELEVEL_SCOPE  ):
                 if ( dn.endsWith( snode.getBaseDn() ) )
                 {
-                    Name candidateDn = parser.parse( dn );
-                    Name scopeDn = parser.parse( snode.getBaseDn() );
+                    LdapDN candidateDn = new LdapDN( dn );
+                    LdapDN scopeDn = new LdapDN( snode.getBaseDn() );
                     return ( scopeDn.size() + 1 ) == candidateDn.size();
                 }
             case ( SearchControls.SUBTREE_SCOPE  ):

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -52,7 +52,6 @@
 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.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;
@@ -603,13 +602,19 @@
      * Non-federated implementation presuming the name argument is not a 
      * composite name spanning multiple namespaces but a compound name in 
      * the same LDAP namespace.  Hence the parser returned is always the
-     * same as calling this method with the empty String.
+     * same as calling this method with the empty String. 
      * 
      * @see javax.naming.Context#getNameParser(java.lang.String)
      */
     public NameParser getNameParser( String name ) throws NamingException
     {
-        return new DnParser();
+        return new NameParser()
+        {
+            public Name parse( String name ) throws NamingException
+            {
+                return new LdapDN( name );
+            }
+        };
     }
 
 
@@ -623,7 +628,13 @@
      */
     public NameParser getNameParser( Name name ) throws NamingException
     {
-        return new DnParser();
+        return new NameParser()
+        {
+            public Name parse( String name ) throws NamingException
+            {
+                return new LdapDN( name );
+            }
+        };
     }
 
 

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=412285&r1=412284&r2=412285&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 Tue Jun  6 21:16:10 2006
@@ -43,6 +43,8 @@
 {
     /** the default user principal or DN */
     public final static String ADMIN_PRINCIPAL = "uid=admin,ou=system";
+    /** the normalized user principal or DN */
+    public final static String ADMIN_PRINCIPAL_NORMALIZED = "0.9.2342.19200300.100.1.1=admin,2.5.4.11=system";
     /** the admin super user uid */
     public final static String ADMIN_UID = "admin";
     /** the initial admin passwd set on startup */
@@ -100,9 +102,9 @@
      * A new Name instance is created and returned every time.
      * @return the groups base DN
      */
-    public static final Name getGroupsBaseName()
+    public static final LdapDN getGroupsBaseName()
     {
-        Name groupsBaseDn = null;
+        LdapDN groupsBaseDn = null;
 
         try
         {
@@ -122,9 +124,9 @@
      * A new Name instance is created and returned every time.
      * @return the users base DN
      */
-    public static final Name getUsersBaseName()
+    public static final LdapDN getUsersBaseName()
     {
-        Name usersBaseDn = null;
+        LdapDN usersBaseDn = null;
 
         try
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Tue Jun  6 21:16:10 2006
@@ -48,7 +48,6 @@
 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.DITContentRule;
@@ -135,7 +134,7 @@
 
         // stuff for dealing with subentries (garbage for now)
         String subschemaSubentry = ( String ) nexus.getRootDSE().get( "subschemaSubentry" ).get();
-        subschemaSubentryDn = new LdapName( subschemaSubentry ).toString().toLowerCase();
+        subschemaSubentryDn = new LdapDN( subschemaSubentry ).toString().toLowerCase();
     }
 
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java Tue Jun  6 21:16:10 2006
@@ -21,13 +21,13 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.server.core.schema.ConcreteNameComponentNormalizer;
+import jdbm.helper.StringComparator;
+
 import org.apache.directory.server.core.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.shared.ldap.schema.CachingNormalizer;
 import org.apache.directory.shared.ldap.schema.ComparableComparator;
 import org.apache.directory.shared.ldap.schema.DeepTrimNormalizer;
 import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
-import org.apache.directory.shared.ldap.schema.DnComparator;
 import org.apache.directory.shared.ldap.schema.NormalizingComparator;
 import org.apache.directory.shared.ldap.schema.ObjectIdentifierComparator;
 
@@ -63,7 +63,7 @@
          ( 2.5.13.1 NAME 'distinguishedNameMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
          */
-        comparator = new DnComparator( new ConcreteNameComponentNormalizer( registries.getAttributeTypeRegistry() ) );
+        comparator = new StringComparator();
         cb.schemaObjectProduced( this, "2.5.13.1", comparator );
 
         /*

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java Tue Jun  6 21:16:10 2006
@@ -19,12 +19,10 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.server.core.schema.ConcreteNameComponentNormalizer;
 import org.apache.directory.server.core.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.shared.ldap.schema.CachingNormalizer;
 import org.apache.directory.shared.ldap.schema.DeepTrimNormalizer;
 import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
-import org.apache.directory.shared.ldap.schema.DnNormalizer;
 import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.ObjectIdentifierNormalizer;
@@ -56,8 +54,7 @@
          ( 2.5.13.1 NAME 'distinguishedNameMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
          */
-        normalizer = new CachingNormalizer( new DnNormalizer( new ConcreteNameComponentNormalizer( registries
-            .getAttributeTypeRegistry() ) ) );
+        normalizer = new CachingNormalizer( new NoOpNormalizer() );
         cb.schemaObjectProduced( this, "2.5.13.1", normalizer );
 
         /*

Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Tue Jun  6 21:16:10 2006
@@ -20,7 +20,6 @@
 import junit.framework.TestCase;
 
 import javax.naming.directory.*;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.GlobalRegistries;
@@ -29,7 +28,7 @@
 import org.apache.directory.server.core.schema.bootstrap.*;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 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 java.util.Set;
 import java.util.HashSet;
@@ -111,7 +110,7 @@
      */
     public void testPreventStructuralClassRemovalOnModifyReplace() throws Exception
     {
-        Name name = new LdapName( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
         int mod = DirContext.REPLACE_ATTRIBUTE;
         Attributes modifyAttributes = new BasicAttributes( true );
         modifyAttributes.put( new BasicAttribute( "cn" ) );
@@ -166,7 +165,7 @@
      */
     public void testPreventStructuralClassRemovalOnModifyRemove() throws Exception
     {
-        Name name = new LdapName( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
         int mod = DirContext.REMOVE_ATTRIBUTE;
         Attributes modifyAttributes = new BasicAttributes( true );
         Attribute entryObjectClasses = new BasicAttribute( "objectClass" );
@@ -231,7 +230,7 @@
     public void testPreventRdnChangeOnModifyRemove() throws Exception
     {
         int mod = DirContext.REMOVE_ATTRIBUTE;
-        Name name = new LdapName( "ou=user,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
         Attributes attributes = new BasicAttributes( true );
         attributes.put( "cn", "does not matter" );
 
@@ -251,7 +250,7 @@
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new LdapName( "ou=users+cn=system users,dc=example,dc=com" );
+        name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new BasicAttributes( true );
         attributes.put( "sn", "does not matter" );
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes );
@@ -296,7 +295,7 @@
     public void testPreventRdnChangeOnModifyReplace() throws Exception
     {
         int mod = DirContext.REPLACE_ATTRIBUTE;
-        Name name = new LdapName( "ou=user,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
         Attributes attributes = new BasicAttributes( true );
         attributes.put( "cn", "does not matter" );
 
@@ -316,7 +315,7 @@
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new LdapName( "ou=users+cn=system users,dc=example,dc=com" );
+        name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new BasicAttributes( true );
         attributes.put( "sn", "does not matter" );
         SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes );
@@ -368,7 +367,7 @@
         ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
 
         // this should pass
-        Name name = new LdapName( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
         int mod = DirContext.REPLACE_ATTRIBUTE;
         SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, new BasicAttribute( "cn" ) );
 
@@ -412,7 +411,7 @@
      */
     public void testPreventStructuralClassRemovalOnModifyRemoveAttribute() throws Exception
     {
-        Name name = new LdapName( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
         int mod = DirContext.REMOVE_ATTRIBUTE;
         Attribute entryObjectClasses = new BasicAttribute( "objectClass" );
         entryObjectClasses.add( "top" );
@@ -469,7 +468,7 @@
     public void testPreventRdnChangeOnModifyRemoveAttribute() throws Exception
     {
         int mod = DirContext.REMOVE_ATTRIBUTE;
-        Name name = new LdapName( "ou=user,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
 
         // postive test which should pass
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new BasicAttribute( "cn", "does not matter" ) );
@@ -486,7 +485,7 @@
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new LdapName( "ou=users+cn=system users,dc=example,dc=com" );
+        name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new BasicAttribute( "sn", "does not matter" ) );
 
         // test for failure when modifying Rdn attribute in multi attribute Rdn
@@ -524,7 +523,7 @@
     public void testPreventRdnChangeOnModifyReplaceAttribute() throws Exception
     {
         int mod = DirContext.REPLACE_ATTRIBUTE;
-        Name name = new LdapName( "ou=user,dc=example,dc=com" );
+        LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
 
         // postive test which should pass
         SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, new BasicAttribute( "cn", "does not matter" ) );
@@ -541,7 +540,7 @@
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new LdapName( "ou=users+cn=system users,dc=example,dc=com" );
+        name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, new BasicAttribute( "sn", "does not matter" ) );
 
         // test for failure when modifying Rdn attribute in multi attribute Rdn

Modified: directory/branches/apacheds/optimization/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java (original)
+++ directory/branches/apacheds/optimization/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java Tue Jun  6 21:16:10 2006
@@ -31,7 +31,7 @@
 
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -68,13 +68,9 @@
         {
             DirStateFactory factory = new PrincipalStateFactory();
             Result result = factory.getStateToBind( entry, null, null, null, null );
-
             Attributes attrs = result.getAttributes();
-
-            LdapName name = new LdapName( "uid=" + entry.getUserId() + ",ou=Users" );
-
+            LdapDN name = new LdapDN( "uid=" + entry.getUserId() + ",ou=Users" );
             ctx.rebind( name, null, attrs );
-
             return name.toString();
         }
         catch ( NamingException ne )

Modified: directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java (original)
+++ directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java Tue Jun  6 21:16:10 2006
@@ -43,7 +43,7 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.extended.LaunchDiagnosticUiRequest;
 import org.apache.directory.shared.ldap.message.extended.LaunchDiagnosticUiResponse;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.common.IoSession;
 
 
@@ -93,7 +93,7 @@
             int launchedWindowCount = 0;
             while ( list.hasNext() )
             {
-                LdapName dn = new LdapName( ( String ) list.next() );
+                LdapDN dn = new LdapDN( ( String ) list.next() );
                 DirectoryPartition partition = nexus.getPartition( dn );
                 if ( partition instanceof BTreeDirectoryPartition )
                 {

Modified: directory/branches/apacheds/optimization/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=412285&r1=412284&r2=412285&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/branches/apacheds/optimization/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Tue Jun  6 21:16:10 2006
@@ -25,7 +25,6 @@
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
@@ -39,7 +38,7 @@
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.LdapName;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.util.AvailablePortFinder;
 
 
@@ -188,7 +187,7 @@
             {
                 Entry entry = ( Entry) iterator.next();
 
-                Name dn = new LdapName( entry.getDn() );
+                LdapDN dn = new LdapDN( entry.getDn() );
                 dn.remove( 0 );
 
                 ctx.createSubcontext( dn, entry.getAttributes() );



Mime
View raw message