directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r885710 - in /directory/shared/branches/shared-schema: ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/ ldap-schema-loader/src/test/java/org/apache/directory/server/schema/ ldap/src/main/java/org/apache/directory/shared/...
Date Tue, 01 Dec 2009 10:05:36 GMT
Author: elecharny
Date: Tue Dec  1 10:05:35 2009
New Revision: 885710

URL: http://svn.apache.org/viewvc?rev=885710&view=rev
Log:
Some method renaiming, for consistency sake

Modified:
    directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
    directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/server/schema/SchemaManagerTest.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java

Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java?rev=885710&r1=885709&r2=885710&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
(original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
Tue Dec  1 10:05:35 2009
@@ -185,19 +185,19 @@
     }
     
     
-    private void registerSchemaObjects( Schema schema, Registries registries ) throws Exception
+    private void addSchemaObjects( Schema schema, Registries registries ) throws Exception
     {
-        registerComparators( schema, registries );
-        registerNormalizers( schema, registries );
-        registerSyntaxCheckers( schema, registries );
-        registerSyntaxes( schema, registries );
-        registerMatchingRules( schema, registries );
-        registerAttributeTypes( schema, registries );
-        registerObjectClasses( schema, registries );
-        registerMatchingRuleUses( schema, registries );
-        registerDitContentRules( schema, registries );
-        registerNameForms( schema, registries );
-        registerDitStructureRules( schema, registries );
+        addComparators( schema, registries );
+        addNormalizers( schema, registries );
+        addSyntaxCheckers( schema, registries );
+        addSyntaxes( schema, registries );
+        addMatchingRules( schema, registries );
+        addAttributeTypes( schema, registries );
+        addObjectClasses( schema, registries );
+        addMatchingRuleUses( schema, registries );
+        addDitContentRules( schema, registries );
+        addNameForms( schema, registries );
+        addDitStructureRules( schema, registries );
 
         // TODO Add some listener handling at this point
         //notifyListenerOrRegistries( schema, registries );
@@ -459,7 +459,7 @@
                 
                 registries.schemaLoaded( schema );
                 
-                registerSchemaObjects( schema, registries );
+                addSchemaObjects( schema, registries );
             }
             else
             {
@@ -471,7 +471,7 @@
             LOG.info( "Loading {} schema: \n{}", schema.getSchemaName(), schema );
             
             registries.schemaLoaded( schema );
-            registerSchemaObjects( schema, registries );
+            addSchemaObjects( schema, registries );
         }
         
         return true;
@@ -479,38 +479,38 @@
 
     
     /**
-     * Register all the Schema's AttributeTypes
+     * Add all the Schema's AttributeTypes
      */
-    private void registerAttributeTypes( Schema schema, Registries registries ) throws Exception
+    private void addAttributeTypes( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadAttributeTypes( schema ) )
         {
             AttributeType attributeType = factory.getAttributeType( this, entry, registries,
schema.getSchemaName() );
 
-            registerSchemaObject( registries, attributeType, schema );
+            addSchemaObject( registries, attributeType, schema );
         }
     }
 
     
     /**
-     * Register all the Schema's comparators
+     * Add all the Schema's comparators
      */
-    private void registerComparators( Schema schema, Registries registries ) throws Exception
+    private void addComparators( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadComparators( schema ) )
         {
             LdapComparator<?> comparator = 
                 factory.getLdapComparator( this, entry, registries, schema.getSchemaName()
);
             
-            registerSchemaObject( registries, comparator, schema );
+            addSchemaObject( registries, comparator, schema );
         }
     }
 
     
     /**
-     * Register all the Schema's DitContentRules
+     * Add all the Schema's DitContentRules
      */
-    private void registerDitContentRules( Schema schema, Registries registries ) throws Exception
+    private void addDitContentRules( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadDitContentRules( schema ) )
         {
@@ -521,9 +521,9 @@
 
     
     /**
-     * Register all the Schema's DitStructureRules
+     * Add all the Schema's DitStructureRules
      */
-    private void registerDitStructureRules( Schema schema, Registries registries ) throws
Exception
+    private void addDitStructureRules( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadDitStructureRules( schema ) )
         {
@@ -534,24 +534,24 @@
 
     
     /**
-     * Register all the Schema's MatchingRules
+     * Add all the Schema's MatchingRules
      */
-    private void registerMatchingRules( Schema schema, Registries registries ) throws Exception
+    private void addMatchingRules( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadMatchingRules( schema ) )
         {
             MatchingRule matchingRule = factory.getMatchingRule( 
                 this, entry, registries, schema.getSchemaName() );
 
-            registerSchemaObject( registries, matchingRule, schema );
+            addSchemaObject( registries, matchingRule, schema );
         }
     }
 
     
     /**
-     * Register all the Schema's MatchingRuleUses
+     * Add all the Schema's MatchingRuleUses
      */
-    private void registerMatchingRuleUses( Schema schema, Registries registries ) throws
Exception
+    private void addMatchingRuleUses( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadMatchingRuleUses( schema ) )
         {
@@ -562,9 +562,9 @@
 
     
     /**
-     * Register all the Schema's NameForms
+     * Add all the Schema's NameForms
      */
-    private void registerNameForms( Schema schema, Registries registries ) throws Exception
+    private void addNameForms( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadNameForms( schema ) )
         {
@@ -575,66 +575,66 @@
 
     
     /**
-     * Register all the Schema's Normalizers
+     * Add all the Schema's Normalizers
      */
-    private void registerNormalizers( Schema schema, Registries registries ) throws Exception
+    private void addNormalizers( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadNormalizers( schema ) )
         {
             Normalizer normalizer =
                 factory.getNormalizer( this, entry, registries, schema.getSchemaName() );
             
-            registerSchemaObject( registries, normalizer, schema );
+            addSchemaObject( registries, normalizer, schema );
         }
     }
 
     
     /**
-     * Register all the Schema's ObjectClasses
+     * Add all the Schema's ObjectClasses
      */
-    private void registerObjectClasses( Schema schema, Registries registries ) throws Exception
+    private void addObjectClasses( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadObjectClasses( schema ) )
         {
             ObjectClass objectClass = factory.getObjectClass( this, entry, registries, schema.getSchemaName()
);
 
-            registerSchemaObject( registries, objectClass, schema );
+            addSchemaObject( registries, objectClass, schema );
         }
     }
 
     
     /**
-     * Register all the Schema's Syntaxes
+     * Add all the Schema's Syntaxes
      */
-    private void registerSyntaxes( Schema schema, Registries registries ) throws Exception
+    private void addSyntaxes( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadSyntaxes( schema ) )
         {
             LdapSyntax syntax = factory.getSyntax( this,
                 entry, registries, schema.getSchemaName() );
 
-            registerSchemaObject( registries, syntax, schema );
+            addSchemaObject( registries, syntax, schema );
         }
     }
 
     
-    /**
+    /**Add
      * Register all the Schema's SyntaxCheckers
      */
-    private void registerSyntaxCheckers( Schema schema, Registries registries ) throws Exception
+    private void addSyntaxCheckers( Schema schema, Registries registries ) throws Exception
     {
         for ( Entry entry : schemaLoader.loadSyntaxCheckers( schema ) )
         {
             SyntaxChecker syntaxChecker = 
                 factory.getSyntaxChecker( this, entry, registries, schema.getSchemaName()
);
 
-            registerSchemaObject( registries, syntaxChecker, schema );
+            addSchemaObject( registries, syntaxChecker, schema );
         }
     }
 
     
     /**
-     * Register the schemaObject into the registries. 
+     * Add the schemaObject into the registries. 
      *
      * @param registries The Registries
      * @param schemaObject The SchemaObject containing the SchemaObject description
@@ -642,7 +642,7 @@
      * @return the created schemaObject instance
      * @throws Exception If the registering failed
      */
-    private SchemaObject registerSchemaObject( Registries registries, SchemaObject schemaObject,
Schema schema) 
+    private SchemaObject addSchemaObject( Registries registries, SchemaObject schemaObject,
Schema schema) 
         throws Exception
     {
         if ( registries.isRelaxed() )

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=885710&r1=885709&r2=885710&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
Tue Dec  1 10:05:35 2009
@@ -107,7 +107,7 @@
                 fail();
             }
             
-            expectedRegistries.register( expectedComparator );
+            expectedRegistries.add( expectedComparator );
         }
     }
     
@@ -124,7 +124,7 @@
                 fail();
             }
 
-            expectedRegistries.register( expectedNormalizer );
+            expectedRegistries.add( expectedNormalizer );
         }
     }
     
@@ -141,7 +141,7 @@
                 fail();
             }
             
-            expectedRegistries.register( expectedSyntaxChecker );
+            expectedRegistries.add( expectedSyntaxChecker );
         }
     }
     
@@ -162,7 +162,7 @@
                 fail();
             }
             
-            expectedRegistries.register( expectedLdapSyntax );
+            expectedRegistries.add( expectedLdapSyntax );
         }
     }
     
@@ -183,7 +183,7 @@
                 fail();
             }
             
-            expectedRegistries.register( expectedMatchingRule );
+            expectedRegistries.add( expectedMatchingRule );
         }
     }
     

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=885710&r1=885709&r2=885710&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Tue Dec  1 10:05:35 2009
@@ -1363,7 +1363,10 @@
     }
 	
 
-	public void register( SchemaObject schemaObject ) throws NamingException
+    /**
+     * Register the given SchemaObject into the associated Registry
+     */
+	private void register( SchemaObject schemaObject ) throws NamingException
 	{
 	    LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
 	    
@@ -1434,7 +1437,7 @@
 	 * @param schemaObject The schemaObject to register
 	 * @throws NamingException If there is a problem
 	 */
-	public void associateWithSchema( SchemaObject schemaObject ) throws NamingException
+	private void associateWithSchema( SchemaObject schemaObject ) throws NamingException
 	{
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
         



Mime
View raw message