directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r891343 - in /directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers: AttributeTypeSynchronizer.java ComparatorSynchronizer.java MatchingRuleSynchronizer.java
Date Wed, 16 Dec 2009 17:36:39 GMT
Author: elecharny
Date: Wed Dec 16 17:36:38 2009
New Revision: 891343

URL: http://svn.apache.org/viewvc?rev=891343&view=rev
Log:
o Fixed the AT deletion
o We are no more using the swapRegistries() method

Modified:
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java?rev=891343&r1=891342&r2=891343&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
Wed Dec 16 17:36:38 2009
@@ -195,9 +195,6 @@
             // As we may break the registries, work on a cloned registries
             Registries clonedRegistries = schemaManager.getRegistries().clone();
 
-            // Relax the cloned registries
-            clonedRegistries.setRelaxed();
-
             // Remove this AttributeType from the Registries
             clonedRegistries.delete( errors, attributeType );
 
@@ -209,12 +206,19 @@
 
             // Check the registries now
             errors = clonedRegistries.checkRefInteg();
+            
+            // Clear the cloned registries
+            clonedRegistries.clear();
 
             // If we didn't get any error, swap the registries
             if ( errors.isEmpty() )
             {
                 clonedRegistries.setStrict();
-                schemaManager.swapRegistries( clonedRegistries );
+                schemaManager.getRegistries().delete( errors, attributeType );
+                schemaManager.getRegistries().dissociateFromSchema( attributeType );
+                schemaManager.getRegistries().delCrossReferences( attributeType );
+                
+                LOG.debug( "Removed {} from the schema {}", attributeType, schemaName );
             }
             else
             {

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java?rev=891343&r1=891342&r2=891343&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
Wed Dec 16 17:36:38 2009
@@ -258,7 +258,7 @@
             if ( errors.size() == 0 )
             {
                 clonedRegistries.setStrict();
-                schemaManager.swapRegistries( clonedRegistries );
+                //schemaManager.swapRegistries( clonedRegistries );
             }
             else
             {

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java?rev=891343&r1=891342&r2=891343&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
Wed Dec 16 17:36:38 2009
@@ -215,7 +215,7 @@
             if ( errors.size() == 0 )
             {
                 clonedRegistries.setStrict();
-                schemaManager.swapRegistries( clonedRegistries );
+                //schemaManager.swapRegistries( clonedRegistries );
             }
             else
             {



Mime
View raw message