directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r892995 - in /directory: apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/ apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/ shared/branches/share...
Date Mon, 21 Dec 2009 21:44:04 GMT
Author: elecharny
Date: Mon Dec 21 21:44:03 2009
New Revision: 892995

URL: http://svn.apache.org/viewvc?rev=892995&view=rev
Log:
o Delegated Registry removal to the abstract class
o Minor cleanups

Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=892995&r1=892994&r2=892995&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
Mon Dec 21 21:44:03 2009
@@ -568,9 +568,11 @@
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "normalizers" );
         NormalizerDescription normalizerDescription = null; 
-        for ( int ii = 0; ii < attrTypes.size(); ii++ )
+        
+        for ( int i = 0; i < attrTypes.size(); i++ )
         {
-            String desc = ( String ) attrTypes.get( ii );
+            String desc = ( String ) attrTypes.get( i );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
                 normalizerDescription = normalizerDescriptionSchemaParser.parseNormalizerDescription(
desc );
@@ -1129,11 +1131,11 @@
         // -------------------------------------------------------------------
         // check next to see if it is present in the schema partition
         // -------------------------------------------------------------------
-
         //noinspection UnusedAssignment
         attrs = null;
 
         LdapContext schemaRoot = getSchemaContext( service );
+        
         if ( isPresent )
         {
             attrs = schemaRoot.getAttributes( "m-oid=" + oid + ",ou=attributeTypes,cn=" +
schemaName );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java?rev=892995&r1=892994&r2=892995&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
Mon Dec 21 21:44:03 2009
@@ -47,6 +47,7 @@
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.schema.registries.NormalizerRegistry;
 
 
 /**
@@ -142,7 +143,9 @@
         ServerAttribute attr = new DefaultServerAttribute( 
             getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.NORMALIZERS_AT
) );
 
-        for ( Normalizer normalizer : getSchemaManager().getNormalizerRegistry() )
+        NormalizerRegistry nr = getSchemaManager().getNormalizerRegistry();
+        
+        for ( Normalizer normalizer : nr )
         {
             attr.add( SchemaUtils.render( normalizer ) );
         }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java?rev=892995&r1=892994&r2=892995&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java
Mon Dec 21 21:44:03 2009
@@ -22,7 +22,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -57,34 +56,6 @@
     /**
      * {@inheritDoc}
      */
-    public LdapComparator<?> unregister( String numericOid ) throws NamingException
-    {
-        if ( !OID.isOID( numericOid ) )
-        {
-            String msg = "OID " + numericOid + " is not a numeric OID";
-            LOG.error( msg );
-            throw new NamingException( msg );
-        }
-
-        LdapComparator<?> comparator = byName.remove( numericOid );
-        
-        for ( String name : comparator.getNames() )
-        {
-            byName.remove( name );
-        }
-        
-        if ( DEBUG )
-        {
-            LOG.debug( "Removed {} with oid {} from the registry", comparator, numericOid
);
-        }
-        
-        return comparator;
-    }
-    
-    
-    /**
-     * {@inheritDoc}
-     */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
         if ( schemaName == null )

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java?rev=892995&r1=892994&r2=892995&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java
Mon Dec 21 21:44:03 2009
@@ -22,7 +22,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -57,34 +56,6 @@
     /**
      * {@inheritDoc}
      */
-    public Normalizer unregister( String numericOid ) throws NamingException
-    {
-        if ( !OID.isOID( numericOid ) )
-        {
-            String msg = "OID " + numericOid + " is not a numeric OID";
-            LOG.error( msg );
-            throw new NamingException( msg );
-        }
-
-        Normalizer normalizer = byName.remove( numericOid );
-        
-        for ( String name : normalizer.getNames() )
-        {
-            byName.remove( name );
-        }
-        
-        if ( DEBUG )
-        {
-            LOG.debug( "Removed {} with oid {} from the registry", normalizer, numericOid
);
-        }
-        
-        return normalizer;
-    }
-    
-    
-    /**
-     * {@inheritDoc}
-     */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
         if ( schemaName == null )

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java?rev=892995&r1=892994&r2=892995&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java
Mon Dec 21 21:44:03 2009
@@ -22,7 +22,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
@@ -57,34 +56,6 @@
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker unregister( String numericOid ) throws NamingException
-    {
-        if ( !OID.isOID( numericOid ) )
-        {
-            String msg = "OID " + numericOid + " is not a numeric OID";
-            LOG.error( msg );
-            throw new NamingException( msg );
-        }
-
-        SyntaxChecker syntaxChecker = byName.remove( numericOid );
-        
-        for ( String name : syntaxChecker.getNames() )
-        {
-            byName.remove( name );
-        }
-        
-        if ( DEBUG )
-        {
-            LOG.debug( "Removed {} with oid {} from the registry", syntaxChecker, numericOid
);
-        }
-        
-        return syntaxChecker;
-    }
-    
-    
-    /**
-     * {@inheritDoc}
-     */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
         if ( schemaName == null )



Mime
View raw message