directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r491471 [4/5] - in /directory/trunks: ./ apacheds/ apacheds/bootstrap-partition/ apacheds/bootstrap-partition/src/ apacheds/bootstrap-partition/src/main/ apacheds/bootstrap-partition/src/main/java/ apacheds/bootstrap-partition/src/main/java...
Date Sun, 31 Dec 2006 19:46:55 GMT
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Sun Dec 31 11:46:40 2006
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.server.core.schema;
 
-
+ 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -41,7 +41,10 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.ObjectClassRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
@@ -104,12 +107,12 @@
 
     private TopFilter topFilter;
 
-    private List filters = new ArrayList();
+    private List<SearchResultFilter> filters = new ArrayList<SearchResultFilter>();
 
     /**
      * the global schema object registries
      */
-    private GlobalRegistries globalRegistries;
+    private Registries registries;
 
     private Set binaries;
 
@@ -123,6 +126,10 @@
      */
     private String startUpTimeStamp;
 
+    private SchemaManager schemaManager;
+    
+    // the base DN (normalized) of the schema partition
+    private LdapDN schemaBaseDN;
 
     /**
      * Creates a schema service interceptor.
@@ -143,17 +150,22 @@
     public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
     {
         nexus = factoryCfg.getPartitionNexus();
-        globalRegistries = factoryCfg.getGlobalRegistries();
+        registries = factoryCfg.getRegistries();
         binaryAttributeFilter = new BinaryAttributeFilter();
         topFilter = new TopFilter();
         filters.add( binaryAttributeFilter );
         filters.add( topFilter );
         binaries = ( Set ) factoryCfg.getEnvironment().get( BINARY_KEY );
 
+        schemaBaseDN = new LdapDN( "ou=schema" );
+        schemaBaseDN.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
+        
+        schemaManager = factoryCfg.getSchemaManager();
+        
         // stuff for dealing with subentries (garbage for now)
         String subschemaSubentry = ( String ) nexus.getRootDSE().get( "subschemaSubentry" ).get();
         subschemaSubentryDn = new LdapDN( subschemaSubentry );
-        subschemaSubentryDn.normalize( globalRegistries.getAttributeTypeRegistry().getNormalizerMapping() );
+        subschemaSubentryDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
     }
 
 
@@ -265,7 +277,7 @@
             ids = EMPTY_STRING_ARRAY;
         }
 
-        Set set = new HashSet();
+        Set<String> set = new HashSet<String>();
         LockableAttributesImpl attrs = new LockableAttributesImpl();
         LockableAttributeImpl attr;
 
@@ -281,10 +293,10 @@
         if ( returnAllOperationalAttributes || set.contains( "objectclasses" ) )
         {
             attr = new LockableAttributeImpl( "objectClasses" );
-            Iterator list = globalRegistries.getObjectClassRegistry().list();
+            Iterator<ObjectClass> list = registries.getObjectClassRegistry().iterator();
             while ( list.hasNext() )
             {
-                ObjectClass oc = ( ObjectClass ) list.next();
+                ObjectClass oc = list.next();
                 attr.add( SchemaUtils.render( oc ).toString() );
             }
             attrs.put( attr );
@@ -293,7 +305,7 @@
         if ( returnAllOperationalAttributes || set.contains( "attributetypes" ) )
         {
             attr = new LockableAttributeImpl( "attributeTypes" );
-            Iterator list = globalRegistries.getAttributeTypeRegistry().list();
+            Iterator list = registries.getAttributeTypeRegistry().list();
             while ( list.hasNext() )
             {
                 AttributeType at = ( AttributeType ) list.next();
@@ -305,10 +317,10 @@
         if ( returnAllOperationalAttributes || set.contains( "matchingrules" ) )
         {
             attr = new LockableAttributeImpl( "matchingRules" );
-            Iterator list = globalRegistries.getMatchingRuleRegistry().list();
+            Iterator<MatchingRule> list = registries.getMatchingRuleRegistry().iterator();
             while ( list.hasNext() )
             {
-                MatchingRule mr = ( MatchingRule ) list.next();
+                MatchingRule mr = list.next();
                 attr.add( SchemaUtils.render( mr ).toString() );
             }
             attrs.put( attr );
@@ -317,7 +329,7 @@
         if ( returnAllOperationalAttributes || set.contains( "matchingruleuse" ) )
         {
             attr = new LockableAttributeImpl( "matchingRuleUse" );
-            Iterator list = globalRegistries.getMatchingRuleUseRegistry().list();
+            Iterator list = registries.getMatchingRuleUseRegistry().list();
             while ( list.hasNext() )
             {
                 MatchingRuleUse mru = ( MatchingRuleUse ) list.next();
@@ -329,10 +341,10 @@
         if ( returnAllOperationalAttributes || set.contains( "ldapsyntaxes" ) )
         {
             attr = new LockableAttributeImpl( "ldapSyntaxes" );
-            Iterator list = globalRegistries.getSyntaxRegistry().list();
+            Iterator<Syntax> list = registries.getSyntaxRegistry().iterator();
             while ( list.hasNext() )
             {
-                Syntax syntax = ( Syntax ) list.next();
+                Syntax syntax = list.next();
                 attr.add( SchemaUtils.render( syntax ).toString() );
             }
             attrs.put( attr );
@@ -341,7 +353,7 @@
         if ( returnAllOperationalAttributes || set.contains( "ditcontentrules" ) )
         {
             attr = new LockableAttributeImpl( "dITContentRules" );
-            Iterator list = globalRegistries.getDitContentRuleRegistry().list();
+            Iterator list = registries.getDitContentRuleRegistry().list();
             while ( list.hasNext() )
             {
                 DITContentRule dcr = ( DITContentRule ) list.next();
@@ -353,7 +365,7 @@
         if ( returnAllOperationalAttributes || set.contains( "ditstructurerules" ) )
         {
             attr = new LockableAttributeImpl( "dITStructureRules" );
-            Iterator list = globalRegistries.getDitStructureRuleRegistry().list();
+            Iterator list = registries.getDitStructureRuleRegistry().list();
             while ( list.hasNext() )
             {
                 DITStructureRule dsr = ( DITStructureRule ) list.next();
@@ -365,7 +377,7 @@
         if ( returnAllOperationalAttributes || set.contains( "nameforms" ) )
         {
             attr = new LockableAttributeImpl( "nameForms" );
-            Iterator list = globalRegistries.getNameFormRegistry().list();
+            Iterator list = registries.getNameFormRegistry().list();
             while ( list.hasNext() )
             {
                 NameForm nf = ( NameForm ) list.next();
@@ -477,8 +489,8 @@
      */
     private boolean isRequired( String attrId, Attribute objectClass ) throws NamingException
     {
-        OidRegistry oidRegistry = globalRegistries.getOidRegistry();
-        ObjectClassRegistry registry = globalRegistries.getObjectClassRegistry();
+        OidRegistry oidRegistry = registries.getOidRegistry();
+        ObjectClassRegistry registry = registries.getObjectClassRegistry();
 
         if ( !oidRegistry.hasOid( attrId ) )
         {
@@ -595,7 +607,7 @@
                 ResultCodeEnum.OPERATIONS_ERROR );
         }
 
-        Set objectClasses = new HashSet();
+        Set<String> objectClasses = new HashSet<String>();
         for ( int ii = 0; ii < objectClassAttr.size(); ii++ )
         {
             String val = ( String ) objectClassAttr.get( ii );
@@ -663,8 +675,8 @@
         }
         
         Attribute objectClass = getResultantObjectClasses( modOp, mods.get( "objectClass" ), entry.get( "objectClass" ) );
-        ObjectClassRegistry ocRegistry = this.globalRegistries.getObjectClassRegistry();
-        AttributeTypeRegistry atRegistry = this.globalRegistries.getAttributeTypeRegistry();
+        ObjectClassRegistry ocRegistry = this.registries.getObjectClassRegistry();
+        AttributeTypeRegistry atRegistry = this.registries.getAttributeTypeRegistry();
 
         NamingEnumeration changes = mods.getIDs();
         
@@ -775,8 +787,13 @@
             }
         }
 
+        if ( name.startsWith( schemaBaseDN ) )
+        {
+            schemaManager.modify( name, modOp, mods, entry );
+        }
         next.modify( name, modOp, mods );
     }
+    
 
     public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
@@ -791,9 +808,9 @@
         
         // We will use this temporary entry to check that the modifications
         // can be applied as atomic operations
-        Attributes tmpEntry = (Attributes)entry.clone();
+        Attributes tmpEntry = ( Attributes ) entry.clone();
         
-        Set modset = new HashSet();
+        Set<String> modset = new HashSet<String>();
         ModificationItem objectClassMod = null;
         
         // Check that we don't have two times the same modification.
@@ -848,8 +865,8 @@
                 entry.get( "objectClass" ) );
         }
 
-        ObjectClassRegistry ocRegistry = this.globalRegistries.getObjectClassRegistry();
-        AttributeTypeRegistry atRegistry = this.globalRegistries.getAttributeTypeRegistry();
+        ObjectClassRegistry ocRegistry = this.registries.getObjectClassRegistry();
+        AttributeTypeRegistry atRegistry = this.registries.getAttributeTypeRegistry();
 
         // -------------------------------------------------------------------
         // DIRSERVER-646 Fix: Replacing an unknown attribute with no values 
@@ -864,7 +881,7 @@
             return;
         }
         
-        // Now, apply the modifications on the cloned entry before applyong it to the
+        // Now, apply the modifications on the cloned entry before applying it on the
         // real object.
         for ( int ii = 0; ii < mods.length; ii++ )
         {
@@ -908,7 +925,7 @@
                 case DirContext.REMOVE_ATTRIBUTE :
                     if ( tmpEntry.get( change.getID() ) == null )
                     {
-                        log.error( "Trying to remove an inexistant attribute: " + change.getID() );
+                        log.error( "Trying to remove an non-existant attribute: " + change.getID() );
                         throw new LdapNoSuchAttributeException();
                     }
 
@@ -923,14 +940,14 @@
                     tmpEntry.remove( change.getID() );
                     
                     SchemaChecker.preventRdnChangeOnModifyRemove( name, modOp, change, 
-                        this.globalRegistries.getOidRegistry() ); 
+                        this.registries.getOidRegistry() ); 
                     SchemaChecker
                         .preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, modOp, change, objectClass );
                     break;
                         
                 case DirContext.REPLACE_ATTRIBUTE :
                     SchemaChecker.preventRdnChangeOnModifyReplace( name, modOp, change, 
-                        globalRegistries.getOidRegistry() );
+                        registries.getOidRegistry() );
                     SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, modOp, change );
                     
                     attr = tmpEntry.get( change.getID() );
@@ -1008,6 +1025,10 @@
         
         assertNumberOfAttributeValuesValid( tmpEntry );
 
+        if ( name.startsWith( schemaBaseDN ) )
+        {
+            schemaManager.modify( name, mods, entry );
+        }
         next.modify( name, mods );
     }
 
@@ -1047,9 +1068,9 @@
             AttributeType type = null;
             boolean asBinary = false;
 
-            if ( globalRegistries.getAttributeTypeRegistry().hasAttributeType( id ) )
+            if ( registries.getAttributeTypeRegistry().hasAttributeType( id ) )
             {
-                type = globalRegistries.getAttributeTypeRegistry().lookup( id );
+                type = registries.getAttributeTypeRegistry().lookup( id );
             }
 
             if ( type != null )
@@ -1124,7 +1145,7 @@
      */
     public void add( NextInterceptor next, LdapDN normName, Attributes attrs ) throws NamingException
     {
-        AttributeTypeRegistry atRegistry = this.globalRegistries.getAttributeTypeRegistry();
+        AttributeTypeRegistry atRegistry = this.registries.getAttributeTypeRegistry();
         NamingEnumeration attrEnum = attrs.getIDs();
         while ( attrEnum.hasMoreElements() )
         {
@@ -1140,7 +1161,7 @@
             }
         }
 
-        alterObjectClasses( attrs.get( "objectClass" ), this.globalRegistries.getObjectClassRegistry() );
+        alterObjectClasses( attrs.get( "objectClass" ), this.registries.getObjectClassRegistry() );
         assertRequiredAttributesPresent( attrs );
         assertNumberOfAttributeValuesValid( attrs );
         next.add(normName, attrs );
@@ -1166,7 +1187,7 @@
      */
     private void assertNumberOfAttributeValuesValid( Attribute attribute ) throws InvalidAttributeValueException, NamingException
     {
-        AttributeTypeRegistry registry = this.globalRegistries.getAttributeTypeRegistry();
+        AttributeTypeRegistry registry = this.registries.getAttributeTypeRegistry();
 
         if ( attribute.size() > 1 && registry.lookup( attribute.getID() ).isSingleValue() )
         {                
@@ -1182,7 +1203,7 @@
         throws NamingException
     {
         AttributeType[] required = getRequiredAttributes( entry.get( "objectClass" ), 
-            this.globalRegistries.getObjectClassRegistry() );
+            this.registries.getObjectClassRegistry() );
         for ( int ii = 0; ii < required.length; ii++ )
         {
             boolean aliasFound = false;
@@ -1217,7 +1238,7 @@
         ObjectClassRegistry registry ) throws NamingException
     {
         AttributeType[] attributeTypes;
-        Set set = new HashSet();
+        Set<AttributeType> set = new HashSet<AttributeType>();
         
         for ( int ii = 0; ii < objectClass.size(); ii++ )
         {
@@ -1226,7 +1247,7 @@
             infuseMustList( set, oc );
         }
         
-        attributeTypes = ( AttributeType[] ) set.toArray( EMPTY_ATTRIBUTE_TYPE_ARRAY );
+        attributeTypes = set.toArray( EMPTY_ATTRIBUTE_TYPE_ARRAY );
         return attributeTypes;
     }
 
@@ -1238,7 +1259,7 @@
      * @param set set to infuse attributeTypes into
      * @param oc the objectClass to ascent the polymorphic inheritance tree of 
      */
-    private static final void infuseMustList( Set set, ObjectClass oc ) throws NamingException
+    private static final void infuseMustList( Set<AttributeType> set, ObjectClass oc ) throws NamingException
     {
         // ignore top
         if ( oc.getName().equalsIgnoreCase( "top" ) )

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java Sun Dec 31 11:46:40 2006
@@ -20,7 +20,7 @@
 package org.apache.directory.server.core.subtree;
 
 
-import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.util.StringTools;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Sun Dec 31 11:46:40 2006
@@ -30,8 +30,8 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
-import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -116,8 +116,8 @@
         super.init( factoryCfg, cfg );
         this.nexus = factoryCfg.getPartitionNexus();
         this.factoryCfg = factoryCfg;
-        this.attrRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
-        this.oidRegistry = factoryCfg.getGlobalRegistries().getOidRegistry();
+        this.attrRegistry = factoryCfg.getRegistries().getAttributeTypeRegistry();
+        this.oidRegistry = factoryCfg.getRegistries().getOidRegistry();
         
         // setup various attribute type values
         objectClassType = attrRegistry.lookup( oidRegistry.getOid( "objectClass" ) );
@@ -129,7 +129,7 @@
                 return attrRegistry.getNormalizerMapping();
             }
         }, attrRegistry.getNormalizerMapping() );
-        evaluator = new SubtreeEvaluator( factoryCfg.getGlobalRegistries().getOidRegistry() );
+        evaluator = new SubtreeEvaluator( factoryCfg.getRegistries().getOidRegistry() );
 
         // prepare to find all subentries in all namingContexts
         Iterator suffixes = this.nexus.listSuffixes();

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java Sun Dec 31 11:46:40 2006
@@ -20,7 +20,7 @@
 package org.apache.directory.server.core.subtree;
 
 
-import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.util.NamespaceTools;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Sun Dec 31 11:46:40 2006
@@ -45,9 +45,9 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
 import org.apache.directory.server.core.sp.LdapClassLoader;
 import org.apache.directory.server.core.subtree.SubentryService;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -215,7 +215,7 @@
     {
         super.init( dirServCfg, intCfg );
         triggerSpecCache = new TriggerSpecCache( dirServCfg );
-        attrRegistry = dirServCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        attrRegistry = dirServCfg.getRegistries().getAttributeTypeRegistry();
         triggerParser = new TriggerSpecificationParser
             ( new NormalizerMappingResolver()
                 {

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Sun Dec 31 11:46:40 2006
@@ -40,7 +40,7 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
@@ -92,8 +92,8 @@
     public TriggerSpecCache( DirectoryServiceConfiguration dirServCfg ) throws NamingException
     {
         this.nexus = dirServCfg.getPartitionNexus();
-        attrRegistry = dirServCfg.getGlobalRegistries().getAttributeTypeRegistry();
-        final AttributeTypeRegistry registry = dirServCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        attrRegistry = dirServCfg.getRegistries().getAttributeTypeRegistry();
+        final AttributeTypeRegistry registry = dirServCfg.getRegistries().getAttributeTypeRegistry();
         triggerSpecParser = new TriggerSpecificationParser( new NormalizerMappingResolver()
             {
                 public Map getNormalizerMapping() throws NamingException

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java Sun Dec 31 11:46:40 2006
@@ -28,7 +28,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.authz.support.ACITupleFilter;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -463,5 +463,11 @@
     public boolean hasDescendants( String ancestorId ) throws NamingException
     {
         return false;
+    }
+
+
+    public Iterator<AttributeType> iterator()
+    {
+        return null;
     }
 }

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java Sun Dec 31 11:46:40 2006
@@ -28,7 +28,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.authz.support.ACITupleFilter;
-import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 
 
 /**

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java Sun Dec 31 11:46:40 2006
@@ -37,10 +37,10 @@
 import org.apache.directory.server.core.authz.support.RelatedProtectedItemFilter;
 import org.apache.directory.server.core.authz.support.RelatedUserClassFilter;
 import org.apache.directory.server.core.event.ExpressionEvaluator;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
-import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsBTreeTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsBTreeTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsBTreeTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsBTreeTest.java Sun Dec 31 11:46:40 2006
@@ -29,7 +29,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 import org.apache.directory.server.core.partition.impl.btree.TupleComparator;
-import org.apache.directory.server.core.schema.SerializableComparator;
+import org.apache.directory.server.schema.SerializableComparator;
 import org.apache.directory.shared.ldap.util.ArrayEnumeration;
 import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsTreeSetTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsTreeSetTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsTreeSetTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsTreeSetTest.java Sun Dec 31 11:46:40 2006
@@ -29,7 +29,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 import org.apache.directory.server.core.partition.impl.btree.TupleComparator;
-import org.apache.directory.server.core.schema.SerializableComparator;
+import org.apache.directory.server.schema.SerializableComparator;
 import org.apache.directory.shared.ldap.util.ArrayEnumeration;
 import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDupsTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDupsTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDupsTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDupsTest.java Sun Dec 31 11:46:40 2006
@@ -29,7 +29,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 import org.apache.directory.server.core.partition.impl.btree.TupleRenderer;
-import org.apache.directory.server.core.schema.SerializableComparator;
+import org.apache.directory.server.schema.SerializableComparator;
 import org.apache.directory.shared.ldap.util.ArrayEnumeration;
 import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Sun Dec 31 11:46:40 2006
@@ -25,10 +25,12 @@
 import javax.naming.directory.*;
 import javax.naming.NamingException;
 
-import org.apache.directory.server.core.schema.ObjectClassRegistry;
 import org.apache.directory.server.core.schema.SchemaChecker;
-import org.apache.directory.server.core.schema.bootstrap.*;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
+import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.ObjectClassRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -50,7 +52,7 @@
  */
 public class SchemaCheckerTest extends TestCase
 {
-    GlobalRegistries registries = null;
+    Registries registries = null;
 
 
     public SchemaCheckerTest() throws NamingException
@@ -63,54 +65,24 @@
     {
         super( name );
 
-        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
-
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        Set schemas = new HashSet();
+        registries = new DefaultRegistries( "bootstrap", loader );
+
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );
         schemas.add( new CoreSchema() );
-        schemas.add( new CosineSchema() );
-        schemas.add( new InetorgpersonSchema() );
-        schemas.add( new JavaSchema() );
-        loader.load( schemas, bootstrapRegistries );
+        loader.loadWithDependencies( schemas, ( DefaultRegistries ) registries );
 
-        java.util.List errors = bootstrapRegistries.checkRefInteg();
+        java.util.List errors = registries.checkRefInteg();
         if ( !errors.isEmpty() )
         {
             NamingException e = new NamingException();
             e.setRootCause( ( Throwable ) errors.get( 0 ) );
             throw e;
         }
-
-        registries = new GlobalRegistries( bootstrapRegistries );
     }
 
-
-    //    private GlobalRegistries getGlobalRegistries() throws NamingException
-    //    {
-    //        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
-    //
-    //        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-    //        Set schemas = new HashSet();
-    //        schemas.add( new SystemSchema() );
-    //        schemas.add( new ApacheSchema() );
-    //        schemas.add( new CoreSchema() );
-    //        schemas.add( new CosineSchema() );
-    //        schemas.add( new InetorgpersonSchema() );
-    //        schemas.add( new JavaSchema() );
-    //        loader.load( schemas, bootstrapRegistries );
-    //
-    //        java.util.List errors = bootstrapRegistries.checkRefInteg();
-    //        if ( !errors.isEmpty() )
-    //        {
-    //            NamingException e = new NamingException();
-    //            e.setRootCause( ( Throwable ) errors.get( 0 ) );
-    //            throw e;
-    //        }
-    //
-    //        return new GlobalRegistries( bootstrapRegistries );
-    //    }
 
     /**
      * Test case to check the schema checker operates correctly when modify

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java Sun Dec 31 11:46:40 2006
@@ -29,13 +29,12 @@
 import javax.naming.directory.BasicAttribute;
 
 import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.schema.bootstrap.ApacheSchema;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
-import org.apache.directory.server.core.schema.bootstrap.CoreSchema;
-import org.apache.directory.server.core.schema.bootstrap.CosineSchema;
-import org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema;
-import org.apache.directory.server.core.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -45,22 +44,19 @@
 
 /**
  * Tests methods in SchemaService.
- * 
  */
 public class SchemaServiceTest extends TestCase
 {
-    BootstrapRegistries registries = new BootstrapRegistries();
+    DefaultRegistries registries;
 
 
     public void setUp() throws Exception
     {
-        registries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+        registries = new DefaultRegistries( "bootstrap", loader );
         loader.load( new SystemSchema(), registries );
         loader.load( new ApacheSchema(), registries );
         loader.load( new CoreSchema(), registries );
-        loader.load( new CosineSchema(), registries );
-        loader.load( new InetorgpersonSchema(), registries );
     }
 
     
@@ -68,7 +64,7 @@
     {
         AttributeTypeRegistry attrRegistry = registries.getAttributeTypeRegistry();
         Iterator list = attrRegistry.descendants( "name" );
-        Set nameAttrs = new HashSet();
+        Set<String> nameAttrs = new HashSet<String>();
         while ( list.hasNext() )
         {
             AttributeType type = ( AttributeType ) list.next();
@@ -128,38 +124,35 @@
 
     public void testAlterObjectClassesInetOrgPersonAttrValue() throws NamingException
     {
-        Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
+        Attribute attr = new BasicAttribute( "objectClass", "organizationalPerson" );
         SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
-        assertEquals( 3, attr.size() );
+        assertEquals( 2, attr.size() );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
-        assertTrue( attr.contains( "inetOrgPerson" ) );
     }
 
 
     public void testAlterObjectClassesOverlapping() throws NamingException
     {
-        Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
+        Attribute attr = new BasicAttribute( "objectClass", "organizationalPerson" );
         attr.add( "residentialPerson" );
         SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
-        assertEquals( 4, attr.size() );
+        assertEquals( 3, attr.size() );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
-        assertTrue( attr.contains( "inetOrgPerson" ) );
         assertTrue( attr.contains( "residentialPerson" ) );
     }
 
 
     public void testAlterObjectClassesOverlappingAndDsa() throws NamingException
     {
-        Attribute attr = new BasicAttribute( "objectClass", "inetOrgPerson" );
+        Attribute attr = new BasicAttribute( "objectClass", "organizationalPerson" );
         attr.add( "residentialPerson" );
         attr.add( "dSA" );
         SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
-        assertEquals( 6, attr.size() );
+        assertEquals( 5, attr.size() );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
-        assertTrue( attr.contains( "inetOrgPerson" ) );
         assertTrue( attr.contains( "residentialPerson" ) );
         assertTrue( attr.contains( "dSA" ) );
         assertTrue( attr.contains( "applicationEntity" ) );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java Sun Dec 31 11:46:40 2006
@@ -30,18 +30,12 @@
 
 import junit.framework.TestCase;
 
-import org.apache.directory.server.core.schema.bootstrap.ApacheSchema;
-import org.apache.directory.server.core.schema.bootstrap.AutofsSchema;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
-import org.apache.directory.server.core.schema.bootstrap.CorbaSchema;
-import org.apache.directory.server.core.schema.bootstrap.CoreSchema;
-import org.apache.directory.server.core.schema.bootstrap.CosineSchema;
-import org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema;
-import org.apache.directory.server.core.schema.bootstrap.JavaSchema;
-import org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema;
-import org.apache.directory.server.core.schema.bootstrap.NisSchema;
-import org.apache.directory.server.core.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.schema.bootstrap.Schema;
+import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 
@@ -53,13 +47,14 @@
  */
 public class BootstrapSchemaLoaderTest extends TestCase
 {
-    BootstrapRegistries registries;
+    BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+    DefaultRegistries registries;
 
 
     protected void setUp() throws Exception
     {
         super.setUp();
-        registries = new BootstrapRegistries();
+        registries = new DefaultRegistries( "bootstrap", loader );
     }
 
 
@@ -72,69 +67,31 @@
 
     public void testLoadAll() throws NamingException
     {
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        Set schemas = new HashSet();
-        schemas.add( new AutofsSchema() );
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new CoreSchema() );
-        schemas.add( new CosineSchema() );
-        schemas.add( new CorbaSchema() );
         schemas.add( new ApacheSchema() );
-        schemas.add( new InetorgpersonSchema() );
-        schemas.add( new JavaSchema() );
-        schemas.add( new Krb5kdcSchema() );
-        schemas.add( new NisSchema() );
         schemas.add( new SystemSchema() );
 
-        loader.load( schemas, registries );
+        loader.loadWithDependencies( schemas, registries );
         AttributeType type;
 
-        // from autofs.schema
-        type = registries.getAttributeTypeRegistry().lookup( "automountInformation" );
-        assertNotNull( type );
-
         // from core.schema
         type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" );
         assertNotNull( type );
 
-        // from cosine.schema
-        type = registries.getAttributeTypeRegistry().lookup( "textEncodedORAddress" );
-        assertNotNull( type );
-
-        // from corba.schema
-        type = registries.getAttributeTypeRegistry().lookup( "corbaRepositoryId" );
-        assertNotNull( type );
-
-        // from eve.schema
+        // from apache.schema
         type = registries.getAttributeTypeRegistry().lookup( "apacheAlias" );
         assertNotNull( type );
 
-        // from inetorgperson.schema
-        type = registries.getAttributeTypeRegistry().lookup( "carLicense" );
-        assertNotNull( type );
-
-        // from java.schema
-        type = registries.getAttributeTypeRegistry().lookup( "javaClassName" );
-        assertNotNull( type );
-
-        // from krb5kdc.schema
-        type = registries.getAttributeTypeRegistry().lookup( "krb5PrincipalName" );
-        assertNotNull( type );
-
-        // from nis.schema
-        type = registries.getAttributeTypeRegistry().lookup( "homeDirectory" );
-        assertNotNull( type );
-
         // from system.schema
         type = registries.getAttributeTypeRegistry().lookup( "distinguishedName" );
         assertNotNull( type );
-
     }
 
 
     public void testSystemSchemaLoad() throws NamingException
     {
         SystemSchema systemSchema = new SystemSchema();
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( systemSchema, registries );
 
         AttributeType type;
@@ -152,9 +109,7 @@
     public void testApacheSchemaLoad() throws NamingException
     {
         testSystemSchemaLoad();
-
         ApacheSchema apacheSchema = new ApacheSchema();
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( apacheSchema, registries );
 
         AttributeType type;
@@ -171,13 +126,11 @@
 
     public void testEveDepsSchemaLoad() throws NamingException
     {
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-
-        Set schemas = new HashSet();
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new ApacheSchema() );
         schemas.add( new SystemSchema() );
 
-        loader.load( schemas, registries );
+        loader.loadWithDependencies( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" );
         assertNotNull( type );
@@ -193,9 +146,7 @@
     public void testCoreSchemaLoad() throws NamingException
     {
         testSystemSchemaLoad();
-
         CoreSchema coreSchema = new CoreSchema();
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( coreSchema, registries );
 
         AttributeType type;
@@ -212,13 +163,11 @@
 
     public void testCoreDepsSchemaLoad() throws NamingException
     {
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-
-        Set schemas = new HashSet();
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new CoreSchema() );
         schemas.add( new SystemSchema() );
 
-        loader.load( schemas, registries );
+        loader.loadWithDependencies( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" );
         assertNotNull( type );
@@ -227,71 +176,6 @@
         assertNotNull( type );
 
         type = registries.getAttributeTypeRegistry().lookup( "serialNumber" );
-        assertNotNull( type );
-    }
-
-
-    public void testJavaSchemaLoad() throws NamingException
-    {
-        testCoreSchemaLoad();
-
-        JavaSchema javaSchema = new JavaSchema();
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        loader.load( javaSchema, registries );
-
-        AttributeType type;
-        type = registries.getAttributeTypeRegistry().lookup( "javaFactory" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "javaSerializedData" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "javaClassNames" );
-        assertNotNull( type );
-    }
-
-
-    public void testJavaDepsSchemaLoad() throws NamingException
-    {
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-
-        Set schemas = new HashSet();
-        schemas.add( new CoreSchema() );
-        schemas.add( new JavaSchema() );
-        schemas.add( new SystemSchema() );
-
-        loader.load( schemas, registries );
-        AttributeType type;
-        type = registries.getAttributeTypeRegistry().lookup( "javaFactory" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "javaSerializedData" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "javaClassNames" );
-        assertNotNull( type );
-    }
-
-
-    public void testEveAndJavaDepsSchemaLoad() throws NamingException
-    {
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-
-        Set schemas = new HashSet();
-        schemas.add( new ApacheSchema() );
-        schemas.add( new CoreSchema() );
-        schemas.add( new JavaSchema() );
-        schemas.add( new SystemSchema() );
-
-        loader.load( schemas, registries );
-        AttributeType type;
-        type = registries.getAttributeTypeRegistry().lookup( "apacheAlias" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" );
-        assertNotNull( type );
-
-        type = registries.getAttributeTypeRegistry().lookup( "apacheUpdn" );
         assertNotNull( type );
     }
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Sun Dec 31 11:46:40 2006
@@ -25,17 +25,18 @@
 import javax.naming.NamingException;
 import javax.naming.directory.BasicAttribute;
 
-import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.server.core.schema.bootstrap.*;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
-import org.apache.directory.shared.ldap.filter.AssertionEnum;
+import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
+import org.apache.directory.shared.ldap.filter.AssertionEnum;
 
 import java.util.Set;
 import java.util.HashSet;
@@ -49,8 +50,8 @@
  */
 public class RefinementEvaluatorTest extends TestCase
 {
-    /** the global registries */
-    private GlobalRegistries registries;
+    /** the registries */
+    private Registries registries;
     /** the refinement evaluator to test */
     private RefinementEvaluator evaluator;
 
@@ -61,17 +62,14 @@
      */
     private void init() throws NamingException
     {
-        BootstrapRegistries bsRegistries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        Set schemas = new HashSet();
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );
         schemas.add( new CoreSchema() );
-        schemas.add( new CosineSchema() );
-        schemas.add( new InetorgpersonSchema() );
-        schemas.add( new JavaSchema() );
-        loader.load( schemas, bsRegistries );
-        registries = new GlobalRegistries( bsRegistries );
+        loader.loadWithDependencies( schemas, bsRegistries );
+        registries = bsRegistries;
     }
 
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Sun Dec 31 11:46:40 2006
@@ -25,12 +25,14 @@
 import javax.naming.NamingException;
 import javax.naming.directory.BasicAttribute;
 
-import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.server.core.schema.bootstrap.*;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
-import org.apache.directory.shared.ldap.filter.AssertionEnum;
+import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.filter.LeafNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
+import org.apache.directory.shared.ldap.filter.AssertionEnum;
 
 import java.util.Set;
 import java.util.HashSet;
@@ -45,7 +47,7 @@
 public class RefinementLeafEvaluatorTest extends TestCase
 {
     /** the global registries */
-    private GlobalRegistries registries;
+    private Registries registries;
     /** the refinement leaf evaluator to test */
     private RefinementLeafEvaluator evaluator;
 
@@ -56,17 +58,14 @@
      */
     private void init() throws NamingException
     {
-        BootstrapRegistries bsRegistries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        Set schemas = new HashSet();
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );
         schemas.add( new CoreSchema() );
-        schemas.add( new CosineSchema() );
-        schemas.add( new InetorgpersonSchema() );
-        schemas.add( new JavaSchema() );
-        loader.load( schemas, bsRegistries );
-        registries = new GlobalRegistries( bsRegistries );
+        loader.loadWithDependencies( schemas, bsRegistries );
+        registries = bsRegistries;
     }
 
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java Sun Dec 31 11:46:40 2006
@@ -22,10 +22,11 @@
 
 import junit.framework.TestCase;
 
-import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.server.core.schema.bootstrap.*;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
+import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
@@ -49,23 +50,20 @@
  */
 public class SubtreeEvaluatorTest extends TestCase
 {
-    private GlobalRegistries registries;
+    private Registries registries;
     private SubtreeEvaluator evaluator;
 
 
     private void init() throws NamingException
     {
-        BootstrapRegistries bsRegistries = new BootstrapRegistries();
-        registries = new GlobalRegistries( bsRegistries );
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        Set schemas = new HashSet();
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        registries = bsRegistries;
+        Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );
         schemas.add( new CoreSchema() );
-        schemas.add( new CosineSchema() );
-        schemas.add( new InetorgpersonSchema() );
-        schemas.add( new JavaSchema() );
-        loader.load( schemas, bsRegistries );
+        loader.loadWithDependencies( schemas, bsRegistries );
     }
 
 
@@ -154,7 +152,7 @@
     public void testWithMinMaxAndChopAfter() throws Exception
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
-        Set chopAfter = new HashSet();
+        Set<LdapDN> chopAfter = new HashSet<LdapDN>();
         chopAfter.add( new LdapDN( "uid=Tori Amos" ) );
         chopAfter.add( new LdapDN( "ou=twolevels,uid=akarasulu" ) );
         modifier.setChopAfterExclusions( chopAfter );
@@ -188,7 +186,7 @@
     public void testWithMinMaxAndChopBefore() throws Exception
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
-        Set chopBefore = new HashSet();
+        Set<LdapDN> chopBefore = new HashSet<LdapDN>();
         chopBefore.add( new LdapDN( "uid=Tori Amos" ) );
         chopBefore.add( new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
         modifier.setChopBeforeExclusions( chopBefore );

Propchange: directory/trunks/apacheds/jdbm-store/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -0,0 +1,17 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+
+nbproject
+

Propchange: directory/trunks/apacheds/mitosis/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -1,4 +1,4 @@
-
+*.iml
 target
 .classpath
 .project

Modified: directory/trunks/apacheds/mitosis/pom.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/pom.xml?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/pom.xml (original)
+++ directory/trunks/apacheds/mitosis/pom.xml Sun Dec 31 11:46:40 2006
@@ -87,5 +87,142 @@
       <artifactId>derby</artifactId>
     </dependency>
   </dependencies>
+
+  <profiles>
+    <profile>
+    <id>no-integration-or-perf-tests</id>
+    <activation>
+      <activeByDefault>true</activeByDefault>
+    </activation>
+    <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>**/*ITest.java</exclude>
+              <exclude>**/*PTest.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo>
+=================================================================
+                          W A R N I N G
+                          -------------
+
+Integration and performance tests have been disabled.  To enable
+integration tests run maven with the -Dintegration switch.  To
+enable performance tests run maven with the -Dperformance switch.
+=================================================================
+                    </echo>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+            </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>integration</id>
+      <activation>
+        <property><name>integration</name></property>
+      </activation>
+    <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>**/*PTest.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo>
+=================================================================
+                   I N T E G R A T I O N
+                   ---------------------
+
+Performance tests have been disabled.  To enable
+performance tests run maven with the -Dperformance switch.
+=================================================================
+                    </echo>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+            </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>performance</id>
+      <activation>
+        <property><name>performance</name></property>
+      </activation>
+    <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <systemProperties>
+              <property>
+                <name>outputDirectory</name>
+                <value>${basedir}/target</value>
+              </property>
+            </systemProperties>
+            <excludes>
+              <exclude>**/*ITest.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo>
+=================================================================
+                   P E R F O R M A N C E
+                   ---------------------
+
+Integration tests have been disabled.  To enable integration
+tests run maven with the -Dintegration switch.
+=================================================================
+                    </echo>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+            </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
 

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java Sun Dec 31 11:46:40 2006
@@ -29,7 +29,7 @@
 import org.apache.directory.mitosis.operation.support.EntryUtil;
 import org.apache.directory.mitosis.store.ReplicationStore;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java Sun Dec 31 11:46:40 2006
@@ -24,7 +24,7 @@
 import javax.naming.directory.Attribute;
 
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.operation.support.EntryUtil;

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java Sun Dec 31 11:46:40 2006
@@ -30,7 +30,7 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.common.CSNVector;
 import org.apache.directory.mitosis.common.ReplicaId;

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java Sun Dec 31 11:46:40 2006
@@ -30,7 +30,7 @@
 import org.apache.directory.mitosis.store.ReplicationStore;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Sun Dec 31 11:46:40 2006
@@ -58,7 +58,7 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
@@ -178,7 +178,7 @@
         nexus = serviceCfg.getPartitionNexus();
         store = configuration.getStore();
         operationFactory = new OperationFactory( serviceCfg, configuration );
-        attrRegistry = serviceCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        attrRegistry = serviceCfg.getRegistries().getAttributeTypeRegistry();
 
         // Initialize store and service
         store.open( serviceCfg, configuration );

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Sun Dec 31 11:46:40 2006
@@ -338,7 +338,7 @@
 
             SessionLog.info( ctx.getSession(), "Sending entries under '" + contextName + '\'' );
 
-            Map mapping = ctx.getServiceConfiguration().getGlobalRegistries().getAttributeTypeRegistry()
+            Map mapping = ctx.getServiceConfiguration().getRegistries().getAttributeTypeRegistry()
                 .getNormalizerMapping();
             contextName.normalize( mapping );
             sendAllEntries( ctx, contextName );
@@ -383,7 +383,7 @@
 
                 // Convert the entry into AddEntryOperation log.
                 LdapDN dn = new LdapDN( sr.getName() );
-                dn.normalize( ctx.getServiceConfiguration().getGlobalRegistries()
+                dn.normalize( ctx.getServiceConfiguration().getRegistries()
                     .getAttributeTypeRegistry().getNormalizerMapping() );
                 Operation op = new AddEntryOperation( csn, dn, attrs );
 

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java Sun Dec 31 11:46:40 2006
@@ -192,7 +192,7 @@
         {
             op.execute( ctx.getServiceConfiguration().getPartitionNexus(), 
                 ctx.getConfiguration().getStore(),
-                ctx.getServiceConfiguration().getGlobalRegistries().getAttributeTypeRegistry() );
+                ctx.getServiceConfiguration().getRegistries().getAttributeTypeRegistry() );
             ack = new LogEntryAckMessage( message.getSequence(), Constants.OK );
         }
         catch ( Exception e )

Modified: directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java (original)
+++ directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java Sun Dec 31 11:46:40 2006
@@ -18,7 +18,7 @@
  *  
  */
 package org.apache.directory.mitosis.store.derby;
-
+ 
 
 import java.io.File;
 import java.io.IOException;
@@ -45,7 +45,8 @@
 import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.schema.global.GlobalRegistries;
+import org.apache.directory.server.core.schema.SchemaManager;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.common.CSNFactory;
@@ -407,7 +408,7 @@
         }
 
 
-        public GlobalRegistries getGlobalRegistries()
+        public Registries getRegistries()
         {
             return null;
         }
@@ -432,6 +433,12 @@
 
 
         public DirectoryServiceListener getServiceListener()
+        {
+            return null;
+        }
+
+
+        public SchemaManager getSchemaManager()
         {
             return null;
         }

Modified: directory/trunks/apacheds/pom.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/pom.xml?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/pom.xml (original)
+++ directory/trunks/apacheds/pom.xml Sun Dec 31 11:46:40 2006
@@ -210,16 +210,19 @@
     </dependency>
   </dependencies>
 
-  <profiles>
-    <profile>
-      <id>jdk1.5</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-        <jdk>1.5</jdk>
-      </activation>
       <modules>
         <!-- module>maven-osgi-plugin</module-->
 
+        <module>bootstrap-partition</module>
+        <module>bootstrap-plugin</module>
+        <module>schema-extras</module>
+        <module>schema-bootstrap</module>
+
+        <module>utils</module>
+        <module>schema-registries</module>
+        <module>jdbm-store</module>
+        <module>constants</module>
+        <module>btree-base</module>
         <module>core</module>
         <module>core-shared</module>
         <module>core-plugin</module>
@@ -251,76 +254,6 @@
         <!-- extra for jdk 1.5 -->
 
       </modules>
-    </profile>
-
-    <!--profile>
-      <id>jdk1.4</id>
-      <activation>
-        <jdk>1.4</jdk>
-      </activation>
-      <modules>
-        <module>maven-osgi-plugin</module>
-
-        <module>core</module>
-        <module>core-shared</module>
-        <module>core-plugin</module>
-        <module>core-unit</module>
-        <module>protocol-shared</module>
-        <module>protocol-ntp</module>
-        <module>protocol-ldap</module>
-        <module>protocol-kerberos</module>
-        <module>protocol-dhcp</module>
-        <module>protocol-dns</module>
-        <module>protocol-changepw</module>
-        <module>server-tools</module>
-
-        <!== breaks the build on first try
-        <module>sar-plugin</module>
-        <module>server-sar</module>
-        ==>
-
-        <module>server-unit</module>
-        <module>server-main</module>
-        <module>server-jndi</module>
-        <module>kerberos-shared</module>
-
-        <module>mitosis</module>
-        <module>server-replication</module>
-      </modules>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>validate</phase>
-                <configuration>
-                  <tasks>
-                    <echo>
-====================================================================
-                       W A R N I N G
-                       =============
-
-Build with 1.4 jvm will not include modules:
-
- o server-ssl
-
-Use JDK 1.5 to make sure these modules build.
-====================================================================
-                    </echo>
-                  </tasks>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile-->
-  </profiles>
 
   <developers>
     <developer>

Modified: directory/trunks/apacheds/protocol-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-shared/pom.xml?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/protocol-shared/pom.xml (original)
+++ directory/trunks/apacheds/protocol-shared/pom.xml Sun Dec 31 11:46:40 2006
@@ -36,6 +36,12 @@
       <artifactId>apacheds-core</artifactId>
       <version>${pom.version}</version>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-schema-extras</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
   </dependencies>
   <build>
     <plugins>

Modified: directory/trunks/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java (original)
+++ directory/trunks/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java Sun Dec 31 11:46:40 2006
@@ -52,14 +52,14 @@
 import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.apache.directory.server.core.schema.bootstrap.ApacheSchema;
-import org.apache.directory.server.core.schema.bootstrap.ApachednsSchema;
-import org.apache.directory.server.core.schema.bootstrap.CoreSchema;
-import org.apache.directory.server.core.schema.bootstrap.CosineSchema;
-import org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema;
-import org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema;
-import org.apache.directory.server.core.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.protocol.shared.store.KerberosAttribute;
+import org.apache.directory.server.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.schema.bootstrap.ApachednsSchema;
+import org.apache.directory.server.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.schema.bootstrap.CosineSchema;
+import org.apache.directory.server.schema.bootstrap.InetorgpersonSchema;
+import org.apache.directory.server.schema.bootstrap.Krb5kdcSchema;
+import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
@@ -155,13 +155,19 @@
         schemas.add( new Krb5kdcSchema() );
         schemas.add( new SystemSchema() );
         schemas.add( new ApachednsSchema() );
-        config.setBootstrapSchemas( schemas );
+
+        if ( true )
+        {
+            throw new RuntimeException( "Need to find a way to configure the use of different schemas on startup." );
+        }
+        
+        //config.setBootstrapSchemas( schemas );
 
         Set partitions = new HashSet();
         partitions.add( getExamplePartition() );
         partitions.add( getApachePartition() );
 
-        config.setContextPartitionConfigurations( Collections.unmodifiableSet( partitions ) );
+        config.setPartitionConfigurations( Collections.unmodifiableSet( partitions ) );
 
         return config.toJndiEnvironment();
     }

Propchange: directory/trunks/apacheds/schema-bootstrap/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -0,0 +1,15 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+nbproject

Copied: directory/trunks/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java (from r491463, directory/branches/trunks/schema/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java)
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java?view=diff&rev=491471&p1=directory/branches/trunks/schema/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java&r1=491463&p2=directory/trunks/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java&r2=491471
==============================================================================
--- directory/branches/trunks/schema/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java (original)
+++ directory/trunks/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxCheckerProducer.java Sun Dec 31 11:46:40 2006
@@ -60,9 +60,9 @@
         SyntaxChecker checker = null;
         
         checker = new NumericOidSyntaxChecker();
-        cb.schemaObjectProduced( this, NumericOidSyntaxChecker.DEFAULT_OID, checker );
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
         
         checker = new ObjectClassTypeSyntaxChecker();
-        cb.schemaObjectProduced( this, ObjectClassTypeSyntaxChecker.DEFAULT_OID, checker );
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
     }
 }

Propchange: directory/trunks/apacheds/schema-extras/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -0,0 +1,17 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+
+nbproject
+

Propchange: directory/trunks/apacheds/schema-registries/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -0,0 +1,14 @@
+target
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+

Modified: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java (original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java Sun Dec 31 11:46:40 2006
@@ -102,15 +102,15 @@
     }
 
 
-    public void setBootstrapSchemas( Set arg0 )
-    {
-        super.setBootstrapSchemas( arg0 );
-    }
-
+//    public void setBootstrapSchemas( Set arg0 )
+//    {
+//        super.setBootstrapSchemas( arg0 );
+//    }
+//
 
-    public void setContextPartitionConfigurations( Set arg0 )
+    public void setPartitionConfigurations( Set arg0 )
     {
-        super.setContextPartitionConfigurations( arg0 );
+        super.setPartitionConfigurations( arg0 );
     }
 
 

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/BaseCommand.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/BaseCommand.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/BaseCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/BaseCommand.java Sun Dec 31 11:46:40 2006
@@ -81,7 +81,7 @@
     protected void init()
     {
         BaseToolCommandCL command;
-
+ 
         command = new DiagnosticCommandCL();
         commands.put( command.getName(), command );
         commandsOrdered.add( command.getName() );



Mime
View raw message