directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r833647 [13/17] - in /directory: apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/pa...
Date Sat, 07 Nov 2009 07:57:42 GMT
Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java Sat Nov  7 07:57:34 2009
@@ -27,7 +27,7 @@
 import org.apache.directory.shared.ldap.message.MessageEncoder;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
@@ -82,10 +82,11 @@
         {
             public boolean isBinary( String id )
             {
-                AttributeTypeRegistry attrRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
+                SchemaManager schemaManager = directoryService.getSchemaManager();
+                
                 try
                 {
-                    AttributeType type = attrRegistry.lookup( id );
+                    AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
                     return ! type.getSyntax().isHumanReadable();
                 }
                 catch ( Exception e )

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java Sat Nov  7 07:57:34 2009
@@ -26,7 +26,6 @@
 import org.apache.directory.shared.ldap.message.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,11 +76,11 @@
         {
             LdapDN newRdn = new LdapDN( req.getNewRdn().toString() );
             newRdn.normalize( session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+                .getSchemaManager().getNormalizerMapping() );
             
             LdapDN oldRdn = new LdapDN( req.getName().getRdn().toString() );
             oldRdn.normalize( session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+                .getSchemaManager().getNormalizerMapping() );
             
             boolean rdnChanged = req.getNewRdn() != null && 
                 ! newRdn.getNormName().equals( oldRdn.getNormName() );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java Sat Nov  7 07:57:34 2009
@@ -33,15 +33,14 @@
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.InternalReferral;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.InternalResultResponseRequest;
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.ManageDsaITControl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.LdapURL;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -222,8 +221,8 @@
             }
             
             LdapDN urlDn = new LdapDN( ldapUrl.getDn().getUpName() );
-            urlDn.normalize( session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().getNormalizerMapping() ); 
+            urlDn.normalize( session.getCoreSession().getDirectoryService().getSchemaManager()
+                .getNormalizerMapping() ); 
             
             if ( urlDn.getNormName().equals( referralAncestor.getDn().getNormName() ) )
             {
@@ -322,8 +321,8 @@
             
             // Normalize the DN to check for same dn
             LdapDN urlDn = new LdapDN( ldapUrl.getDn().getUpName() );
-            urlDn.normalize( session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().getNormalizerMapping() ); 
+            urlDn.normalize( session.getCoreSession().getDirectoryService().getSchemaManager()
+                .getNormalizerMapping() ); 
             
             if ( urlDn.getNormName().equals( req.getBase().getNormName() ) )
             {

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Sat Nov  7 07:57:34 2009
@@ -20,8 +20,16 @@
 package org.apache.directory.server.ldap.handlers;
 
 
+import static java.lang.Math.min;
+import static org.apache.directory.server.ldap.LdapServer.NO_SIZE_LIMIT;
+import static org.apache.directory.server.ldap.LdapServer.NO_TIME_LIMIT;
+
 import java.util.concurrent.TimeUnit;
 
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import javax.naming.ldap.PagedResultsControl;
+
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.ReferralManager;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -40,17 +48,17 @@
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.message.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.InternalResponse;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.InternalReferral;
+import org.apache.directory.shared.ldap.message.InternalResponse;
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseDone;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseEntry;
-import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseReference;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
 import org.apache.directory.shared.ldap.message.control.ManageDsaITControl;
 import org.apache.directory.shared.ldap.message.control.PagedSearchControl;
@@ -62,15 +70,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.directory.server.ldap.LdapServer.NO_SIZE_LIMIT;
-import static org.apache.directory.server.ldap.LdapServer.NO_TIME_LIMIT;
-
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-import javax.naming.ldap.PagedResultsControl;
-
-import static java.lang.Math.min;
-
 
 /**
  * A handler for processing search requests.
@@ -101,8 +100,8 @@
     {
         if ( objectClassAttributeType == null )
         {
-            objectClassAttributeType = session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+            objectClassAttributeType = session.getCoreSession().getDirectoryService().
+                getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         }
         
         EqualityNode<String> ocIsReferral = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
@@ -884,7 +883,7 @@
             PresenceNode presenceNode = ( PresenceNode ) req.getFilter();
             
             AttributeType at = session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().lookup( presenceNode.getAttribute() );
+                .getSchemaManager().lookupAttributeTypeRegistry( presenceNode.getAttribute() );
             if ( at.getOid().equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
             {
                 return;
@@ -1015,7 +1014,8 @@
         boolean isparentReferral = false;
         ReferralManager referralManager = session.getCoreSession().getDirectoryService().getReferralManager();
         
-        reqTargetDn.normalize( session.getCoreSession().getDirectoryService().getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        reqTargetDn.normalize( session.getCoreSession().getDirectoryService().
+            getSchemaManager().getNormalizerMapping() );
         
         // Check if the entry itself is a referral
         referralManager.lockRead();
@@ -1251,7 +1251,7 @@
         PartitionNexus nexus = ds.getPartitionNexus();
         Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
         LdapDN subschemaSubentryDn = new LdapDN( subschemaSubentry.getString() );
-        subschemaSubentryDn.normalize( ds.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        subschemaSubentryDn.normalize( ds.getSchemaManager().getNormalizerMapping() );
         String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
         
         return subschemaSubentryDnNorm.equals( baseNormForm );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java Sat Nov  7 07:57:34 2009
@@ -23,6 +23,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.naming.Context;
+import javax.security.sasl.AuthorizeCallback;
+
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -41,13 +44,9 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Context;
-import javax.security.sasl.AuthorizeCallback;
-
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -83,7 +82,7 @@
             ExprNode filter = FilterParser.parse( "(uid=" + username + ")" );
             Set<AttributeTypeOptions> returningAttributes = new HashSet<AttributeTypeOptions>();
             
-            AttributeType passwordAT = adminSession.getDirectoryService().getRegistries().getAttributeTypeRegistry().lookup( SchemaConstants.USER_PASSWORD_AT );
+            AttributeType passwordAT = adminSession.getDirectoryService().getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT );
             returningAttributes.add( new AttributeTypeOptions( passwordAT) );
             bindDn = (String)ldapSession.getSaslProperty( SaslConstants.SASL_USER_BASE_DN );
             

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java Sat Nov  7 07:57:34 2009
@@ -23,6 +23,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.naming.Context;
+import javax.security.sasl.AuthorizeCallback;
+
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -44,9 +47,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Context;
-import javax.security.sasl.AuthorizeCallback;
-
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -83,7 +83,7 @@
             ExprNode filter = FilterParser.parse( "(uid=" + username + ")" );
             Set<AttributeTypeOptions> returningAttributes = new HashSet<AttributeTypeOptions>();
             
-            AttributeType passwordAT = adminSession.getDirectoryService().getRegistries().getAttributeTypeRegistry().lookup( SchemaConstants.USER_PASSWORD_AT );
+            AttributeType passwordAT = adminSession.getDirectoryService().getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT );
             returningAttributes.add( new AttributeTypeOptions( passwordAT) );
             bindDn = (String)ldapSession.getSaslProperty( SaslConstants.SASL_USER_BASE_DN );
             

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java Sat Nov  7 07:57:34 2009
@@ -20,6 +20,10 @@
 package org.apache.directory.server.ldap.handlers.bind.ntlm;
 
 
+import javax.naming.Context;
+import javax.naming.InvalidNameException;
+import javax.security.sasl.SaslException;
+
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -32,10 +36,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
-import javax.naming.Context;
-import javax.naming.InvalidNameException;
-import javax.security.sasl.SaslException;
-
 
 /**
  * A SaslServer implementation for NTLM based SASL mechanism.  This is
@@ -157,7 +157,7 @@
                 {
                     result = provider.authenticate( getLdapSession().getIoSession(), response );
                     LdapDN dn = getBindRequest().getName();
-                    dn.normalize( getLdapSession().getLdapServer().getDirectoryService().getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+                    dn.normalize( getLdapSession().getLdapServer().getDirectoryService().getSchemaManager().getNormalizerMapping() );
                     LdapPrincipal ldapPrincipal = new LdapPrincipal( dn, AuthenticationLevel.STRONG ); 
                     getLdapSession().putSaslProperty( SaslConstants.SASL_AUTHENT_USER, ldapPrincipal );
                     getLdapSession().putSaslProperty( Context.SECURITY_PRINCIPAL, getBindRequest().getName().toString() );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java Sat Nov  7 07:57:34 2009
@@ -30,7 +30,7 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 /**
@@ -113,7 +113,7 @@
      * Build a set of OIDs from the list of attributes we have in the search request
      */
     private Set<String> buildAttributeSet( InternalSearchRequest request, LdapSession session, 
-        AttributeTypeRegistry atRegistry )
+        SchemaManager schemaManager )
     {
         Set<String> requestSet = new HashSet<String>();
         
@@ -122,7 +122,7 @@
         {
             try
             {
-                AttributeType at = atRegistry.lookup( attribute );
+                AttributeType at = schemaManager.lookupAttributeTypeRegistry( attribute );
                 requestSet.add( at.getOid() );
             }
             catch ( NamingException ne )
@@ -181,8 +181,8 @@
             return false;
         }
         
-        AttributeTypeRegistry atRegistry = 
-            session.getLdapServer().getDirectoryService().getRegistries().getAttributeTypeRegistry();
+        SchemaManager schemaManager = 
+            session.getLdapServer().getDirectoryService().getSchemaManager();
 
         // Compares the attributes
         if ( request.getAttributes() == null )
@@ -207,8 +207,8 @@
                 }
                 
                 // Build the set of attributeType from both requests
-                Set<String> requestSet = buildAttributeSet( request, session, atRegistry );
-                Set<String> previousRequestSet = buildAttributeSet( previousSearchRequest, session, atRegistry );
+                Set<String> requestSet = buildAttributeSet( request, session, schemaManager );
+                Set<String> previousRequestSet = buildAttributeSet( previousSearchRequest, session, schemaManager );
                 
                 // Check that both sets have the same size again after having converted
                 // the attributes to OID
@@ -233,11 +233,11 @@
         // Compare the baseDN
         try
         {
-            request.getBase().normalize( atRegistry.getNormalizerMapping() );
+            request.getBase().normalize( schemaManager.getNormalizerMapping() );
             
             if ( !previousSearchRequest.getBase().isNormalized() )
             {
-                previousSearchRequest.getBase().normalize( atRegistry.getNormalizerMapping() );
+                previousSearchRequest.getBase().normalize( schemaManager.getNormalizerMapping() );
             }
             
             if ( !request.getBase().equals( previousSearchRequest.getBase() ) )

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java Sat Nov  7 07:57:34 2009
@@ -91,7 +91,7 @@
 
         PartitionNexus nexus = service.getPartitionNexus();
         LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
-        adminDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        adminDn.normalize( service.getSchemaManager().getNormalizerMapping() );
         LdapPrincipal principal = new LdapPrincipal( adminDn, AuthenticationLevel.STRONG );
         CoreSession session = service.getSession( principal );
         Set<String> suffixes = nexus.listSuffixes( new ListSuffixOperationContext( session ) );
@@ -109,7 +109,7 @@
                     BTreePartition btPartition = ( BTreePartition ) partition;
                     // TODO : If a partition does not have an initial entry associated, we wil:
                     // get a NPE : this has to be fixed.
-                    PartitionFrame frame = new PartitionFrame( btPartition, service.getRegistries() );
+                    PartitionFrame frame = new PartitionFrame( btPartition, service.getSchemaManager() );
                     Point pos = getCenteredPosition( frame );
                     pos.y = launchedWindowCount * 20 + pos.y;
                     double multiplier = getAspectRatio() * 20.0;

Modified: directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java Sat Nov  7 07:57:34 2009
@@ -203,7 +203,7 @@
                         {
                             coreSession.add( 
                                 new DefaultServerEntry( 
-                                    coreSession.getDirectoryService().getRegistries(), entry ) ); 
+                                    coreSession.getDirectoryService().getSchemaManager(), entry ) ); 
                            count++;
                             log.info( "Created {}.", rdn );
                         } 

Modified: directory/apacheds/branches/apacheds-schema/protocol-shared/src/test/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-shared/src/test/log4j.properties?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-shared/src/test/log4j.properties (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-shared/src/test/log4j.properties Sat Nov  7 07:57:34 2009
@@ -15,7 +15,7 @@
 #    limitations under the License.
 #############################################################################
 # Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=INFO, A1
+log4j.rootLogger=ERROR, A1
 
 # A1 is set to be a ConsoleAppender.
 log4j.appender.A1=org.apache.log4j.ConsoleAppender

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/main/java/org/apache/directory/server/integ/state/AbstractState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/main/java/org/apache/directory/server/integ/state/AbstractState.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/main/java/org/apache/directory/server/integ/state/AbstractState.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/main/java/org/apache/directory/server/integ/state/AbstractState.java Sat Nov  7 07:57:34 2009
@@ -226,7 +226,7 @@
                 for ( LdifEntry entry : ldifReader )
                 {
                     service.getAdminSession().add( 
-                        new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+                        new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) ); 
                     LOG.debug( "Successfully injected LDIF enry for test {}: {}", settings.getDescription(), entry );
                 }
             }
@@ -244,7 +244,7 @@
                 for ( LdifEntry entry : ldifReader )
                 {
                     service.getAdminSession().add( 
-                        new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+                        new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) ); 
                     LOG.debug( "Successfully injected LDIF enry for test {}: {}", settings.getDescription(), entry );
                 }
             }

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Sat Nov  7 07:57:34 2009
@@ -778,7 +778,7 @@
         }
         
         LdapDN userDn = new LdapDN( principalDn );
-        userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        userDn.normalize( service.getSchemaManager().getNormalizerMapping() );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
         
         if ( dn == null )

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java Sat Nov  7 07:57:34 2009
@@ -20,6 +20,15 @@
 package org.apache.directory.server.operations.search;
 
  
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.StringReader;
 import java.util.HashMap;
 import java.util.Map;
@@ -37,10 +46,6 @@
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 import org.apache.directory.server.integ.SiRunner;
-
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
@@ -48,13 +53,6 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
 
 /**
  * Tests to make sure the server is operating correctly when handling referrals.
@@ -144,7 +142,7 @@
         {
             LdifEntry entry = reader.next();
             ldapServer.getDirectoryService().getAdminSession().add( 
-                new DefaultServerEntry( ldapServer.getDirectoryService().getRegistries(), entry.getEntry() ) ); 
+                new DefaultServerEntry( ldapServer.getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
         }
     }
     

Modified: directory/apacheds/branches/apacheds-schema/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Sat Nov  7 07:57:34 2009
@@ -20,6 +20,14 @@
 package org.apache.directory.server.configuration;
 
 
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.NamingException;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
@@ -32,19 +40,11 @@
 import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-
 /**
  * Apache Directory Server top level.
  *
@@ -343,8 +343,7 @@
         LdapDN dn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN );
         
         // Must normalize the dn or - IllegalStateException!
-        AttributeTypeRegistry reg = directoryService.getRegistries().getAttributeTypeRegistry();
-        dn.normalize( reg.getNormalizerMapping() );
+        dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
         
         ensureLdifFileBase();
 

Modified: directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Sat Nov  7 07:57:34 2009
@@ -54,10 +54,7 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.schema.comparators.SerializableComparator;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.schema.DefaultSchemaManager;
@@ -72,7 +69,7 @@
  */
 public class DumpCommand extends ToolCommand
 {
-    private Registries bootstrapRegistries = new Registries();
+    private SchemaManager schemaManager;
     private Set<String> exclusions = new HashSet<String>();
     private boolean includeOperational = false;
 
@@ -83,7 +80,7 @@
     }
 
 
-    private Registries loadRegistries() throws Exception
+    private SchemaManager loadSchemaManager() throws Exception
     {
         // --------------------------------------------------------------------
         // Load the bootstrap schemas to start up the schema partition
@@ -103,11 +100,10 @@
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory ) );
         extractor.extractOrCopy();
         LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
-        SchemaManager sm = new DefaultSchemaManager( loader );
-        sm.loadAllEnabled();
-        Registries registries = sm.getRegistries();
+        schemaManager = new DefaultSchemaManager( loader );
+        schemaManager.loadAllEnabled();
         
-        List<Throwable> errors = sm.getErrors();
+        List<Throwable> errors = schemaManager.getErrors();
         
         if ( errors.size() != 0 )
         {
@@ -115,12 +111,10 @@
         }
 
         
-        sm.loadWithDeps( "collective" );
+        schemaManager.loadWithDeps( "collective" );
         
-        errors = sm.getErrors();
+        errors = schemaManager.getErrors();
         
-        SerializableComparator.setRegistry( registries.getComparatorRegistry() );
-
         if ( !errors.isEmpty() )
         {
             MultiException e = new MultiException();
@@ -132,8 +126,6 @@
             throw e;
         }
 
-        SerializableComparator.setRegistry( registries.getComparatorRegistry() );
-
         // --------------------------------------------------------------------
         // Initialize schema partition or bomb out if we cannot find it on disk
         // --------------------------------------------------------------------
@@ -154,17 +146,16 @@
         // Initialize schema subsystem and reset registries
         // --------------------------------------------------------------------
 //        PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition, registries );
-        Registries globalRegistries = new Registries();
 //        schemaLoader.loadEnabled( globalRegistries );
 //        SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );
-        return globalRegistries;
+        return schemaManager;
     }
 
 
     public void execute( CommandLine cmdline ) throws Exception
     {
         getLayout().verifyInstallation();
-        bootstrapRegistries = loadRegistries();
+        schemaManager = loadSchemaManager();
 
         includeOperational = cmdline.hasOption( 'o' );
         String[] partitions = cmdline.getOptionValues( 'p' );
@@ -175,11 +166,9 @@
         
         if ( excludedAttributes != null )
         {
-            AttributeTypeRegistry registry = bootstrapRegistries.getAttributeTypeRegistry();
-            
             for ( String attributeType:excludedAttributes)
             {
-                AttributeType type = registry.lookup( attributeType );
+                AttributeType type = schemaManager.lookupAttributeTypeRegistry( attributeType );
                 exclusions.add( type.getName() );
             }
         }
@@ -220,14 +209,14 @@
         base.disableTransactions();
         CacheRecordManager recMan = new CacheRecordManager( base, new MRU( 1000 ) );
 
-        JdbmMasterTable<ServerEntry> master = new JdbmMasterTable<ServerEntry>( recMan, bootstrapRegistries );
-        AttributeType attributeType = bootstrapRegistries.getAttributeTypeRegistry().lookup( "apacheUpdn" );
+        JdbmMasterTable<ServerEntry> master = new JdbmMasterTable<ServerEntry>( recMan, schemaManager );
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( "apacheUpdn" );
         JdbmIndex idIndex = new JdbmIndex();
         idIndex.setAttributeId( attributeType.getName() );
         idIndex.setWkDirPath( partitionDirectory );
         idIndex.setCacheSize( 1000 );
         idIndex.setNumDupLimit( 1000 );
-        idIndex.init( attributeType, partitionDirectory );
+        idIndex.init( schemaManager, attributeType, partitionDirectory );
 
         out.println( "#---------------------" );
         Cursor<Tuple<Long,ServerEntry>> list = master.cursor();
@@ -272,14 +261,13 @@
     private void filterAttributes( String dn, Attributes entry ) throws Exception
     {
         List<String> toRemove = new ArrayList<String>();
-        AttributeTypeRegistry registry = bootstrapRegistries.getAttributeTypeRegistry();
         NamingEnumeration<? extends Attribute> attrs = entry.getAll();
         
         while ( attrs.hasMore() )
         {
             Attribute attr = attrs.next();
             
-            if ( !registry.contains( attr.getID() ) )
+            if ( !schemaManager.getAttributeTypeRegistry().contains( attr.getID() ) )
             {
                 if ( !isQuietEnabled() )
                 {
@@ -289,7 +277,7 @@
                 continue;
             }
 
-            AttributeType type = registry.lookup( attr.getID() );
+            AttributeType type = schemaManager.lookupAttributeTypeRegistry( attr.getID() );
             boolean isOperational = type.getUsage() != UsageEnum.USER_APPLICATIONS;
             
             if ( exclusions.contains( attr.getID() ) || ( isOperational && ( !includeOperational ) ) )

Modified: directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java Sat Nov  7 07:57:34 2009
@@ -41,8 +41,7 @@
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.comparators.SerializableComparator;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -53,7 +52,7 @@
  */
 public class IndexCommand extends ToolCommand
 {
-    private Registries bootstrapRegistries = new Registries();
+    private SchemaManager schemaManager;
 
     private DirectoryService directoryService;
 
@@ -64,7 +63,7 @@
 
 
     @SuppressWarnings("unchecked")
-    private Registries loadRegistries() throws Exception
+    private SchemaManager loadSchemaManager() throws Exception
     {
         // --------------------------------------------------------------------
         // Load the bootstrap schemas to start up the schema partition
@@ -73,17 +72,16 @@
         directoryService.setWorkingDirectory( getInstanceLayout().getPartitionsDir() );
         directoryService.startup();
 
-        Registries globalRegistries = directoryService.getRegistries();//registries;//
-        SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );
+        SchemaManager schemaManager = directoryService.getSchemaManager();
         
-        return globalRegistries;
+        return schemaManager;
     }
 
 
     public void execute( CommandLine cmdline ) throws Exception
     {
 //        getLayout().verifyInstallation();
-        bootstrapRegistries = loadRegistries();
+        schemaManager = loadSchemaManager();
 
         String[] partitions = cmdline.getOptionValues( 'p' );
         String attribute = cmdline.getOptionValue( 'a' );
@@ -99,7 +97,7 @@
                 indexDir = new File( indexDirPath );
             }
             
-            AttributeType attrType = bootstrapRegistries.getAttributeTypeRegistry().lookup( attribute );
+            AttributeType attrType = schemaManager.lookupAttributeTypeRegistry( attribute );
             
             System.out.println( "building index for attribute type: " + attrType + ", of the partition: " + partitions[ii] );
             if( indexDir != null )
@@ -128,7 +126,7 @@
         base.disableTransactions();
         CacheRecordManager recMan = new CacheRecordManager( base, new MRU( 1000 ) );
 
-        JdbmMasterTable<ServerEntry> master = new JdbmMasterTable<ServerEntry>( recMan, bootstrapRegistries );
+        JdbmMasterTable<ServerEntry> master = new JdbmMasterTable<ServerEntry>( recMan, schemaManager );
         JdbmIndex index = new JdbmIndex();
         index.setAttributeId( attributeType.getName() );
         index.setCacheSize( JdbmIndex.DEFAULT_INDEX_CACHE_SIZE );
@@ -140,7 +138,7 @@
         }
 
         index.setWkDirPath( indexDirectory );
-        index.init( attributeType, indexDirectory );
+        index.init( schemaManager, attributeType, indexDirectory );
 
         IndexUtils.printContents( index );
         
@@ -150,7 +148,7 @@
         existenceIdx.setNumDupLimit( JdbmIndex.DEFAULT_DUPLICATE_LIMIT );
 
         existenceIdx.setWkDirPath( partitionDirectory );
-        existenceIdx.init( bootstrapRegistries.getAttributeTypeRegistry().lookup( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ), partitionDirectory );
+        existenceIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ), partitionDirectory );
 
         Cursor<Tuple<Long,ServerEntry>> list = master.cursor();
         

Modified: directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Sat Nov  7 07:57:34 2009
@@ -145,7 +145,7 @@
         for ( LdifEntry entry:ldifReader )
         {
             rootDSE.add( 
-                new DefaultServerEntry( directoryService.getRegistries(), entry.getEntry() ) ); 
+                new DefaultServerEntry( directoryService.getSchemaManager(), entry.getEntry() ) ); 
             
             if ( verifyEntries )
             {
@@ -412,7 +412,7 @@
             {
                 rootDSE.add( 
                     new DefaultServerEntry( 
-                        rootDSE.getDirectoryService().getRegistries(), ldifEntry.getEntry() ) ); 
+                        rootDSE.getDirectoryService().getSchemaManager(), ldifEntry.getEntry() ) ); 
             }
         }
         catch ( Exception e )
@@ -440,7 +440,7 @@
         {
             rootDSE.add( 
                 new DefaultServerEntry( 
-                    rootDSE.getDirectoryService().getRegistries(), entry.getEntry() ) ); 
+                    rootDSE.getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
         }
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java (original)
+++ directory/apacheds/branches/apacheds-schema/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java Sat Nov  7 07:57:34 2009
@@ -27,7 +27,6 @@
 import org.apache.directory.server.core.entry.DefaultServerAttribute;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.shared.ldap.schema.registries.Schema;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -35,15 +34,16 @@
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
 import org.apache.directory.shared.ldap.schema.NameForm;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
-import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
+import org.apache.directory.shared.ldap.schema.registries.Schema;
 import org.apache.directory.shared.ldap.util.DateUtils;
 
 
@@ -56,48 +56,48 @@
  */
 public class AttributesFactory
 {
-    public ServerEntry getAttributes( SchemaObject obj, Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( SchemaObject obj, Schema schema, SchemaManager schemaManager ) throws NamingException
     {
         if ( obj instanceof LdapSyntax )
         {
-            return getAttributes( ( LdapSyntax ) obj, schema, registries );
+            return getAttributes( ( LdapSyntax ) obj, schema, schemaManager );
         }
         else if ( obj instanceof MatchingRule )
         {
-            return getAttributes( ( MatchingRule ) obj, schema, registries );
+            return getAttributes( ( MatchingRule ) obj, schema, schemaManager );
         }
         else if ( obj instanceof AttributeType )
         {
-            return getAttributes( ( AttributeType ) obj, schema, registries );
+            return getAttributes( ( AttributeType ) obj, schema, schemaManager );
         }
         else if ( obj instanceof ObjectClass )
         {
-            return getAttributes( ( ObjectClass ) obj, schema, registries );
+            return getAttributes( ( ObjectClass ) obj, schema, schemaManager );
         }
         else if ( obj instanceof MatchingRuleUse )
         {
-            return getAttributes( ( MatchingRuleUse ) obj, schema, registries );
+            return getAttributes( ( MatchingRuleUse ) obj, schema, schemaManager );
         }
         else if ( obj instanceof DITStructureRule )
         {
-            return getAttributes( ( DITStructureRule ) obj, schema, registries );
+            return getAttributes( ( DITStructureRule ) obj, schema, schemaManager );
         }
         else if ( obj instanceof DITContentRule )
         {
-            return getAttributes( ( DITContentRule ) obj, schema, registries );
+            return getAttributes( ( DITContentRule ) obj, schema, schemaManager );
         }
         else if ( obj instanceof NameForm )
         {
-            return getAttributes( ( NameForm ) obj, schema, registries );
+            return getAttributes( ( NameForm ) obj, schema, schemaManager );
         }
         
         throw new IllegalArgumentException( "Unknown SchemaObject type: " + obj.getClass() );
     }
     
     
-    public ServerEntry getAttributes( Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( Schema schema, SchemaManager schemaManager ) throws NamingException
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SCHEMA_OC );
         entry.put( SchemaConstants.CN_AT, schema.getSchemaName() );
@@ -113,7 +113,7 @@
         
         if ( dependencies != null && dependencies.length > 0 )
         {
-            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_DEPENDENCIES_AT ) );
+            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_DEPENDENCIES_AT ) );
             
             for ( String dependency:dependencies )
             {
@@ -127,9 +127,9 @@
     }
     
     
-    public ServerEntry getAttributes( SyntaxChecker syntaxChecker, Schema schema, Registries registries )
+    public ServerEntry getAttributes( SyntaxChecker syntaxChecker, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, syntaxChecker.getOid() );
@@ -141,23 +141,23 @@
     }
 
     
-    public ServerEntry getAttributes( LdapSyntax syntax, Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( LdapSyntax syntax, Schema schema, SchemaManager schemaManager ) throws NamingException
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SYNTAX_OC );
         entry.put( MetaSchemaConstants.X_HUMAN_READABLE_AT, getBoolean( syntax.isHumanReadable() ) );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-        injectCommon( syntax, entry, registries );
+        injectCommon( syntax, entry, schemaManager );
         
         return entry;
     }
 
     
-    public ServerEntry getAttributes( String oid, Normalizer normalizer, Schema schema, Registries registries )
+    public ServerEntry getAttributes( String oid, Normalizer normalizer, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_NORMALIZER_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
@@ -168,9 +168,9 @@
     }
 
     
-    public ServerEntry getAttributes( String oid, LdapComparator<? super Object> comparator, Schema schema, Registries registries )
+    public ServerEntry getAttributes( String oid, LdapComparator<? super Object> comparator, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_COMPARATOR_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
@@ -187,22 +187,22 @@
      * @return Attributes
      * @throws NamingException
      */
-    public ServerEntry getAttributes( MatchingRule matchingRule, Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( MatchingRule matchingRule, Schema schema, SchemaManager schemaManager ) throws NamingException
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_MATCHING_RULE_OC );
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, matchingRule.getSyntax().getOid() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-        injectCommon( matchingRule, entry, registries );
+        injectCommon( matchingRule, entry, schemaManager );
         return entry;
     }
 
     
-    public ServerEntry getAttributes( MatchingRuleUse matchingRuleUse, Schema schema, Registries registries )
+    public ServerEntry getAttributes( MatchingRuleUse matchingRuleUse, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -211,9 +211,9 @@
     }
 
     
-    public ServerEntry getAttributes( DITStructureRule dITStructureRule, Schema schema, Registries registries )
+    public ServerEntry getAttributes( DITStructureRule dITStructureRule, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -222,9 +222,9 @@
     }
 
     
-    public ServerEntry getAttributes( DITContentRule dITContentRule, Schema schema, Registries registries )
+    public ServerEntry getAttributes( DITContentRule dITContentRule, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -233,9 +233,9 @@
     }
 
     
-    public ServerEntry getAttributes( NameForm nameForm, Schema schema, Registries registries )
+    public ServerEntry getAttributes( NameForm nameForm, Schema schema, SchemaManager schemaManager )
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -262,9 +262,9 @@
      * @return Attributes
      * @throws NamingException
      */
-    public ServerEntry getAttributes( AttributeType attributeType, Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( AttributeType attributeType, Schema schema, SchemaManager schemaManager ) throws NamingException
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, attributeType.getSyntax().getOid() );
@@ -275,7 +275,7 @@
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
-        injectCommon( attributeType, entry, registries );
+        injectCommon( attributeType, entry, schemaManager );
         
         AttributeType superior = attributeType.getSuperior();
         
@@ -351,21 +351,21 @@
      * @return the attributes of the metaSchema entry representing the objectClass
      * @throws NamingException if there are any problems
      */
-    public ServerEntry getAttributes( ObjectClass objectClass, Schema schema, Registries registries ) throws NamingException
+    public ServerEntry getAttributes( ObjectClass objectClass, Schema schema, SchemaManager schemaManager ) throws NamingException
     {
-        ServerEntry entry = new DefaultServerEntry( registries );
+        ServerEntry entry = new DefaultServerEntry( schemaManager );
 
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_OBJECT_CLASS_OC );
         entry.put( MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT, objectClass.getType().toString() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         
-        injectCommon( objectClass, entry, registries );
+        injectCommon( objectClass, entry, schemaManager );
 
         // handle the superior objectClasses 
         if ( objectClass.getSuperiors() != null && objectClass.getSuperiors().size() != 0 )
         {
-            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT ) );
+            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT ) );
             List<ObjectClass> superClasses = objectClass.getSuperiors();
             
             for ( ObjectClass superClass:superClasses )
@@ -379,7 +379,7 @@
         // add the must list
         if ( objectClass.getMustAttributeTypes() != null && objectClass.getMustAttributeTypes().size() != 0 )
         {
-            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_MUST_AT ) );
+            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_MUST_AT ) );
             List<AttributeType> mustList = objectClass.getMustAttributeTypes();
 
             for ( AttributeType attributeType:mustList )
@@ -393,7 +393,7 @@
         // add the may list
         if ( objectClass.getMayAttributeTypes() != null && objectClass.getMayAttributeTypes().size() != 0 )
         {
-            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_MAY_AT ) );
+            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_MAY_AT ) );
             List<AttributeType> mayList = objectClass.getMayAttributeTypes();
 
             for ( AttributeType attributeType:mayList )
@@ -420,9 +420,9 @@
     }
     
     
-    private final void injectCommon( SchemaObject object, ServerEntry entry, Registries registries ) throws NamingException
+    private final void injectCommon( SchemaObject object, ServerEntry entry, SchemaManager schemaManager ) throws NamingException
     {
-        injectNames( object.getNames(), entry, registries );
+        injectNames( object.getNames(), entry, schemaManager );
         entry.put( MetaSchemaConstants.M_OBSOLETE_AT, getBoolean( object.isObsolete() ) );
         entry.put( MetaSchemaConstants.M_OID_AT, object.getOid() );
         
@@ -433,14 +433,14 @@
     }
     
     
-    private final void injectNames( List<String> names, ServerEntry entry, Registries registries ) throws NamingException
+    private final void injectNames( List<String> names, ServerEntry entry, SchemaManager schemaManager ) throws NamingException
     {
         if ( ( names == null ) || ( names.size() == 0 ) )
         {
             return;
         }
         
-        EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_NAME_AT ) );
+        EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_NAME_AT ) );
 
         for ( String name:names )
         {

Modified: directory/apacheds/branches/apacheds-schema/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java Sat Nov  7 07:57:34 2009
@@ -20,17 +20,17 @@
 package org.apache.directory.server.xdbm;
 
 
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.Modification;
-
 import java.io.File;
-import java.util.Set;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
+
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -163,11 +163,11 @@
     /**
      * Initialize the JDBM storage system.
      *
-     * @param registries the schema registries
-     * @throws Exception on failure to lookup elements in registries
+     * @param schemaManager the schema schemaManager
+     * @throws Exception on failure to lookup elements in schemaManager
      * @throws Exception on failure to create database files
      */
-    void init( Registries registries ) throws Exception;
+    void init( SchemaManager schemaManager ) throws Exception;
 
 
     /**
@@ -519,5 +519,5 @@
     void move( LdapDN oldChildDn, LdapDN newParentDn ) throws Exception;
 
 
-    void initRegistries( Registries registries );
+    void initSchemaManager( SchemaManager schemaManager );
 }

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java Sat Nov  7 07:57:34 2009
@@ -20,22 +20,21 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
+import java.util.Iterator;
+
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.xdbm.Store;
+import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.server.xdbm.IndexEntry;
-import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.xdbm.search.Evaluator;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerAttribute;
-
-import java.util.Iterator;
-import java.util.Comparator;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -49,19 +48,19 @@
 {
     private final ApproximateNode<Object> node;
     private final Store<ServerEntry> db;
-    private final Registries registries;
+    private final SchemaManager schemaManager;
     private final AttributeType type;
     private final Normalizer normalizer;
     private final LdapComparator<? super Object> ldapComparator;
     private final Index<Object,ServerEntry> idx;
 
 
-    public ApproximateEvaluator( ApproximateNode node, Store<ServerEntry> db, Registries registries )
+    public ApproximateEvaluator( ApproximateNode node, Store<ServerEntry> db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
         this.node = node;
-        this.registries = registries;
+        this.schemaManager = schemaManager;
 
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -74,7 +73,7 @@
         else
         {
             idx = null;
-            type = registries.getAttributeTypeRegistry().lookup( node.getAttribute() );
+            type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
 
             MatchingRule mr = type.getEquality();
 
@@ -110,13 +109,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java Sat Nov  7 07:57:34 2009
@@ -35,10 +35,10 @@
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
 import org.apache.directory.shared.ldap.schema.comparators.StringComparator;
 import org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -53,7 +53,7 @@
 {
     private final EqualityNode<T> node;
     private final Store<ServerEntry> db;
-    private final Registries registries;
+    private final SchemaManager schemaManager;
     private final AttributeType type;
     private final Normalizer normalizer;
     
@@ -69,12 +69,12 @@
     private final Index<T,ServerEntry> idx;
 
 
-    public EqualityEvaluator( EqualityNode<T> node, Store<ServerEntry> db, Registries registries )
+    public EqualityEvaluator( EqualityNode<T> node, Store<ServerEntry> db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
         this.node = node;
-        this.registries = registries;
+        this.schemaManager = schemaManager;
 
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -87,7 +87,7 @@
         else
         {
             idx = null;
-            type = registries.getAttributeTypeRegistry().lookup( node.getAttribute() );
+            type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
 
             MatchingRule mr = type.getEquality();
 
@@ -145,13 +145,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java Sat Nov  7 07:57:34 2009
@@ -20,9 +20,13 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
-import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
@@ -35,11 +39,7 @@
 import org.apache.directory.shared.ldap.filter.ScopeNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.NotImplementedException;
-
-import java.util.List;
-import java.util.ArrayList;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -51,7 +51,7 @@
 public class EvaluatorBuilder
 {
     private final Store<ServerEntry> db;
-    private final Registries registries;
+    private final SchemaManager schemaManager;
 
 
     /**
@@ -62,10 +62,10 @@
      * @param registries the schema registries
      * @throws Exception failure to access db or lookup schema in registries
      */
-    public EvaluatorBuilder( Store<ServerEntry> db, Registries registries ) throws Exception
+    public EvaluatorBuilder( Store<ServerEntry> db, SchemaManager schemaManager ) throws Exception
     {
         this.db = db;
-        this.registries = registries;
+        this.schemaManager = schemaManager;
     }
 
 
@@ -76,19 +76,19 @@
             /* ---------- LEAF NODE HANDLING ---------- */
 
             case APPROXIMATE:
-                return new ApproximateEvaluator( ( ApproximateNode ) node, db, registries );
+                return new ApproximateEvaluator( ( ApproximateNode ) node, db, schemaManager );
                 
             case EQUALITY:
-                return new EqualityEvaluator( ( EqualityNode ) node, db, registries );
+                return new EqualityEvaluator( ( EqualityNode ) node, db, schemaManager );
                 
             case GREATEREQ:
-                return new GreaterEqEvaluator( ( GreaterEqNode ) node, db, registries );
+                return new GreaterEqEvaluator( ( GreaterEqNode ) node, db, schemaManager );
                 
             case LESSEQ:
-                return new LessEqEvaluator( ( LessEqNode ) node, db, registries );
+                return new LessEqEvaluator( ( LessEqNode ) node, db, schemaManager );
                 
             case PRESENCE:
-                return new PresenceEvaluator( ( PresenceNode ) node, db, registries );
+                return new PresenceEvaluator( ( PresenceNode ) node, db, schemaManager );
                 
             case SCOPE:
                 if ( ( ( ScopeNode ) node ).getScope() == SearchScope.ONELEVEL )
@@ -101,7 +101,7 @@
                 }
                 
             case SUBSTRING:
-                return new SubstringEvaluator( ( SubstringNode ) node, db, registries );
+                return new SubstringEvaluator( ( SubstringNode ) node, db, schemaManager );
 
             /* ---------- LOGICAL OPERATORS ---------- */
 

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java Sat Nov  7 07:57:34 2009
@@ -20,21 +20,21 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
+import java.util.Comparator;
+import java.util.Iterator;
+
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.xdbm.Store;
+import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.GreaterEqNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.server.xdbm.IndexEntry;
-import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.xdbm.search.Evaluator;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerAttribute;
-
-import java.util.Iterator;
-import java.util.Comparator;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -48,20 +48,20 @@
 {
     private final GreaterEqNode node;
     private final Store<ServerEntry> db;
-    private final Registries registries;
+    private final SchemaManager schemaManager;
     private final AttributeType type;
     private final Normalizer normalizer;
     private final Comparator comparator;
     private final Index<Object,ServerEntry> idx;
 
 
-    public GreaterEqEvaluator( GreaterEqNode node, Store<ServerEntry> db, Registries registries )
+    public GreaterEqEvaluator( GreaterEqNode node, Store<ServerEntry> db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
         this.node = node;
-        this.registries = registries;
-        this.type = registries.getAttributeTypeRegistry().lookup( node.getAttribute() );
+        this.schemaManager = schemaManager;
+        this.type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
 
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -158,13 +158,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {
@@ -210,13 +210,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java Sat Nov  7 07:57:34 2009
@@ -20,22 +20,21 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
+import java.util.Iterator;
+
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.xdbm.Store;
+import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.LessEqNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.server.xdbm.IndexEntry;
-import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.xdbm.search.Evaluator;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerAttribute;
-
-import java.util.Iterator;
-import java.util.Comparator;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 /**
@@ -49,20 +48,20 @@
 {
     private final LessEqNode node;
     private final Store<ServerEntry> db;
-    private final Registries registries;
+    private final SchemaManager schemaManager;
     private final AttributeType type;
     private final Normalizer normalizer;
     private final LdapComparator<? super Object> ldapComparator;
     private final Index<Object,ServerEntry> idx;
 
 
-    public LessEqEvaluator( LessEqNode node, Store<ServerEntry> db, Registries registries )
+    public LessEqEvaluator( LessEqNode node, Store<ServerEntry> db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
         this.node = node;
-        this.registries = registries;
-        this.type = registries.getAttributeTypeRegistry().lookup( node.getAttribute() );
+        this.schemaManager = schemaManager;
+        this.type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
 
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -167,13 +166,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {
@@ -208,13 +207,13 @@
         // If we do not have the attribute, loop through the sub classes of
         // the attributeType.  Perhaps the entry has an attribute value of a
         // subtype (descendant) that will produce a match
-        if ( registries.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
+        if ( schemaManager.getAttributeTypeRegistry().hasDescendants( node.getAttribute() ) )
         {
             // TODO check to see if descendant handling is necessary for the
             // index so we can match properly even when for example a name
             // attribute is used instead of more specific commonName
             Iterator<AttributeType> descendants =
-                registries.getAttributeTypeRegistry().descendants( node.getAttribute() );
+                schemaManager.getAttributeTypeRegistry().descendants( node.getAttribute() );
 
             while ( descendants.hasNext() )
             {



Mime
View raw message