directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r885497 - in /directory: apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/...
Date Mon, 30 Nov 2009 16:58:54 GMT
Author: elecharny
Date: Mon Nov 30 16:58:54 2009
New Revision: 885497

URL: http://svn.apache.org/viewvc?rev=885497&view=rev
Log:
o Reflected the method rename (register -> add)
o Added a unit test

Modified:
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
    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
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
    directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.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/AbstractRegistrySynchronizer.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
Mon Nov 30 16:58:54 2009
@@ -102,7 +102,7 @@
     /**
      * Applies the added SchemaObject to the given register
      */
-    protected List<Throwable> applyAdd( List<Throwable> errors, Registries registries,
SchemaObject schemaObject ) throws NamingException
+    protected List<Throwable> add( List<Throwable> errors, Registries registries,
SchemaObject schemaObject ) throws NamingException
     {
         // Relax the registries
         registries.setRelaxed();

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=885497&r1=885496&r2=885497&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
Mon Nov 30 16:58:54 2009
@@ -95,7 +95,8 @@
             // As we may break the registries, work on a cloned registries
             Registries clonedRegistries = schemaManager.getRegistries().clone();
             
-            applyAdd( errors, clonedRegistries, attributeType );
+            // Inject the newly created AttributeType in the cloned registries
+            add( errors, clonedRegistries, attributeType );
             
             // Remove the cloned registries
             clonedRegistries.clear();
@@ -104,7 +105,7 @@
             if ( errors.isEmpty() )
             {
                 // Apply the addition to the real registries
-                applyAdd( errors, schemaManager.getRegistries(), attributeType );
+                add( errors, schemaManager.getRegistries(), attributeType );
             }
             else
             {
@@ -150,7 +151,7 @@
                 schemaManager.unregisterAttributeType( oid );
             }
             
-            schemaManager.register( at );
+            schemaManager.add( at );
             
             return SCHEMA_MODIFIED;
         }
@@ -265,7 +266,7 @@
             }
             
             schemaManager.unregisterAttributeType( oldAt.getOid() );
-            schemaManager.register( at );
+            schemaManager.add( at );
         }
         else
         {
@@ -317,7 +318,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( newAt );
+            schemaManager.add( newAt );
         }
         else
         {
@@ -363,7 +364,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( newAt );
+            schemaManager.add( newAt );
         }
         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=885497&r1=885496&r2=885497&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
Mon Nov 30 16:58:54 2009
@@ -85,7 +85,7 @@
             comparator.setSchemaName( schemaName );
 
             schemaManager.unregisterComparator( oid );
-            schemaManager.register( comparator );
+            schemaManager.add( comparator );
             
             return SCHEMA_MODIFIED;
         }
@@ -304,7 +304,7 @@
             // Register the new comparator, and unregister the old one
             LdapComparator<?> comparator = factory.getLdapComparator( schemaManager,
targetEntry, schemaManager.getRegistries(), schemaName );
             schemaManager.unregisterComparator( oldOid );
-            schemaManager.register( comparator );
+            schemaManager.add( comparator );
         }
     }
 
@@ -339,7 +339,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( comparator );
+            schemaManager.add( comparator );
         }
     }
 
@@ -371,7 +371,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( comparator );
+            schemaManager.add( comparator );
         }
     }
     

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=885497&r1=885496&r2=885497&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
Mon Nov 30 16:58:54 2009
@@ -83,7 +83,7 @@
         if ( isSchemaEnabled( schemaName ) )
         {
             schemaManager.unregisterMatchingRule( oldOid );
-            schemaManager.register( mr );
+            schemaManager.add( mr );
             
             return SCHEMA_MODIFIED;
         }
@@ -264,7 +264,7 @@
         if ( isSchemaEnabled( schemaName ) )
         {
             schemaManager.unregisterMatchingRule( oldMr.getOid() );
-            schemaManager.register( mr );
+            schemaManager.add( mr );
         }
         else
         {
@@ -299,7 +299,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( mr );
+            schemaManager.add( mr );
         }
         else
         {
@@ -328,7 +328,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( newMr );
+            schemaManager.add( newMr );
         }
         else
         {

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.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/NormalizerSynchronizer.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
Mon Nov 30 16:58:54 2009
@@ -81,7 +81,7 @@
             normalizer.setSchemaName( schemaName );
 
             schemaManager.unregisterNormalizer( oldOid );
-            schemaManager.register( normalizer );
+            schemaManager.add( normalizer );
             
             return SCHEMA_MODIFIED;
         }
@@ -140,7 +140,7 @@
             {
                 normalizer.applyRegistries( schemaManager.getRegistries() );
                 addToSchema( normalizer, schemaName );
-                schemaManager.register( normalizer );
+                schemaManager.add( normalizer );
                 LOG.debug( "Added {} into the enabled schema {}", dn.getUpName(), schemaName
);
             }
         }
@@ -230,7 +230,7 @@
 
             Normalizer normalizer = factory.getNormalizer( schemaManager, targetEntry, schemaManager.getRegistries(),
schemaName );
             schemaManager.unregisterNormalizer( oldOid );
-            schemaManager.register( normalizer );
+            schemaManager.add( normalizer );
         }
     }
 
@@ -262,7 +262,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( normalizer );
+            schemaManager.add( normalizer );
         }
     }
 
@@ -293,7 +293,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( normalizer );
+            schemaManager.add( normalizer );
         }
     }
 

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.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/ObjectClassSynchronizer.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
Mon Nov 30 16:58:54 2009
@@ -80,7 +80,7 @@
         if ( isSchemaEnabled( schemaName ) )
         {
             schemaManager.unregisterObjectClass( oid );
-            schemaManager.register( oc );
+            schemaManager.add( oc );
             
             return SCHEMA_MODIFIED;
         }
@@ -164,7 +164,7 @@
                     schemaManager.getRegistries().addReference( objectClass, superior );
                 }
                 
-                schemaManager.register( objectClass );
+                schemaManager.add( objectClass );
                 LOG.debug( "Added {} into the enabled schema {}", dn.getUpName(), schemaName
);
             }
         }
@@ -294,7 +294,7 @@
             }
             
             schemaManager.unregisterObjectClass( oldOc.getOid() );
-            schemaManager.register( oc );
+            schemaManager.add( oc );
         }
         else
         {
@@ -340,7 +340,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( oc );
+            schemaManager.add( oc );
         }
         else
         {
@@ -381,7 +381,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( oc );
+            schemaManager.add( oc );
         }
         else
         {

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.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/SyntaxCheckerSynchronizer.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
Mon Nov 30 16:58:54 2009
@@ -82,7 +82,7 @@
             syntaxChecker.setSchemaName( schemaName );
 
             schemaManager.unregisterSyntaxChecker( oid );
-            schemaManager.register( syntaxChecker );
+            schemaManager.add( syntaxChecker );
             
             return SCHEMA_MODIFIED;
         }
@@ -141,7 +141,7 @@
             {
                 syntaxChecker.applyRegistries( schemaManager.getRegistries() );
                 addToSchema( syntaxChecker, schemaName );
-                schemaManager.register( syntaxChecker );
+                schemaManager.add( syntaxChecker );
                 LOG.debug( "Added {} into the enabled schema {}", dn.getUpName(), schemaName
);
             }
         }
@@ -229,7 +229,7 @@
         {
             SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry,
schemaManager.getRegistries(), schemaName );
             schemaManager.unregisterSyntaxChecker( oldOid );
-            schemaManager.register( syntaxChecker );
+            schemaManager.add( syntaxChecker );
         }
     }
 
@@ -270,7 +270,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( syntaxChecker );
+            schemaManager.add( syntaxChecker );
         }
     }
 
@@ -300,7 +300,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( syntaxChecker );
+            schemaManager.add( syntaxChecker );
         }
     }
     

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.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/SyntaxSynchronizer.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
Mon Nov 30 16:58:54 2009
@@ -84,7 +84,7 @@
         if ( isSchemaEnabled( schemaName ) )
         {
             schemaManager.unregisterLdapSyntax( oid );
-            schemaManager.register( syntax );
+            schemaManager.add( syntax );
             
             return SCHEMA_MODIFIED;
         }
@@ -154,7 +154,7 @@
                 // Update the using table, as a Syntax is associated with a SyntaxChecker
                 schemaManager.getRegistries().addReference( syntax, syntax.getSyntaxChecker()
);
 
-                schemaManager.register( syntax );
+                schemaManager.add( syntax );
                 LOG.debug( "Added {} into the enabled schema {}", dn.getUpName(), schemaName
);
             }
         }
@@ -307,7 +307,7 @@
         if ( isSchemaEnabled( schemaName ) )
         {
             schemaManager.unregisterLdapSyntax( oldOid );
-            schemaManager.register( syntax );
+            schemaManager.add( syntax );
         }
         else
         {
@@ -357,7 +357,7 @@
 
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( syntax );
+            schemaManager.add( syntax );
         }
         else
         {
@@ -401,7 +401,7 @@
         
         if ( isSchemaEnabled( newSchemaName ) )
         {
-            schemaManager.register( syntax );
+            schemaManager.add( syntax );
         }
         else
         {

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
Mon Nov 30 16:58:54 2009
@@ -361,7 +361,7 @@
         testAddComparatorToEnabledSchema();
         
         MatchingRule mr = new DummyMR();
-        schemaManager.register( mr );
+        schemaManager.add( mr );
         
         // Pre-checks
         assertTrue( isOnDisk( dn ) );

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
Mon Nov 30 16:58:54 2009
@@ -692,8 +692,8 @@
         at.setSchemaName( "other" );
         at.setSyntax( new BogusSyntax( 1 ) );
         
-        schemaManager.register( at );
-        schemaManager.register( at.getSyntax() );
+        schemaManager.add( at );
+        schemaManager.add( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );
@@ -722,8 +722,8 @@
         at.setSyntax( new BogusSyntax( 2 ) );
         at.setOrdering( mr );
             
-        schemaManager.register( at );
-        schemaManager.register( at.getSyntax() );
+        schemaManager.add( at );
+        schemaManager.add( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Mon Nov 30 16:58:54 2009
@@ -734,7 +734,7 @@
         at.setSchemaName( "other" );
         at.setSyntax( new BogusSyntax( 1 ) );
         
-        schemaManager.register( at );
+        schemaManager.add( at );
 
         LessEqNode node = new LessEqNode( at.getOid(), new ServerStringValue( at, "3" ) );
 
@@ -756,8 +756,8 @@
         at.setSyntax( new BogusSyntax(3) );
         at.setOrdering( mr );
 
-        schemaManager.register( at );
-        schemaManager.register( at.getSyntax() );
+        schemaManager.add( at );
+        schemaManager.add( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );

Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java?rev=885497&r1=885496&r2=885497&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java
Mon Nov 30 16:58:54 2009
@@ -246,7 +246,7 @@
     	attributeType.setSubstringOid( null );
     	attributeType.setSuperior( (String)null );
     	
-    	schemaManager.register( attributeType );
+    	schemaManager.add( attributeType );
     	
     	// Check that the AT has been correctly added
     	



Mime
View raw message