directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r384335 [1/2] - in /directory/trunks/apacheds/core/src: main/java/org/apache/directory/server/core/ main/java/org/apache/directory/server/core/schema/ main/java/org/apache/directory/server/core/schema/bootstrap/ main/java/org/apache/directo...
Date Wed, 08 Mar 2006 21:29:33 GMT
Author: akarasulu
Date: Wed Mar  8 13:29:28 2006
New Revision: 384335

URL: http://svn.apache.org/viewcvs?rev=384335&view=rev
Log:
general cleanup ...

 o cleanup was in schema subsystem
 o removed all these unused monitor interfaces and adapters for registries
 o added logging using SLF4J where appropriate to replace these classes
 o moved global registries into their own package


Added:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalComparatorRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitContentRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitStructureRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalMatchingRuleRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalMatchingRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalMatchingRuleUseRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalMatchingRuleUseRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalNameFormRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalNameFormRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalNormalizerRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalNormalizerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalObjectClassRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalObjectClassRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalOidRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalOidRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalRegistries.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalRegistries.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalSyntaxCheckerRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalSyntaxCheckerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalSyntaxRegistry.java   (contents, props changed)
      - copied, changed from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalSyntaxRegistry.java
Removed:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeTypeRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeTypeRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/ComparatorRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/ComparatorRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DITContentRuleRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DITContentRuleRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DITStructureRuleRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DITStructureRuleRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalComparatorRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitContentRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitStructureRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalMatchingRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalMatchingRuleUseRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalNameFormRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalNormalizerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalObjectClassRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalOidRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalRegistries.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalSyntaxCheckerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalSyntaxRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MatchingRuleRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MatchingRuleRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MatchingRuleUseRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MatchingRuleUseRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/NameFormRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/NameFormRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/NormalizerRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/NormalizerRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/ObjectClassRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/ObjectClassRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/OidRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/OidRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxCheckerRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxCheckerRegistryMonitorAdapter.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java
Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSyntaxChecker.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Wed Mar  8 13:29:28 2006
@@ -41,9 +41,9 @@
 import org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
-import org.apache.directory.server.core.schema.GlobalRegistries;
 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.global.GlobalRegistries;
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java Wed Mar  8 13:29:28 2006
@@ -25,7 +25,7 @@
 import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
-import org.apache.directory.server.core.schema.GlobalRegistries;
+import org.apache.directory.server.core.schema.global.GlobalRegistries;
 
 
 /**

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java Wed Mar  8 13:29:28 2006
@@ -24,7 +24,7 @@
 import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
-import org.apache.directory.server.core.schema.GlobalRegistries;
+import org.apache.directory.server.core.schema.global.GlobalRegistries;
 
 
 /**

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSyntaxChecker.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSyntaxChecker.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSyntaxChecker.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSyntaxChecker.java Wed Mar  8 13:29:28 2006
@@ -23,6 +23,7 @@
 /**
  * Document me.
  *
+ * @todo put me into shared-ldap
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- 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 Wed Mar  8 13:29:28 2006
@@ -38,6 +38,7 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
+import org.apache.directory.server.core.schema.global.GlobalRegistries;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,11 +24,12 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
-import org.apache.directory.server.core.schema.AttributeTypeRegistryMonitor;
-import org.apache.directory.server.core.schema.AttributeTypeRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A plain old java object implementation of an AttributeTypeRegistry.
@@ -38,14 +39,14 @@
  */
 public class BootstrapAttributeTypeRegistry implements AttributeTypeRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapAttributeTypeRegistry.class );
     /** maps an OID to an AttributeType */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private AttributeTypeRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -60,18 +61,6 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new AttributeTypeRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( AttributeTypeRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -79,13 +68,13 @@
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, AttributeType attributeType ) throws NamingException
     {
         if ( byOid.containsKey( attributeType.getOid() ) )
         {
             NamingException e = new NamingException( "attributeType w/ OID " + attributeType.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( attributeType, e );
             throw e;
         }
 
@@ -97,7 +86,10 @@
 
         oidToSchema.put( attributeType.getOid(), schema );
         byOid.put( attributeType.getOid(), attributeType );
-        monitor.registered( attributeType );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed attributeType: " + attributeType );
+        }
     }
 
 
@@ -108,12 +100,14 @@
         if ( !byOid.containsKey( id ) )
         {
             NamingException e = new NamingException( "attributeType w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
         AttributeType attributeType = ( AttributeType ) byOid.get( id );
-        monitor.lookedUp( attributeType );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "lookup with id" + id + "' of attributeType: " + attributeType );
+        }
         return attributeType;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,11 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.ComparatorRegistry;
-import org.apache.directory.server.core.schema.ComparatorRegistryMonitor;
-import org.apache.directory.server.core.schema.ComparatorRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.SerializableComparator;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A simple POJO implementation of the ComparatorRegistry service interface.
@@ -37,12 +38,12 @@
  */
 public class BootstrapComparatorRegistry implements ComparatorRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapComparatorRegistry.class );
     /** the comparators in this registry */
     private final Map comparators;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
-    /** the monitor for delivering callback events */
-    private ComparatorRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -57,39 +58,29 @@
     {
         this.oidToSchema = new HashMap();
         this.comparators = new HashMap();
-        this.monitor = new ComparatorRegistryMonitorAdapter();
-
         SerializableComparator.setRegistry( this );
     }
 
 
-    /**
-     * Sets the monitor used by this registry.
-     *
-     * @param monitor the monitor to set for registry event callbacks
-     */
-    public void setMonitor( ComparatorRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, String oid, Comparator comparator ) throws NamingException
     {
         if ( comparators.containsKey( oid ) )
         {
             NamingException e = new NamingException( "Comparator with OID " + oid + " already registered!" );
-            monitor.registerFailed( oid, comparator, e );
             throw e;
         }
 
         oidToSchema.put( oid, schema );
         comparators.put( oid, comparator );
-        monitor.registered( oid, comparator );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed comparator with OID: " + oid );
+        }
     }
 
 
@@ -98,12 +89,14 @@
         if ( comparators.containsKey( oid ) )
         {
             Comparator c = ( Comparator ) comparators.get( oid );
-            monitor.lookedUp( oid, c );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up comparator with OID: " + oid );
+            }
             return c;
         }
 
         NamingException e = new NamingException( "Comparator not found for OID: " + oid );
-        monitor.lookupFailed( oid, e );
         throw e;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,10 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.DITContentRuleRegistry;
-import org.apache.directory.server.core.schema.DITContentRuleRegistryMonitor;
-import org.apache.directory.server.core.schema.DITContentRuleRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,14 +38,14 @@
  */
 public class BootstrapDitContentRuleRegistry implements DITContentRuleRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapDitContentRuleRegistry.class );
     /** maps an OID to an DITContentRule */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private DITContentRuleRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -60,18 +60,6 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new DITContentRuleRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( DITContentRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -79,20 +67,23 @@
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, DITContentRule dITContentRule ) throws NamingException
     {
         if ( byOid.containsKey( dITContentRule.getOid() ) )
         {
             NamingException e = new NamingException( "dITContentRule w/ OID " + dITContentRule.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( dITContentRule, e );
             throw e;
         }
 
         oidRegistry.register( dITContentRule.getName(), dITContentRule.getOid() );
         byOid.put( dITContentRule.getOid(), dITContentRule );
         oidToSchema.put( dITContentRule.getOid(), schema );
-        monitor.registered( dITContentRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed dITContentRule: " + dITContentRule );
+        }
     }
 
 
@@ -103,12 +94,14 @@
         if ( !byOid.containsKey( id ) )
         {
             NamingException e = new NamingException( "dITContentRule w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
         DITContentRule dITContentRule = ( DITContentRule ) byOid.get( id );
-        monitor.lookedUp( dITContentRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "lookup with id '" + id + "' of dITContentRule: " + dITContentRule );
+        }
         return dITContentRule;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,10 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.DITStructureRuleRegistry;
-import org.apache.directory.server.core.schema.DITStructureRuleRegistryMonitor;
-import org.apache.directory.server.core.schema.DITStructureRuleRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,20 +38,21 @@
  */
 public class BootstrapDitStructureRuleRegistry implements DITStructureRuleRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapDitStructureRuleRegistry.class );
     /** maps an OID to an DITStructureRule */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private DITStructureRuleRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
+    
     /**
      * Creates an empty BootstrapDitStructureRuleRegistry.
      */
@@ -59,22 +60,10 @@
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
-        this.monitor = new DITStructureRuleRegistryMonitorAdapter();
         this.oidRegistry = oidRegistry;
     }
 
 
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( DITStructureRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
@@ -85,14 +74,16 @@
         {
             NamingException e = new NamingException( "dITStructureRule w/ OID " + dITStructureRule.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( dITStructureRule, e );
             throw e;
         }
 
         oidToSchema.put( dITStructureRule.getOid(), schema );
         oidRegistry.register( dITStructureRule.getName(), dITStructureRule.getOid() );
         byOid.put( dITStructureRule.getOid(), dITStructureRule );
-        monitor.registered( dITStructureRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered dITStructureRule: " + dITStructureRule );
+        }
     }
 
 
@@ -103,12 +94,14 @@
         if ( !byOid.containsKey( id ) )
         {
             NamingException e = new NamingException( "dITStructureRule w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
         DITStructureRule dITStructureRule = ( DITStructureRule ) byOid.get( id );
-        monitor.lookedUp( dITStructureRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "lookup with id '" + id + "' for dITStructureRule: " + dITStructureRule );
+        }
         return dITStructureRule;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,11 +24,12 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.MatchingRuleRegistry;
-import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitor;
-import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A MatchingRuleRegistry service used to lookup matching rules by OID.
@@ -38,20 +39,21 @@
  */
 public class BootstrapMatchingRuleRegistry implements MatchingRuleRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapMatchingRuleRegistry.class );
     /** a map using an OID for the key and a MatchingRule for the value */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** a monitor used to track noteable registry events */
-    private MatchingRuleRegistryMonitor monitor = null;
 
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
+    
     /**
      * Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees
      * for lookups.
@@ -62,7 +64,6 @@
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
         this.byOid = new HashMap();
-        this.monitor = new MatchingRuleRegistryMonitorAdapter();
     }
 
 
@@ -79,13 +80,15 @@
 
         if ( byOid.containsKey( id ) )
         {
-            MatchingRule MatchingRule = ( MatchingRule ) byOid.get( id );
-            monitor.lookedUp( MatchingRule );
-            return MatchingRule;
+            MatchingRule matchingRule = ( MatchingRule ) byOid.get( id );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "lookup with id '"+id+"' of matchingRule: " + matchingRule );
+            }
+            return matchingRule;
         }
 
         NamingException fault = new NamingException( "Unknown MatchingRule OID " + id );
-        monitor.lookupFailed( id, fault );
         throw fault;
     }
 
@@ -99,7 +102,6 @@
         {
             NamingException e = new NamingException( "matchingRule w/ OID " + matchingRule.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( matchingRule, e );
             throw e;
         }
 
@@ -112,7 +114,10 @@
         }
 
         byOid.put( matchingRule.getOid(), matchingRule );
-        monitor.registered( matchingRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed matchingRule: " + matchingRule);
+        }
     }
 
 
@@ -146,32 +151,6 @@
         }
 
         throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
-    }
-
-
-    // ------------------------------------------------------------------------
-    // package friendly monitor methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * Gets the monitor for this registry.
-     * 
-     * @return the monitor
-     */
-    MatchingRuleRegistryMonitor getMonitor()
-    {
-        return monitor;
-    }
-
-
-    /**
-     * Sets the monitor for this registry.
-     * 
-     * @param monitor the monitor to set
-     */
-    void setMonitor( MatchingRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,11 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.MatchingRuleUseRegistry;
-import org.apache.directory.server.core.schema.MatchingRuleUseRegistryMonitor;
-import org.apache.directory.server.core.schema.MatchingRuleUseRegistryMonitorAdapter;
 import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A plain old java object implementation of an MatchingRuleUseRegistry.
@@ -37,18 +38,19 @@
  */
 public class BootstrapMatchingRuleUseRegistry implements MatchingRuleUseRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapMatchingRuleUseRegistry.class );
     /** maps a name to an MatchingRuleUse */
     private final Map byName;
     /** maps a MatchingRuleUse name to a schema name*/
     private final Map nameToSchema;
-    /** monitor notified via callback events */
-    private MatchingRuleUseRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
+    
     /**
      * Creates an empty BootstrapMatchingRuleUseRegistry.
      */
@@ -56,18 +58,6 @@
     {
         this.byName = new HashMap();
         this.nameToSchema = new HashMap();
-        this.monitor = new MatchingRuleUseRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( MatchingRuleUseRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -75,19 +65,22 @@
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, MatchingRuleUse matchingRuleUse ) throws NamingException
     {
         if ( byName.containsKey( matchingRuleUse.getName() ) )
         {
             NamingException e = new NamingException( "matchingRuleUse w/ name " + matchingRuleUse.getName()
                 + " has already been registered!" );
-            monitor.registerFailed( matchingRuleUse, e );
             throw e;
         }
 
         nameToSchema.put( matchingRuleUse.getName(), schema );
         byName.put( matchingRuleUse.getName(), matchingRuleUse );
-        monitor.registered( matchingRuleUse );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed matchingRuleUse: " + matchingRuleUse );
+        }
     }
 
 
@@ -96,12 +89,14 @@
         if ( !byName.containsKey( name ) )
         {
             NamingException e = new NamingException( "matchingRuleUse w/ name " + name + " not registered!" );
-            monitor.lookupFailed( name, e );
             throw e;
         }
 
         MatchingRuleUse matchingRuleUse = ( MatchingRuleUse ) byName.get( name );
-        monitor.lookedUp( matchingRuleUse );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "lookup with name '"+ name + "' of matchingRuleUse: " + matchingRuleUse );
+        }
         return matchingRuleUse;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,10 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.NameFormRegistry;
-import org.apache.directory.server.core.schema.NameFormRegistryMonitor;
-import org.apache.directory.server.core.schema.NameFormRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.NameForm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,14 +38,14 @@
  */
 public class BootstrapNameFormRegistry implements NameFormRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapNameFormRegistry.class );
     /** maps an OID to an NameForm */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private NameFormRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -60,18 +60,6 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new NameFormRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( NameFormRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -85,14 +73,16 @@
         {
             NamingException e = new NamingException( "nameForm w/ OID " + nameForm.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( nameForm, e );
             throw e;
         }
 
         oidToSchema.put( nameForm.getOid(), schema );
         oidRegistry.register( nameForm.getName(), nameForm.getOid() );
         byOid.put( nameForm.getOid(), nameForm );
-        monitor.registered( nameForm );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered nameForm: " + nameForm );
+        }
     }
 
 
@@ -103,12 +93,14 @@
         if ( !byOid.containsKey( id ) )
         {
             NamingException e = new NamingException( "nameForm w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
         NameForm nameForm = ( NameForm ) byOid.get( id );
-        monitor.lookedUp( nameForm );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "lookup with id '"+ id + "' of nameForm: " + nameForm );
+        }
         return nameForm;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java Wed Mar  8 13:29:28 2006
@@ -23,9 +23,9 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.NormalizerRegistry;
-import org.apache.directory.server.core.schema.NormalizerRegistryMonitor;
-import org.apache.directory.server.core.schema.NormalizerRegistryMonitorAdapter;
 import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,12 +36,12 @@
  */
 public class BootstrapNormalizerRegistry implements NormalizerRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapNormalizerRegistry.class );
     /** a map of Normalizers looked up by OID */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
-    /** the monitor used to deliver callback notification events */
-    private NormalizerRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -55,18 +55,6 @@
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
-        this.monitor = new NormalizerRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor used to deliver notification events to via callbacks.
-     *
-     * @param monitor the monitor to recieve callback events
-     */
-    public void setMonitor( NormalizerRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -74,18 +62,21 @@
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, String oid, Normalizer normalizer ) throws NamingException
     {
         if ( byOid.containsKey( oid ) )
         {
             NamingException e = new NamingException( "Normalizer already " + "registered for OID " + oid );
-            monitor.registerFailed( oid, normalizer, e );
             throw e;
         }
 
         oidToSchema.put( oid, schema );
         byOid.put( oid, normalizer );
-        monitor.registered( oid, normalizer );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered normalizer with oid: " + oid );
+        }
     }
 
 
@@ -94,12 +85,14 @@
         if ( !byOid.containsKey( oid ) )
         {
             NamingException e = new NamingException( "Normalizer for OID " + oid + " does not exist!" );
-            monitor.lookupFailed( oid, e );
             throw e;
         }
 
         Normalizer normalizer = ( Normalizer ) byOid.get( oid );
-        monitor.lookedUp( oid, normalizer );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered normalizer with oid: " + oid );
+        }
         return normalizer;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java Wed Mar  8 13:29:28 2006
@@ -24,10 +24,10 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.ObjectClassRegistry;
-import org.apache.directory.server.core.schema.ObjectClassRegistryMonitor;
-import org.apache.directory.server.core.schema.ObjectClassRegistryMonitorAdapter;
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,14 +38,14 @@
  */
 public class BootstrapObjectClassRegistry implements ObjectClassRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapObjectClassRegistry.class );
     /** maps an OID to an ObjectClass */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private ObjectClassRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -60,39 +60,30 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new ObjectClassRegistryMonitorAdapter();
     }
 
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( ObjectClassRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
+    
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, ObjectClass objectClass ) throws NamingException
     {
         if ( byOid.containsKey( objectClass.getOid() ) )
         {
             NamingException e = new NamingException( "objectClass w/ OID " + objectClass.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( objectClass, e );
             throw e;
         }
 
         oidRegistry.register( objectClass.getName(), objectClass.getOid() );
         byOid.put( objectClass.getOid(), objectClass );
         oidToSchema.put( objectClass.getOid(), schema );
-        monitor.registered( objectClass );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered objectClass: " + objectClass );
+        }
     }
 
 
@@ -103,12 +94,14 @@
         if ( !byOid.containsKey( id ) )
         {
             NamingException e = new NamingException( "objectClass w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
         ObjectClass objectClass = ( ObjectClass ) byOid.get( id );
-        monitor.lookedUp( objectClass );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "looked objectClass with OID '" + id + "' and got back " + objectClass );
+        }
         return objectClass;
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java Wed Mar  8 13:29:28 2006
@@ -27,8 +27,8 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.server.core.schema.OidRegistryMonitor;
-import org.apache.directory.server.core.schema.OidRegistryMonitorAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -40,15 +40,13 @@
  */
 public class BootstrapOidRegistry implements OidRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapOidRegistry.class );
     /** Maps OID to a name or a list of names if more than one name exists */
     private Map byOid = new HashMap();
-
     /** Maps several names to an OID */
     private Map byName = new HashMap();
 
-    /** Default OidRegistryMonitor */
-    private OidRegistryMonitor monitor = new OidRegistryMonitorAdapter();
-
 
     /**
      * @see org.apache.directory.server.core.schema.OidRegistry#getOid(java.lang.String)
@@ -65,7 +63,10 @@
          */
         if ( Character.isDigit( name.charAt( 0 ) ) )
         {
-            monitor.getOidWithOid( name );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up OID with OID: " + name );
+            }
             return name;
         }
 
@@ -73,7 +74,10 @@
         if ( byName.containsKey( name ) )
         {
             String oid = ( String ) byName.get( name );
-            monitor.oidResolved( name, oid );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up OID '" + oid + "' with id '" + name + "'" );
+            }
             return oid;
         }
 
@@ -88,7 +92,10 @@
         if ( !name.equals( lowerCase ) && byName.containsKey( lowerCase ) )
         {
             String oid = ( String ) byName.get( lowerCase );
-            monitor.oidResolved( name, lowerCase, oid );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up OID '" + oid + "' with id '" + name + "'" );
+            }
 
             // We expect to see this version of the key again so we add it
             byName.put( name, oid );
@@ -97,7 +104,6 @@
 
         NamingException fault = new NamingException( "OID for name '" + name + "' was not "
             + "found within the OID registry" );
-        monitor.oidResolutionFailed( name, fault );
         throw fault;
     }
 
@@ -127,18 +133,23 @@
         if ( null == value )
         {
             NamingException fault = new NamingException( "OID '" + oid + "' was not found within the OID registry" );
-            monitor.oidDoesNotExist( oid, fault );
             throw fault;
         }
 
         if ( value instanceof String )
         {
-            monitor.nameResolved( oid, ( String ) value );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up primary name '" + value + "' with OID '" + oid + "'" );
+            }
             return ( String ) value;
         }
 
         String name = ( String ) ( ( List ) value ).get( 0 );
-        monitor.nameResolved( oid, name );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "looked up primary name '" + name + "' with OID '" + oid + "'" );
+        }
         return name;
     }
 
@@ -153,18 +164,23 @@
         if ( null == value )
         {
             NamingException fault = new NamingException( "OID '" + oid + "' was not found within the OID registry" );
-            monitor.oidDoesNotExist( oid, fault );
             throw fault;
         }
 
         if ( value instanceof String )
         {
             List list = Collections.singletonList( value );
-            monitor.namesResolved( oid, list );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up names '" + list + "' for OID '" + oid + "'" );
+            }
             return list;
         }
 
-        monitor.namesResolved( oid, ( List ) value );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "looked up names '" + value + "' for OID '" + oid + "'" );
+        }
         return ( List ) value;
     }
 
@@ -275,28 +291,9 @@
         }
 
         byOid.put( oid, value );
-        monitor.registered( name, oid );
-    }
-
-
-    /**
-     * Gets the monitor.
-     * 
-     * @return the monitor
-     */
-    OidRegistryMonitor getMonitor()
-    {
-        return monitor;
-    }
-
-
-    /**
-     * Sets the monitor.
-     * 
-     * @param monitor monitor to set.
-     */
-    void setMonitor( OidRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registed name '" + name + "' with OID: " + oid );
+        }
     }
 }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java Wed Mar  8 13:29:28 2006
@@ -23,9 +23,9 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.schema.SyntaxCheckerRegistry;
-import org.apache.directory.server.core.schema.SyntaxCheckerRegistryMonitor;
-import org.apache.directory.server.core.schema.SyntaxCheckerRegistryMonitorAdapter;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,12 +36,12 @@
  */
 public class BootstrapSyntaxCheckerRegistry implements SyntaxCheckerRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapSyntaxCheckerRegistry.class );
     /** a map by OID of SyntaxCheckers */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
-    /** the monitor to use for callback event notifications */
-    private SyntaxCheckerRegistryMonitor monitor;
 
 
     // ------------------------------------------------------------------------
@@ -55,18 +55,6 @@
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
-        this.monitor = new SyntaxCheckerRegistryMonitorAdapter();
-    }
-
-
-    /**
-     * Sets the monitor used to deliver notification events to via callbacks.
-     *
-     * @param monitor the monitor to recieve callback events
-     */
-    public void setMonitor( SyntaxCheckerRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 
@@ -74,18 +62,21 @@
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, String oid, SyntaxChecker syntaxChecker ) throws NamingException
     {
         if ( byOid.containsKey( oid ) )
         {
             NamingException e = new NamingException( "SyntaxChecker with OID " + oid + " already registered!" );
-            monitor.registerFailed( oid, syntaxChecker, e );
             throw e;
         }
 
         byOid.put( oid, syntaxChecker );
         oidToSchema.put( oid, schema );
-        monitor.registered( oid, syntaxChecker );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered syntaxChecher for OID " + oid );
+        }
     }
 
 
@@ -94,13 +85,15 @@
         if ( !byOid.containsKey( oid ) )
         {
             NamingException e = new NamingException( "SyntaxChecker for OID " + oid + " not found!" );
-            monitor.lookupFailed( oid, e );
             throw e;
         }
 
         SyntaxChecker syntaxChecker = ( SyntaxChecker ) byOid.get( oid );
-        monitor.lookedUp( oid, syntaxChecker );
-        return null;
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "looked up syntaxChecher with OID " + oid );
+        }
+        return syntaxChecker;
     }
 
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java?rev=384335&r1=384334&r2=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java Wed Mar  8 13:29:28 2006
@@ -25,9 +25,9 @@
 
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.schema.SyntaxRegistry;
-import org.apache.directory.server.core.schema.SyntaxRegistryMonitor;
-import org.apache.directory.server.core.schema.SyntaxRegistryMonitorAdapter;
 import org.apache.directory.shared.ldap.schema.Syntax;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -39,14 +39,14 @@
  */
 public class BootstrapSyntaxRegistry implements SyntaxRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( BootstrapSyntaxRegistry.class );
     /** a map of entries using an OID for the key and a Syntax for the value */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the OID oidRegistry this oidRegistry uses to register new syntax OIDs */
     private final OidRegistry oidRegistry;
-    /** a monitor used to track noteable oidRegistry events */
-    private SyntaxRegistryMonitor monitor = null;
 
 
     // ------------------------------------------------------------------------
@@ -61,7 +61,6 @@
         this.oidRegistry = registry;
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
-        this.monitor = new SyntaxRegistryMonitorAdapter();
     }
 
 
@@ -69,9 +68,7 @@
     // SyntaxRegistry interface methods
     // ------------------------------------------------------------------------
 
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#lookup(java.lang.String)
-     */
+    
     public Syntax lookup( String id ) throws NamingException
     {
         id = oidRegistry.getOid( id );
@@ -79,39 +76,37 @@
         if ( byOid.containsKey( id ) )
         {
             Syntax syntax = ( Syntax ) byOid.get( id );
-            monitor.lookedUp( syntax );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up using id '" + id + "': " + syntax );
+            }
             return syntax;
         }
 
         NamingException fault = new NamingException( "Unknown syntax OID " + id );
-        monitor.lookupFailed( id, fault );
         throw fault;
     }
 
 
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#register(String,Syntax)
-     */
     public void register( String schema, Syntax syntax ) throws NamingException
     {
         if ( byOid.containsKey( syntax.getOid() ) )
         {
             NamingException e = new NamingException( "syntax w/ OID " + syntax.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( syntax, e );
             throw e;
         }
 
         oidRegistry.register( syntax.getName(), syntax.getOid() );
         byOid.put( syntax.getOid(), syntax );
         oidToSchema.put( syntax.getOid(), schema );
-        monitor.registered( syntax );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered syntax: " + syntax );
+        }
     }
 
 
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#hasSyntax(java.lang.String)
-     */
     public boolean hasSyntax( String id )
     {
         if ( oidRegistry.hasOid( id ) )
@@ -139,32 +134,6 @@
         }
 
         throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
-    }
-
-
-    // ------------------------------------------------------------------------
-    // package friendly monitor methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * Gets the monitor for this oidRegistry.
-     * 
-     * @return the monitor
-     */
-    SyntaxRegistryMonitor getMonitor()
-    {
-        return monitor;
-    }
-
-
-    /**
-     * Sets the monitor for this oidRegistry.
-     * 
-     * @param monitor the monitor to set
-     */
-    void setMonitor( SyntaxRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
     }
 
 

Copied: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java (from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java?p2=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java&p1=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java&r1=384102&r2=384335&rev=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java Wed Mar  8 13:29:28 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.schema;
+package org.apache.directory.server.core.schema.global;
 
 
 import java.util.HashMap;
@@ -23,9 +23,13 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapAttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.JoinIterator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,14 +40,14 @@
  */
 public class GlobalAttributeTypeRegistry implements AttributeTypeRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( GlobalAttributeTypeRegistry.class );
     /** maps an OID to an AttributeType */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private AttributeTypeRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapAttributeTypeRegistry bootstrap;
 
@@ -63,8 +67,6 @@
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
-        this.monitor = new AttributeTypeRegistryMonitorAdapter();
-
         this.oidRegistry = oidRegistry;
         if ( this.oidRegistry == null )
         {
@@ -79,28 +81,17 @@
     }
 
 
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( AttributeTypeRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, AttributeType attributeType ) throws NamingException
     {
         if ( byOid.containsKey( attributeType.getOid() ) || bootstrap.hasAttributeType( attributeType.getOid() ) )
         {
             NamingException e = new NamingException( "attributeType w/ OID " + attributeType.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( attributeType, e );
             throw e;
         }
 
@@ -112,7 +103,10 @@
 
         oidToSchema.put( attributeType.getOid(), schema );
         byOid.put( attributeType.getOid(), attributeType );
-        monitor.registered( attributeType );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered attributeType: " + attributeType );
+        }
     }
 
 
@@ -123,7 +117,6 @@
         if ( !( byOid.containsKey( id ) || bootstrap.hasAttributeType( id ) ) )
         {
             NamingException e = new NamingException( "attributeType w/ OID " + id + " not registered!" );
-            monitor.lookupFailed( id, e );
             throw e;
         }
 
@@ -134,7 +127,10 @@
             attributeType = bootstrap.lookup( id );
         }
 
-        monitor.lookedUp( attributeType );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "looked up attributeType " + attributeType + " with id '" + id + "'" );
+        }
         return attributeType;
     }
 

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalAttributeTypeRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Wed Mar  8 13:29:28 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Copied: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java (from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalComparatorRegistry.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java?p2=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java&p1=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalComparatorRegistry.java&r1=384102&r2=384335&rev=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalComparatorRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java Wed Mar  8 13:29:28 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.schema;
+package org.apache.directory.server.core.schema.global;
 
 
 import java.util.Comparator;
@@ -23,7 +23,11 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.schema.ComparatorRegistry;
+import org.apache.directory.server.core.schema.SerializableComparator;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapComparatorRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -34,12 +38,12 @@
  */
 public class GlobalComparatorRegistry implements ComparatorRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( GlobalComparatorRegistry.class );
     /** the comparators in this registry */
     private final Map comparators;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
-    /** the monitor for delivering callback events */
-    private ComparatorRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapComparatorRegistry bootstrap;
 
@@ -52,15 +56,12 @@
      * Creates a default ComparatorRegistry by initializing the map and the
      * montior.
      */
-    public GlobalComparatorRegistry(BootstrapComparatorRegistry bootstrap)
+    public GlobalComparatorRegistry( BootstrapComparatorRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();
         this.comparators = new HashMap();
-        this.monitor = new ComparatorRegistryMonitorAdapter();
-
         // override bootstrap registry used by serializable comparators
         SerializableComparator.setRegistry( this );
-
         this.bootstrap = bootstrap;
         if ( this.bootstrap == null )
         {
@@ -69,33 +70,25 @@
     }
 
 
-    /**
-     * Sets the monitor used by this registry.
-     *
-     * @param monitor the monitor to set for registry event callbacks
-     */
-    public void setMonitor( ComparatorRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, String oid, Comparator comparator ) throws NamingException
     {
         if ( comparators.containsKey( oid ) || bootstrap.hasComparator( oid ) )
         {
             NamingException e = new NamingException( "Comparator with OID " + oid + " already registered!" );
-            monitor.registerFailed( oid, comparator, e );
             throw e;
         }
 
         oidToSchema.put( oid, schema );
         comparators.put( oid, comparator );
-        monitor.registered( oid, comparator );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered comparator with OID '" + oid + "':" + comparator );
+        }
     }
 
 
@@ -107,19 +100,24 @@
         if ( comparators.containsKey( oid ) )
         {
             c = ( Comparator ) comparators.get( oid );
-            monitor.lookedUp( oid, c );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up comparator with OID '" + oid + "':" + c );
+            }
             return c;
         }
 
         if ( bootstrap.hasComparator( oid ) )
         {
             c = bootstrap.lookup( oid );
-            monitor.lookedUp( oid, c );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up comparator with OID '" + oid + "':" + c );
+            }
             return c;
         }
 
         e = new NamingException( "Comparator not found for OID: " + oid );
-        monitor.lookupFailed( oid, e );
         throw e;
     }
 

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalComparatorRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Wed Mar  8 13:29:28 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Copied: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java (from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitContentRuleRegistry.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java?p2=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java&p1=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitContentRuleRegistry.java&r1=384102&r2=384335&rev=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitContentRuleRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java Wed Mar  8 13:29:28 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.schema;
+package org.apache.directory.server.core.schema.global;
 
 
 import java.util.HashMap;
@@ -23,9 +23,13 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.schema.DITContentRuleRegistry;
+import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapDitContentRuleRegistry;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 import org.apache.directory.shared.ldap.util.JoinIterator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,14 +40,14 @@
  */
 public class GlobalDitContentRuleRegistry implements DITContentRuleRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( GlobalDitContentRuleRegistry.class );
     /** maps an OID to an DITContentRule */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private DITContentRuleRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitContentRuleRegistry bootstrap;
 
@@ -60,8 +64,6 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new DITContentRuleRegistryMonitorAdapter();
-
         this.bootstrap = bootstrap;
         if ( this.bootstrap == null )
         {
@@ -70,35 +72,27 @@
     }
 
 
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( DITContentRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, DITContentRule dITContentRule ) throws NamingException
     {
         if ( byOid.containsKey( dITContentRule.getOid() ) || bootstrap.hasDITContentRule( dITContentRule.getOid() ) )
         {
             NamingException e = new NamingException( "dITContentRule w/ OID " + dITContentRule.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( dITContentRule, e );
             throw e;
         }
 
         oidRegistry.register( dITContentRule.getName(), dITContentRule.getOid() );
         byOid.put( dITContentRule.getOid(), dITContentRule );
         oidToSchema.put( dITContentRule.getOid(), schema );
-        monitor.registered( dITContentRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered dITContentRule: " + dITContentRule );
+        }
     }
 
 
@@ -109,19 +103,24 @@
         if ( byOid.containsKey( id ) )
         {
             DITContentRule dITContentRule = ( DITContentRule ) byOid.get( id );
-            monitor.lookedUp( dITContentRule );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up dITContentRule: " + dITContentRule );
+            }
             return dITContentRule;
         }
 
         if ( bootstrap.hasDITContentRule( id ) )
         {
             DITContentRule dITContentRule = bootstrap.lookup( id );
-            monitor.lookedUp( dITContentRule );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up dITContentRule: " + dITContentRule );
+            }
             return dITContentRule;
         }
 
         NamingException e = new NamingException( "dITContentRule w/ OID " + id + " not registered!" );
-        monitor.lookupFailed( id, e );
         throw e;
     }
 

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitContentRuleRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Wed Mar  8 13:29:28 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Copied: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java (from r384102, directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitStructureRuleRegistry.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java?p2=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java&p1=directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitStructureRuleRegistry.java&r1=384102&r2=384335&rev=384335&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/GlobalDitStructureRuleRegistry.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java Wed Mar  8 13:29:28 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.schema;
+package org.apache.directory.server.core.schema.global;
 
 
 import java.util.HashMap;
@@ -23,9 +23,13 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.schema.DITStructureRuleRegistry;
+import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.schema.bootstrap.BootstrapDitStructureRuleRegistry;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 import org.apache.directory.shared.ldap.util.JoinIterator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,14 +40,14 @@
  */
 public class GlobalDitStructureRuleRegistry implements DITStructureRuleRegistry
 {
+    /** static class logger */
+    private final static Logger log = LoggerFactory.getLogger( GlobalDitStructureRuleRegistry.class );
     /** maps an OID to an DITStructureRule */
     private final Map byOid;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private DITStructureRuleRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitStructureRuleRegistry bootstrap;
 
@@ -55,13 +59,11 @@
     /**
      * Creates an empty BootstrapDitStructureRuleRegistry.
      */
-    public GlobalDitStructureRuleRegistry(BootstrapDitStructureRuleRegistry bootstrap, OidRegistry oidRegistry)
+    public GlobalDitStructureRuleRegistry( BootstrapDitStructureRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new DITStructureRuleRegistryMonitorAdapter();
-
         this.bootstrap = bootstrap;
         if ( this.bootstrap == null )
         {
@@ -70,21 +72,11 @@
     }
 
 
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( DITStructureRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
 
+    
     public void register( String schema, DITStructureRule dITStructureRule ) throws NamingException
     {
         if ( byOid.containsKey( dITStructureRule.getOid() )
@@ -92,14 +84,16 @@
         {
             NamingException e = new NamingException( "dITStructureRule w/ OID " + dITStructureRule.getOid()
                 + " has already been registered!" );
-            monitor.registerFailed( dITStructureRule, e );
             throw e;
         }
 
         oidRegistry.register( dITStructureRule.getName(), dITStructureRule.getOid() );
         byOid.put( dITStructureRule.getOid(), dITStructureRule );
         oidToSchema.put( dITStructureRule.getOid(), schema );
-        monitor.registered( dITStructureRule );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "registered dITStructureRule: " + dITStructureRule );
+        }
     }
 
 
@@ -110,19 +104,24 @@
         if ( byOid.containsKey( id ) )
         {
             DITStructureRule dITStructureRule = ( DITStructureRule ) byOid.get( id );
-            monitor.lookedUp( dITStructureRule );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up dITStructureRule: " + dITStructureRule );
+            }
             return dITStructureRule;
         }
 
         if ( bootstrap.hasDITStructureRule( id ) )
         {
             DITStructureRule dITStructureRule = bootstrap.lookup( id );
-            monitor.lookedUp( dITStructureRule );
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "looked up dITStructureRule: " + dITStructureRule );
+            }
             return dITStructureRule;
         }
 
         NamingException e = new NamingException( "dITStructureRule w/ OID " + id + " not registered!" );
-        monitor.lookupFailed( id, e );
         throw e;
     }
 

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/global/GlobalDitStructureRuleRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Wed Mar  8 13:29:28 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id



Mime
View raw message