directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r808209 - in /directory/apacheds/branches/apacheds-schema: core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/partition/imp...
Date Wed, 26 Aug 2009 22:33:06 GMT
Author: elecharny
Date: Wed Aug 26 22:33:05 2009
New Revision: 808209

URL: http://svn.apache.org/viewvc?rev=808209&view=rev
Log:
Various compilation fixes

Removed:
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultLdapSyntaxRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleUseRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
Modified:
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/AbstractBootstrapProducer.java
    directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
    directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
    directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Wed Aug 26 22:33:05 2009
@@ -328,7 +328,7 @@
         // setup temporary loader and temp registry 
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         OidRegistry oidRegistry = new OidRegistry();
-        registries = new DefaultRegistries( "bootstrap", loader, oidRegistry );
+        registries = new Registries( "bootstrap", loader, oidRegistry );
 
         // load essential bootstrap schemas 
         Set<Schema> bootstrapSchemas = new HashSet<Schema>();
@@ -1589,7 +1589,7 @@
         // --------------------------------------------------------------------
         
         PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition, registries );
-        Registries globalRegistries = new DefaultRegistries( "global", schemaLoader, registries.getOidRegistry() );
+        Registries globalRegistries = new Registries( "global", schemaLoader, registries.getOidRegistry() );
         schemaLoader.loadEnabled( globalRegistries );
         registries = globalRegistries;
         SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Wed Aug 26 22:33:05 2009
@@ -22,7 +22,6 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -100,11 +99,9 @@
 import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.DateUtils;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.tree.DnBranchNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -150,10 +147,6 @@
     /** The attributeType registry */
     private AttributeTypeRegistry atRegistry;
     
-    /** The OID registry */
-    private OidRegistry oidRegistry;
-
-
     /**
      * Creates the root nexus singleton of the entire system.  The root DSE has
      * several attributes that are injected into it besides those that may
@@ -294,7 +287,6 @@
         this.directoryService = directoryService;
         registries = directoryService.getRegistries();
         atRegistry = registries.getAttributeTypeRegistry();
-        oidRegistry = registries.getOidRegistry();
         
         initializeSystemPartition();
         
@@ -370,14 +362,13 @@
             {
                 Set<Index<?,ServerEntry>> indices = ( ( JdbmPartition ) override ).getIndexedAttributes();
                 Set<String> indexOids = new HashSet<String>();
-                OidRegistry registry = registries.getOidRegistry();
 
                 for ( Index<?,ServerEntry> index : indices )
                 {
-                    indexOids.add( registry.getOid( index.getAttributeId() ) );
+                    indexOids.add( atRegistry.getOid( index.getAttributeId() ) );
                 }
 
-                if ( ! indexOids.contains( registry.getOid( SchemaConstants.OBJECT_CLASS_AT ) ) )
+                if ( ! indexOids.contains( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) ) )
                 {
                     LOG.warn( "CAUTION: You have not included objectClass as an indexed attribute" +
                             "in the system partition configuration.  This will lead to poor " +
@@ -549,7 +540,7 @@
         AttributeTypeRegistry registry = registries.getAttributeTypeRegistry();
         
         // complain if we do not recognize the attribute being compared
-        if ( !registry.hasAttributeType( compareContext.getOid() ) )
+        if ( !registry.contains( compareContext.getOid() ) )
         {
             throw new LdapInvalidAttributeIdentifierException( compareContext.getOid() + " not found within the attributeType registry" );
         }
@@ -927,7 +918,7 @@
                     {
                         try
                         {
-                            realIds.add( oidRegistry.getOid( idTrimmed ) );
+                            realIds.add( atRegistry.getOid( idTrimmed ) );
                         }
                         catch ( Exception e )
                         {

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Wed Aug 26 22:33:05 2009
@@ -198,7 +198,7 @@
                 index.setWkDirPath( obj.getWkDirPath() );
             }
 
-            String oid = registries.getOidRegistry().getOid( index.getAttributeId() );
+            String oid = registries.getAttributeTypeRegistry().getOid( index.getAttributeId() );
             
             if ( SYS_INDEX_OIDS.contains( oid ) )
             {

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java Wed Aug 26 22:33:05 2009
@@ -162,7 +162,7 @@
     
     protected void registerOids( SchemaObject obj ) throws Exception
     {
-        String[] names = obj.getNames();
+        List<String> names = obj.getNames();
         
         if ( names != null )
         {

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java Wed Aug 26 22:33:05 2009
@@ -48,7 +48,7 @@
 public class MetaAttributeTypeHandler extends AbstractSchemaChangeHandler
 {
     private final SchemaPartitionDao dao;
-    private final AttributeTypeRegistry attributeTypeRegistry;
+    private final AttributeTypeRegistry atRegistry;
 
     
 
@@ -58,7 +58,7 @@
         super( targetRegistries, loader );
         
         this.dao = dao;
-        this.attributeTypeRegistry = targetRegistries.getAttributeTypeRegistry();
+        this.atRegistry = targetRegistries.getAttributeTypeRegistry();
     }
 
 
@@ -71,8 +71,8 @@
         
         if ( ! schema.isDisabled() )
         {
-            attributeTypeRegistry.unregister( oid );
-            attributeTypeRegistry.register( at );
+            atRegistry.unregister( oid );
+            atRegistry.register( at );
             
             return SCHEMA_MODIFIED;
         }
@@ -83,10 +83,10 @@
     
     public void add( AttributeType at ) throws Exception
     {
-        Schema schema = dao.getSchema( at.getSchema() );
+        Schema schema = dao.getSchema( at.getSchemaName() );
         if ( ! schema.isDisabled() )
         {
-            attributeTypeRegistry.register( at );
+            atRegistry.register( at );
         }
         else
         {
@@ -129,10 +129,10 @@
 
     public void delete( AttributeType at, boolean cascade ) throws Exception
     {
-        Schema schema = loader.getSchema( at.getSchema() );
+        Schema schema = loader.getSchema( at.getSchemaName() );
         if ( ! schema.isDisabled() )
         {
-            attributeTypeRegistry.unregister( at.getOid() );
+            atRegistry.unregister( at.getOid() );
         }
         unregisterOids( at.getOid() );
     }
@@ -161,8 +161,8 @@
 
         if ( ! schema.isDisabled() )
         {
-            attributeTypeRegistry.unregister( oldAt.getOid() );
-            attributeTypeRegistry.register( at );
+            atRegistry.unregister( oldAt.getOid() );
+            atRegistry.register( at );
         }
         else
         {
@@ -199,13 +199,13 @@
 
         if ( ! oldSchema.isDisabled() )
         {
-            attributeTypeRegistry.unregister( oldAt.getOid() );
+            atRegistry.unregister( oldAt.getOid() );
         }
         unregisterOids( oldAt.getOid() );
 
         if ( ! newSchema.isDisabled() )
         {
-            attributeTypeRegistry.register( at );
+            atRegistry.register( at );
         }
         else
         {
@@ -236,12 +236,12 @@
         
         if ( ! oldSchema.isDisabled() )
         {
-            attributeTypeRegistry.unregister( oldAt.getOid() );
+            atRegistry.unregister( oldAt.getOid() );
         }
         
         if ( ! newSchema.isDisabled() )
         {
-            attributeTypeRegistry.register( at );
+            atRegistry.register( at );
         }
     }
     
@@ -256,7 +256,7 @@
         }
         
         Rdn rdn = newParent.getRdn();
-        if ( ! targetRegistries.getOidRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
+        if ( ! targetRegistries.getAttributeTypeRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
         {
             throw new LdapInvalidNameException( "The parent entry of a attributeType should be an organizationalUnit.", 
                 ResultCodeEnum.NAMING_VIOLATION );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java Wed Aug 26 22:33:05 2009
@@ -167,7 +167,7 @@
 
     public void delete( String oid, boolean cascade ) throws NamingException
     {
-        if ( matchingRuleRegistry.hasMatchingRule( oid ) )
+        if ( matchingRuleRegistry.contains( oid ) )
         {
             throw new LdapOperationNotSupportedException( "The comparator with OID " + oid 
                 + " cannot be deleted until all " 
@@ -186,7 +186,7 @@
     {
         String oldOid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oldOid ) )
+        if ( matchingRuleRegistry.contains( oldOid ) )
         {
             throw new LdapOperationNotSupportedException( "The comparator with OID " + oldOid 
                 + " cannot have it's OID changed until all " 
@@ -215,7 +215,7 @@
         checkNewParent( newParentName );
         String oldOid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oldOid ) )
+        if ( matchingRuleRegistry.contains( oldOid ) )
         {
             throw new LdapOperationNotSupportedException( "The comparator with OID " + oldOid 
                 + " cannot have it's OID changed until all " 
@@ -251,7 +251,7 @@
         checkNewParent( newParentName );
         String oid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oid ) )
+        if ( matchingRuleRegistry.contains( oid ) )
         {
             throw new LdapOperationNotSupportedException( "The comparator with OID " + oid 
                 + " cannot be moved to another schema until all " 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java Wed Aug 26 22:33:05 2009
@@ -168,7 +168,7 @@
 
     public void delete( String oid, boolean cascade ) throws NamingException
     {
-        if ( matchingRuleRegistry.hasMatchingRule( oid ) )
+        if ( matchingRuleRegistry.contains( oid ) )
         {
             throw new LdapOperationNotSupportedException( "The normalizer with OID " + oid 
                 + " cannot be deleted until all " 
@@ -187,7 +187,7 @@
     {
         String oldOid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oldOid ) )
+        if ( matchingRuleRegistry.contains( oldOid ) )
         {
             throw new LdapOperationNotSupportedException( "The normalizer with OID " + oldOid 
                 + " cannot have it's OID changed until all " 
@@ -218,7 +218,7 @@
         checkNewParent( newParentName );
         String oldOid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oldOid ) )
+        if ( matchingRuleRegistry.contains( oldOid ) )
         {
             throw new LdapOperationNotSupportedException( "The normalizer with OID " + oldOid 
                 + " cannot have it's OID changed until all " 
@@ -254,7 +254,7 @@
         checkNewParent( newParentName );
         String oid = getOid( entry );
 
-        if ( matchingRuleRegistry.hasMatchingRule( oid ) )
+        if ( matchingRuleRegistry.contains( oid ) )
         {
             throw new LdapOperationNotSupportedException( "The normalizer with OID " + oid 
                 + " cannot be moved to another schema until all " 
@@ -312,7 +312,8 @@
         }
         
         Rdn rdn = newParent.getRdn();
-        if ( ! targetRegistries.getOidRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
+        
+        if ( ! targetRegistries.getAttributeTypeRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
         {
             throw new LdapInvalidNameException( "The parent entry of a normalizer should be an organizationalUnit.", 
                 ResultCodeEnum.NAMING_VIOLATION );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java Wed Aug 26 22:33:05 2009
@@ -114,7 +114,7 @@
 
     public void delete( ObjectClass oc, boolean cascade ) throws Exception
     {
-        Schema schema = loader.getSchema( oc.getSchema() );
+        Schema schema = loader.getSchema( oc.getSchemaName() );
         
         if ( ! schema.isDisabled() )
         {
@@ -243,7 +243,8 @@
         }
         
         Rdn rdn = newParent.getRdn();
-        if ( ! targetRegistries.getOidRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
+        
+        if ( ! targetRegistries.getAttributeTypeRegistry().getOid( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) )
         {
             throw new LdapInvalidNameException( "The parent entry of a objectClass should be an organizationalUnit.", 
                 ResultCodeEnum.NAMING_VIOLATION );
@@ -260,7 +261,7 @@
 
     public void add( ObjectClass oc ) throws Exception
     {
-        Schema schema = loader.getSchema( oc.getSchema() );
+        Schema schema = loader.getSchema( oc.getSchemaName() );
         if ( ! schema.isDisabled() )
         {
             objectClassRegistry.register( oc );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Wed Aug 26 22:33:05 2009
@@ -287,7 +287,7 @@
     public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String rdnAttribute = newRdn.getUpType();
-        String rdnAttributeOid = globalRegistries.getOidRegistry().getOid( rdnAttribute );
+        String rdnAttributeOid = globalRegistries.getAttributeTypeRegistry().getOid( rdnAttribute );
         if ( ! rdnAttributeOid.equals( cnAT.getOid() ) )
         {
             throw new LdapOperationNotSupportedException( 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java Wed Aug 26 22:33:05 2009
@@ -32,8 +32,8 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
+import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.registries.ObjectClassRegistry;
-import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 import org.slf4j.Logger;
@@ -381,7 +381,8 @@
      * @param oidRegistry
      * @throws NamingException if the modify operation is removing an Rdn attribute
      */
-    public static void preventRdnChangeOnModifyReplace( LdapDN name, ModificationOperation mod, ServerAttribute attribute, OidRegistry oidRegistry )
+    public static void preventRdnChangeOnModifyReplace( LdapDN name, ModificationOperation mod, 
+        ServerAttribute attribute, AttributeTypeRegistry atRegistry )
         throws NamingException
     {
         if ( mod != ModificationOperation.REPLACE_ATTRIBUTE )
@@ -390,7 +391,7 @@
         }
 
         Set<String> rdnAttributes = getRdnAttributes( name );
-        String id = oidRegistry.getOid( attribute.getUpId() );
+        String id = atRegistry.getOid( attribute.getUpId() );
 
         if ( !rdnAttributes.contains( id ) )
         {
@@ -415,7 +416,7 @@
         // from here on the modify operation replaces specific values
         // of the Rdn attribute so we must check to make sure all the old
         // rdn attribute values are present in the replacement set
-        String rdnValue = getRdnValue( id, name, oidRegistry );
+        String rdnValue = getRdnValue( id, name, atRegistry );
         for ( int ii = 0; ii < attribute.size(); ii++ )
         {
             // if the old rdn value is not in the rdn attribute then
@@ -456,7 +457,8 @@
      * @throws NamingException if the modify operation is removing an Rdn attribute
      */
     public static void preventRdnChangeOnModifyReplace( 
-        LdapDN name, ModificationOperation mod, ServerEntry entry, OidRegistry oidRegistry )
+        LdapDN name, ModificationOperation mod, ServerEntry entry, 
+        AttributeTypeRegistry atRegistry )
         throws NamingException
     {
         if ( mod != ModificationOperation.REPLACE_ATTRIBUTE )
@@ -493,7 +495,7 @@
                 // from here on the modify operation replaces specific values
                 // of the Rdn attribute so we must check to make sure all the old
                 // rdn attribute values are present in the replacement set
-                String rdnValue = getRdnValue( id, name, oidRegistry );
+                String rdnValue = getRdnValue( id, name, atRegistry );
 
                 // if the old rdn value is not in the rdn attribute then
                 // we must complain with a schema violation
@@ -534,7 +536,7 @@
      * @throws NamingException if the modify operation is removing an Rdn attribute
      */
     public static void preventRdnChangeOnModifyRemove( LdapDN name, ModificationOperation mod, ServerAttribute attribute, 
-        OidRegistry oidRegistry ) throws NamingException
+        AttributeTypeRegistry atRegistry ) throws NamingException
     {
         if ( mod != ModificationOperation.REMOVE_ATTRIBUTE )
         {
@@ -544,7 +546,7 @@
         Set<String> rdnAttributes = getRdnAttributes( name );
         String id = attribute.getId();
 
-        if ( !rdnAttributes.contains( oidRegistry.getOid( id ) ) )
+        if ( !rdnAttributes.contains( atRegistry.getOid( id ) ) )
         {
             return;
         }
@@ -568,7 +570,7 @@
         // from here on the modify operation only deletes specific values
         // of the Rdn attribute so we must check if one of those values
         // are used by the Rdn attribute value pair for the name of the entry
-        String rdnValue = getRdnValue( id, name, oidRegistry );
+        String rdnValue = getRdnValue( id, name, atRegistry );
         
         for ( Value<?> value:attribute )
         {
@@ -608,7 +610,8 @@
      * @param oidRegistry
      * @throws NamingException if the modify operation is removing an Rdn attribute
      */
-    public static void preventRdnChangeOnModifyRemove( LdapDN name, ModificationOperation mod, ServerEntry entry, OidRegistry oidRegistry )
+    public static void preventRdnChangeOnModifyRemove( LdapDN name, ModificationOperation mod, 
+        ServerEntry entry, AttributeTypeRegistry atRegistry )
         throws NamingException
     {
         if ( mod != ModificationOperation.REMOVE_ATTRIBUTE )
@@ -642,7 +645,7 @@
                 // from here on the modify operation only deletes specific values
                 // of the Rdn attribute so we must check if one of those values
                 // are used by the Rdn attribute value pair for the name of the entry
-                String rdnValue = getRdnValue( id, name, oidRegistry );
+                String rdnValue = getRdnValue( id, name, atRegistry );
                 EntryAttribute rdnAttr = entry.get( id );
                 
                 for ( Value<?> value:rdnAttr )
@@ -675,10 +678,10 @@
      * attribute is not an rdn attribute
      * @throws NamingException if the name is malformed in any way
      */
-    private static String getRdnValue( String id, LdapDN name, OidRegistry oidRegistry ) throws NamingException
+    private static String getRdnValue( String id, LdapDN name, AttributeTypeRegistry atRegistry ) throws NamingException
     {
         // Transform the rdnAttrId to it's OID counterPart
-        String idOid = oidRegistry.getOid( id );
+        String idOid = atRegistry.getOid( id );
 
         if ( idOid == null )
         {
@@ -693,7 +696,7 @@
             String rdnAttrId = NamespaceTools.getRdnAttribute( comps[ii] );
             
             // Transform the rdnAttrId to it's OID counterPart
-            String rdnAttrOid = oidRegistry.getOid( rdnAttrId );
+            String rdnAttrOid = atRegistry.getOid( rdnAttrId );
 
             if ( rdnAttrOid == null )
             {

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Wed Aug 26 22:33:05 2009
@@ -1439,13 +1439,13 @@
                     }
 
                     SchemaChecker
-                        .preventRdnChangeOnModifyRemove( name, modOp, change, this.registries.getOidRegistry() );
+                        .preventRdnChangeOnModifyRemove( name, modOp, change, atRegistry );
                     SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, modOp, change,
                         objectClass );
                     break;
 
                 case REPLACE_ATTRIBUTE:
-                    SchemaChecker.preventRdnChangeOnModifyReplace( name, modOp, change, registries.getOidRegistry() );
+                    SchemaChecker.preventRdnChangeOnModifyReplace( name, modOp, change, atRegistry );
                     SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, modOp, change );
 
                     attr = tmpEntry.get( change.getUpId() );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Wed Aug 26 22:33:05 2009
@@ -146,7 +146,7 @@
         oidRegistry = registries.getOidRegistry();
 
         // setup various attribute type values
-        objectClassType = atRegistry.lookup( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+        objectClassType = atRegistry.lookup( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
 
         ssParser = new SubtreeSpecificationParser( new NormalizerMappingResolver()
         {
@@ -612,7 +612,7 @@
             LdapDN baseDn = ( LdapDN ) apName.clone();
             baseDn.addAll( ss.getBase() );
 
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+            ExprNode filter = new PresenceNode( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -772,7 +772,7 @@
             next.rename( opContext );
 
             subentry = subentryCache.getSubentry( newNormName );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+            ExprNode filter = new PresenceNode( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -849,7 +849,7 @@
 
             subentry = subentryCache.getSubentry( newNormName );
 
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+            ExprNode filter = new PresenceNode( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -1057,7 +1057,7 @@
             apName.remove( apName.size() - 1 );
             LdapDN oldBaseDn = ( LdapDN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+            ExprNode filter = new PresenceNode( atRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]

Modified: directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Wed Aug 26 22:33:05 2009
@@ -227,7 +227,7 @@
         attributes.put( "cn", "does not matter" );
 
         // postive test which should pass
-        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // test should fail since we are removing the ou attribute
         AttributeType OU_AT = registries.getAttributeTypeRegistry().lookup( "ou" );
@@ -235,7 +235,7 @@
 
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes,registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -247,7 +247,7 @@
         name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "sn", "does not matter" );
-        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // test for failure when modifying Rdn attribute in multi attribute Rdn
         AttributeType CN_AT = registries.getAttributeTypeRegistry().lookup( "cn" );
@@ -255,7 +255,7 @@
         
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -267,14 +267,14 @@
         // is not used when composing the Rdn
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "ou", "container" );
-        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // now let's make it fail again just by providing the right value for ou (users)
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "ou", "users" );
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -297,14 +297,14 @@
         attributes.put( "cn", "does not matter" );
 
         // postive test which should pass
-        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // test should fail since we are removing the ou attribute
         attributes.put( "ou", (String)null );
         
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -316,14 +316,14 @@
         name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "sn", "does not matter" );
-        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // test for failure when modifying Rdn attribute in multi attribute Rdn
         attributes.put("cn", (String)null );
         
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -336,14 +336,14 @@
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "ou", "container" );
         attributes.put( "ou", "users" );
-        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
 
         // now let's make it fail by not including the old value for ou (users)
         attributes = new DefaultServerEntry( registries, name );
         attributes.put( "ou", "container" );
         try
         {
-            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
+            SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -487,13 +487,13 @@
 
         // postive test which should pass
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-            new DefaultServerAttribute( "cn", cnAt, "does not matter" ), registry );
+            new DefaultServerAttribute( "cn", cnAt, "does not matter" ), registries.getAttributeTypeRegistry() );
 
         // test should fail since we are removing the ou attribute
         try
         {
             SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-                new DefaultServerAttribute( "ou", ouAt ), registry );
+                new DefaultServerAttribute( "ou", ouAt ), registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -504,13 +504,13 @@
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
         name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-            new DefaultServerAttribute( "sn", snAt, "does not matter" ), registry );
+            new DefaultServerAttribute( "sn", snAt, "does not matter" ), registries.getAttributeTypeRegistry() );
 
         // test for failure when modifying Rdn attribute in multi attribute Rdn
         try
         {
             SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-                new DefaultServerAttribute( "cn", cnAt ), registry );
+                new DefaultServerAttribute( "cn", cnAt ), registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )
@@ -521,13 +521,13 @@
         // should succeed since the value being deleted from the rdn attribute is
         // is not used when composing the Rdn
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-            new DefaultServerAttribute( "ou", ouAt, "container" ), registry );
+            new DefaultServerAttribute( "ou", ouAt, "container" ), registries.getAttributeTypeRegistry() );
 
         // now let's make it fail again just by providing the right value for ou (users)
         try
         {
             SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, 
-                new DefaultServerAttribute( "ou", ouAt, "users" ), registry );
+                new DefaultServerAttribute( "ou", ouAt, "users" ), registries.getAttributeTypeRegistry() );
             fail( "should never get here due to a LdapSchemaViolationException being thrown" );
         }
         catch ( LdapSchemaViolationException e )

Modified: directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/AbstractBootstrapProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/AbstractBootstrapProducer.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/AbstractBootstrapProducer.java (original)
+++ directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/AbstractBootstrapProducer.java Wed Aug 26 22:33:05 2009
@@ -60,6 +60,11 @@
     private final ProducerTypeEnum type;
 
 
+    public static LdapSyntax ldapSyntaxFactory( String oid )
+    {
+        return new LdapSyntax( oid );
+    }
+    
     /**
      * Creates a producer of a specific type.
      *
@@ -80,9 +85,9 @@
     }
 
 
-    protected static BootstrapldapSyntax newSyntax( String oid, Registries registries )
+    protected static LdapSyntax newSyntax( String oid, Registries registries )
     {
-        return new BootstrapldapSyntax( oid, registries.getSyntaxCheckerRegistry() );
+        return ldapSyntaxFactory( oid );
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java (original)
+++ directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java Wed Aug 26 22:33:05 2009
@@ -260,15 +260,11 @@
                 break;
                 
             case SYNTAX_PRODUCER :
-                LdapSyntax syntax = ( LdapSyntax ) schemaObject;
+                LdapSyntax ldapSyntax = ( LdapSyntax ) schemaObject;
                 
-                if ( schemaObject instanceof BootstrapldapSyntax )
-                {
-                    ( ( BootstrapldapSyntax ) syntax ).setSchema( schema.getSchemaName() );
-                }
-
+                ldapSyntax.setSchemaName( schema.getSchemaName() );
                 LdapSyntaxRegistry syntaxRegistry = registries.getLdapSyntaxRegistry();
-                syntaxRegistry.register( syntax );
+                syntaxRegistry.register( ldapSyntax );
                 break;
                 
             case MATCHING_RULE_PRODUCER :

Modified: directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java (original)
+++ directory/apacheds/branches/apacheds-schema/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java Wed Aug 26 22:33:05 2009
@@ -42,31 +42,18 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DefaultRegistries implements Registries
+public class DefaultRegistries extends Registries
 {
-    /** The AttributeType registry */
-    private AttributeTypeRegistry attributeTypeRegistry;
-    
-    /** The ObjectClass registry */
-    private DefaultObjectClassRegistry objectClassRegistry;
-
-    private DefaultComparatorRegistry comparatorRegistry;
-    private DefaultDitContentRuleRegistry ditContentRuleRegistry;
-    private DefaultDitStructureRuleRegistry ditStructureRuleRegistry;
-    private DefaultMatchingRuleRegistry matchingRuleRegistry;
-    private DefaultMatchingRuleUseRegistry matchingRuleUseRegistry;
-    private DefaultNameFormRegistry nameFormRegistry;
-    private DefaultNormalizerRegistry normalizerRegistry;
     private OidRegistry oidRegistry;
-    private DefaultSyntaxCheckerRegistry syntaxCheckerRegistry;
-    private DefaultLdapSyntaxRegistry syntaxRegistry;
     private Map<String,Schema> loadedByName = new HashMap<String, Schema>();
     private final SchemaLoader schemaLoader;
     private final String name;
 
 
-    public DefaultRegistries( String name, SchemaLoader schemaLoader, OidRegistry registry )
+    public DefaultRegistries( String name, SchemaLoader schemaLoader, OidRegistry oidRegistry )
     {
+        super( oidRegistry );
+        
         this.name = name;
         this.schemaLoader = schemaLoader;
         
@@ -76,19 +63,6 @@
                 loadedByName.put( schema.getSchemaName(), schema );
             }
         });
-        
-        oidRegistry = registry;
-        normalizerRegistry = new DefaultNormalizerRegistry();
-        comparatorRegistry = new DefaultComparatorRegistry();
-        syntaxCheckerRegistry = new DefaultSyntaxCheckerRegistry();
-        syntaxRegistry = new DefaultLdapSyntaxRegistry( oidRegistry );
-        matchingRuleRegistry = new DefaultMatchingRuleRegistry( oidRegistry );
-        attributeTypeRegistry = new DefaultAttributeTypeRegistry( oidRegistry );
-        objectClassRegistry = new DefaultObjectClassRegistry( oidRegistry );
-        ditContentRuleRegistry = new DefaultDitContentRuleRegistry( oidRegistry );
-        ditStructureRuleRegistry = new DefaultDitStructureRuleRegistry( oidRegistry );
-        matchingRuleUseRegistry = new DefaultMatchingRuleUseRegistry();
-        nameFormRegistry = new DefaultNameFormRegistry( oidRegistry );
     }
 
 
@@ -164,12 +138,6 @@
     }
 
 
-    public LdapSyntaxRegistry getSyntaxRegistry()
-    {
-        return syntaxRegistry;
-    }
-
-
     // ------------------------------------------------------------------------
     // Code used to sanity check the resolution of entities in registries
     // ------------------------------------------------------------------------
@@ -320,7 +288,7 @@
 
         try
         {
-            isSuccess &= resolve( at.getSuperior(), errors );
+            isSuccess &= resolve( at.getSup(), errors );
         }
         catch ( Exception e )
         {
@@ -423,22 +391,18 @@
             return true;
         }
 
-        ObjectClass[] superiors = new org.apache.directory.shared.ldap.schema.ObjectClass[0];
+        List<ObjectClass> superiors = oc.getSuperiors();
 
-        try
-        {
-            superiors = oc.getSuperClasses();
-        }
-        catch ( Exception e )
+        if ( ( superiors == null ) || ( superiors.size() == 0 ) )
         {
-            superiors = new ObjectClass[0];
             isSuccess = false;
-            errors.add( e );
         }
-
-        for ( int ii = 0; ii < superiors.length; ii++ )
+        else
         {
-            isSuccess &= resolve( superiors[ii], errors );
+            for ( ObjectClass superior : superiors )
+            {
+                isSuccess &= resolve( superior, errors );
+            }
         }
 
         AttributeType[] mayList = new org.apache.directory.shared.ldap.schema.AttributeType[0];

Modified: directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=808209&r1=808208&r2=808209&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Wed Aug 26 22:33:05 2009
@@ -300,7 +300,7 @@
         {
             Attribute attr = attrs.next();
             
-            if ( !registry.hasAttributeType( attr.getID() ) )
+            if ( !registry.contains( attr.getID() ) )
             {
                 if ( !isQuietEnabled() )
                 {



Mime
View raw message