directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r359062 - in /directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support: CompareHandler.java ModifyDnHandler.java SearchHandler.java
Date Mon, 26 Dec 2005 10:55:33 GMT
Author: elecharny
Date: Mon Dec 26 02:55:25 2005
New Revision: 359062

URL: http://svn.apache.org/viewcvs?rev=359062&view=rev
Log:
Replaced LdapName by LdapDN

Modified:
    directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/CompareHandler.java
    directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/ModifyDnHandler.java
    directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java

Modified: directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/CompareHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/CompareHandler.java?rev=359062&r1=359061&r2=359062&view=diff
==============================================================================
--- directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/CompareHandler.java
(original)
+++ directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/CompareHandler.java
Mon Dec 26 02:55:25 2005
@@ -17,6 +17,7 @@
 package org.apache.ldap.server.protocol.support;
 
 
+import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.ldap.LdapContext;
 
@@ -26,7 +27,7 @@
 import org.apache.ldap.common.message.CompareResponseImpl;
 import org.apache.ldap.common.message.LdapResultImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
-import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.util.ExceptionUtils;
 import org.apache.ldap.server.jndi.ServerLdapContext;
 import org.apache.ldap.server.protocol.SessionRegistry;
@@ -56,7 +57,7 @@
         {
             LdapContext ctx = SessionRegistry.getSingleton().getLdapContext( session, null,
true );
             ServerLdapContext newCtx = ( ServerLdapContext ) ctx.lookup( "" );
-            LdapName name = new LdapName( req.getName() );
+            Name name = new LdapDN( req.getName() );
             
             if ( newCtx.compare( name, req.getAttributeId(), req.getAssertionValue() ) )
             {

Modified: directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/ModifyDnHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/ModifyDnHandler.java?rev=359062&r1=359061&r2=359062&view=diff
==============================================================================
--- directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/ModifyDnHandler.java
(original)
+++ directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/ModifyDnHandler.java
Mon Dec 26 02:55:25 2005
@@ -16,6 +16,7 @@
  */
 package org.apache.ldap.server.protocol.support;
 
+import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.ldap.LdapContext;
 
@@ -26,7 +27,7 @@
 import org.apache.ldap.common.message.ModifyDnResponse;
 import org.apache.ldap.common.message.ModifyDnResponseImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
-import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.util.ExceptionUtils;
 import org.apache.ldap.server.protocol.SessionRegistry;
 import org.apache.mina.common.IoSession;
@@ -73,8 +74,8 @@
 
                 if (req.isMove())
                 {
-                    LdapName oldDn = new LdapName( req.getName() );
-                    LdapName newDn = new LdapName( req.getNewSuperior() );
+                    Name oldDn = new LdapDN( req.getName() );
+                    Name newDn = new LdapDN( req.getNewSuperior() );
 
                     if (req.getNewRdn() != null)
                     {
@@ -82,17 +83,17 @@
                     }
                     else
                     {
-                        newDn.add( oldDn.getRdn() );
+                        newDn.add( oldDn.get( oldDn.size() - 1 ) );
                     }
 
-                    ctx.rename( new LdapName( req.getName() ), newDn );
+                    ctx.rename( new LdapDN( req.getName() ), newDn );
                 }
                 else
                 {
-                    LdapName newDn = new LdapName( req.getName() );
+                    Name newDn = new LdapDN( req.getName() );
                     newDn.remove( newDn.size() - 1 );
                     newDn.add( req.getNewRdn() );
-                    ctx.rename( new LdapName( req.getName() ), newDn );
+                    ctx.rename( new LdapDN( req.getName() ), newDn );
                 }
             }
             catch ( NamingException e )

Modified: directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java?rev=359062&r1=359061&r2=359062&view=diff
==============================================================================
--- directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java
(original)
+++ directory/protocol-providers/ldap/branches/DN-refactoring/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java
Mon Dec 26 02:55:25 2005
@@ -41,7 +41,7 @@
 import org.apache.ldap.common.message.SearchResponseEntryImpl;
 import org.apache.ldap.common.message.SearchResponseReference;
 import org.apache.ldap.common.message.SearchResponseReferenceImpl;
-import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.util.ArrayUtils;
 import org.apache.ldap.common.util.ExceptionUtils;
 import org.apache.ldap.server.configuration.Configuration;
@@ -139,7 +139,7 @@
             }
 
             ctx.addToEnvironment( DEREFALIASES_KEY, req.getDerefAliases().getName() );
-            list = ( ( ServerLdapContext ) ctx ).search( new LdapName( req.getBase() ), req.getFilter(),
controls );
+            list = ( ( ServerLdapContext ) ctx ).search( new LdapDN( req.getBase() ), req.getFilter(),
controls );
 
             if( list.hasMore() )
             {



Mime
View raw message