directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1749720 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/partition/ core-shared/src/main/java/org/apache/directory/server/core/shared/partition/ core/src/main/java/org/apache/directory/server/core/
Date Wed, 22 Jun 2016 15:33:49 GMT
Author: elecharny
Date: Wed Jun 22 15:33:49 2016
New Revision: 1749720

URL: http://svn.apache.org/viewvc?rev=1749720&view=rev
Log:
Use a String for the Partitions data structure instead of a DN.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java?rev=1749720&r1=1749719&r2=1749720&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
Wed Jun 22 15:33:49 2016
@@ -83,7 +83,7 @@ public interface PartitionNexus extends
      * @param partitionDn the partition Dn
      * @throws Exception If the removal can't be done
      */
-    void removeContextPartition( Dn partitionDn ) throws LdapException;
+    void removeContextPartition( String partitionDn ) throws LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java?rev=1749720&r1=1749719&r2=1749720&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
Wed Jun 22 15:33:49 2016
@@ -284,7 +284,7 @@ public class DefaultPartitionNexus exten
         {
             try
             {
-                removeContextPartition( directoryService.getDnFactory().create( suffix )
);
+                removeContextPartition( suffix );
             }
             catch ( Exception e )
             {
@@ -840,18 +840,15 @@ public class DefaultPartitionNexus exten
     /**
      * {@inheritDoc}
      */
-    public synchronized void removeContextPartition( Dn partitionDn )
+    public synchronized void removeContextPartition( String partitionDn )
         throws LdapException
     {
-        // Get the Partition name. It's a Dn.
-        String key = partitionDn.getNormName();
-
         // Retrieve this partition from the aprtition's table
-        Partition partition = partitions.get( key );
+        Partition partition = partitions.get( partitionDn );
 
         if ( partition == null )
         {
-            String msg = I18n.err( I18n.ERR_34, key );
+            String msg = I18n.err( I18n.ERR_34, partitionDn );
             LOG.error( msg );
             throw new LdapNoSuchObjectException( msg );
         }
@@ -870,7 +867,7 @@ public class DefaultPartitionNexus exten
             }
             else
             {
-                String msg = I18n.err( I18n.ERR_35, key );
+                String msg = I18n.err( I18n.ERR_35, partitionDn );
                 LOG.error( msg );
                 throw new LdapNoSuchObjectException( msg );
             }
@@ -882,7 +879,7 @@ public class DefaultPartitionNexus exten
             partitionLookupTree.remove( partition.getSuffixDn() );
         }
 
-        partitions.remove( key );
+        partitions.remove( partitionDn );
 
         try
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1749720&r1=1749719&r2=1749720&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Wed Jun 22 15:33:49 2016
@@ -910,7 +910,7 @@ public class DefaultDirectoryService imp
             // can be null when called before starting up
             if ( partitionNexus != null )
             {
-                partitionNexus.removeContextPartition( partition.getSuffixDn() );
+                partitionNexus.removeContextPartition( partition.getSuffixDn().getNormName()
);
             }
         }
         catch ( LdapException le )



Mime
View raw message