You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2007/05/24 02:27:07 UTC

svn commit: r541123 [12/25] - in /directory/apacheds/branches/apacheds-sasl-branch: ./ benchmarks/ bootstrap-extract/ bootstrap-extract/src/ bootstrap-extract/src/main/ bootstrap-extract/src/main/java/ bootstrap-extract/src/main/java/org/ bootstrap-ext...

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Wed May 23 17:26:40 2007
@@ -40,13 +40,16 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AbstractSchemaLoader;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.schema.registries.SchemaLoader;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -86,6 +89,13 @@
     private final AttributeType descAT;
     private final AttributeType fqcnAT;
 
+    private static Map<String, LdapDN> staticAttributeTypeDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticMatchingRulesDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticObjectClassesDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticComparatorsDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticNormalizersDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticSyntaxCheckersDNs = new HashMap<String, LdapDN>();
+    private static Map<String, LdapDN> staticSyntaxesDNs = new HashMap<String, LdapDN>();
     
     public PartitionSchemaLoader( Partition partition, Registries bootstrapRegistries ) throws NamingException
     {
@@ -96,12 +106,61 @@
         this.dao = new SchemaPartitionDao( this.partition, bootstrapRegistries );
         this.mOidAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_OID_AT );
         this.mNameAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_NAME_AT );
-        this.cnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( SystemSchemaConstants.CN_AT );
+        this.cnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( SchemaConstants.CN_AT );
         this.byteCodeAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_BYTECODE_AT );
         this.descAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_DESCRIPTION_AT );
         this.fqcnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_FQCN_AT );
+        
+        initStaticDNs( "system" );
+        initStaticDNs( "core" );
+        initStaticDNs( "apache" );
+        initStaticDNs( "apachemeta" );
+        initStaticDNs( "other" );
+        initStaticDNs( "collective" );
+        initStaticDNs( "java" );
+        initStaticDNs( "cosine" );
+        initStaticDNs( "inetorgperson" );
     }
     
+    private void initStaticDNs( String schemaName ) throws NamingException
+    {
+        
+        // Initialize AttributeType Dns
+        LdapDN dn = new LdapDN( "ou=attributeTypes,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticAttributeTypeDNs.put( schemaName, dn );
+
+        // Initialize ObjectClasses Dns
+        dn = new LdapDN( "ou=objectClasses,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticObjectClassesDNs.put( schemaName, dn );
+
+        // Initialize MatchingRules Dns
+        dn = new LdapDN( "ou=matchingRules,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticMatchingRulesDNs.put( schemaName, dn );
+
+        // Initialize Comparators Dns
+        dn = new LdapDN( "ou=comparators,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticComparatorsDNs.put( schemaName, dn );
+        
+        // Initialize Normalizers Dns
+        dn = new LdapDN( "ou=normalizers,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticNormalizersDNs.put( schemaName, dn );
+
+        // Initialize SyntaxCheckers Dns
+        dn = new LdapDN( "ou=syntaxCheckers,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticSyntaxCheckersDNs.put( schemaName, dn );
+
+        // Initialize Syntaxes Dns
+        dn = new LdapDN( "ou=syntaxes,cn=" + schemaName + ",ou=schema" );
+        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        staticSyntaxesDNs.put( schemaName, dn );
+
+    }
     
     /**
      * Utility method to load all enabled schemas into this registry.
@@ -153,12 +212,13 @@
         {
             if ( ! schema.isDisabled() )
             {
-                log.info( "will attempt to load enabled schema: {}", schema.getSchemaName() );
+                log.debug( "will attempt to load enabled schema: {}", schema.getSchemaName() );
+                    
                 enabledSchemaSet.add( schema );
             }
             else
             {
-                log.info( "will NOT attempt to load disabled schema: {}", schema.getSchemaName() );
+                log.debug( "will NOT attempt to load disabled schema: {}", schema.getSchemaName() );
             }
         }
 
@@ -283,7 +343,7 @@
             return;
         }
         
-        log.info( "loading {} schema ...", schema.getSchemaName() );
+        log.debug( "loading {} schema ...", schema.getSchemaName() );
         
         loadComparators( schema, targetRegistries );
         loadNormalizers( schema, targetRegistries );
@@ -340,23 +400,30 @@
          * the loader we will defer the registration of elements until later.
          */
         LinkedList<ObjectClass> deferred = new LinkedList<ObjectClass>();
-        LdapDN dn = new LdapDN( "ou=objectClasses,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+
+        LdapDN dn = staticObjectClassesDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=objectClasses,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticObjectClassesDNs.put( schema.getSchemaName(), dn );
+        }
         
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading objectClasses", schema.getSchemaName() );
+        log.debug( "{} schema: loading objectClasses", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             ObjectClass oc = factory.getObjectClass( attrs, targetRegistries, schema.getSchemaName() );
             
             try
@@ -433,23 +500,30 @@
     private void loadAttributeTypes( Schema schema, Registries targetRegistries ) throws NamingException
     {
         LinkedList<AttributeType> deferred = new LinkedList<AttributeType>();
-        LdapDN dn = new LdapDN( "ou=attributeTypes,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
         
-        if ( ! partition.hasEntry( dn ) )
+        LdapDN dn = staticAttributeTypeDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=attributeTypes,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticAttributeTypeDNs.put( schema.getSchemaName(), dn );
+        }
+        
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading attributeTypes", schema.getSchemaName() );
+        log.debug( "{} schema: loading attributeTypes", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             AttributeType at = factory.getAttributeType( attrs, targetRegistries, schema.getSchemaName() );
             try
             {
@@ -524,23 +598,29 @@
 
     private void loadMatchingRules( Schema schema, Registries targetRegistries ) throws NamingException
     {
-        LdapDN dn = new LdapDN( "ou=matchingRules,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        LdapDN dn = staticMatchingRulesDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=matchingRules,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticMatchingRulesDNs.put( schema.getSchemaName(), dn );
+        }
         
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading matchingRules", schema.getSchemaName() );
+        log.debug( "{} schema: loading matchingRules", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             MatchingRule mrule = factory.getMatchingRule( attrs, targetRegistries, schema.getSchemaName() );
             targetRegistries.getMatchingRuleRegistry().register( mrule );
 
@@ -550,23 +630,29 @@
 
     private void loadSyntaxes( Schema schema, Registries targetRegistries ) throws NamingException
     {
-        LdapDN dn = new LdapDN( "ou=syntaxes,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        LdapDN dn = staticSyntaxesDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=syntaxes,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticSyntaxesDNs.put( schema.getSchemaName(), dn );
+        }
         
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading syntaxes", schema.getSchemaName() );
+        log.debug( "{} schema: loading syntaxes", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             Syntax syntax = factory.getSyntax( attrs, targetRegistries, schema.getSchemaName() );
             targetRegistries.getSyntaxRegistry().register( syntax );
         }
@@ -575,23 +661,29 @@
 
     private void loadSyntaxCheckers( Schema schema, Registries targetRegistries ) throws NamingException
     {
-        LdapDN dn = new LdapDN( "ou=syntaxCheckers,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        LdapDN dn = staticSyntaxCheckersDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=syntaxCheckers,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticSyntaxCheckersDNs.put( schema.getSchemaName(), dn );
+        }
         
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading syntaxCheckers", schema.getSchemaName() );
+        log.debug( "{} schema: loading syntaxCheckers", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             SyntaxChecker sc = factory.getSyntaxChecker( attrs, targetRegistries );
             SyntaxCheckerDescription syntaxCheckerDescription = 
                 getSyntaxCheckerDescription( schema.getSchemaName(), attrs );
@@ -602,23 +694,29 @@
 
     private void loadNormalizers( Schema schema, Registries targetRegistries ) throws NamingException
     {
-        LdapDN dn = new LdapDN( "ou=normalizers,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        LdapDN dn = staticNormalizersDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=normalizers,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticNormalizersDNs.put( schema.getSchemaName(), dn );
+        }
         
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading normalizers", schema.getSchemaName() );
+        log.debug( "{} schema: loading normalizers", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             Normalizer normalizer = factory.getNormalizer( attrs, targetRegistries );
             NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), attrs );
             targetRegistries.getNormalizerRegistry().register( normalizerDescription, normalizer );
@@ -665,23 +763,29 @@
     
     private void loadComparators( Schema schema, Registries targetRegistries ) throws NamingException
     {
-        LdapDN dn = new LdapDN( "ou=comparators,cn=" + schema.getSchemaName() + ",ou=schema" );
-        dn.normalize( this.attrRegistry.getNormalizerMapping() );
+        LdapDN dn = staticComparatorsDNs.get( schema.getSchemaName() );
+        
+        if ( dn == null )
+        {
+            dn = new LdapDN( "ou=comparators,cn=" + schema.getSchemaName() + ",ou=schema" );
+            dn.normalize( this.attrRegistry.getNormalizerMapping() );
+            staticComparatorsDNs.put( schema.getSchemaName(), dn );
+        }
 
-        if ( ! partition.hasEntry( dn ) )
+        if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
         {
             return;
         }
         
-        log.info( "{} schema: loading comparators", schema.getSchemaName() );
+        log.debug( "{} schema: loading comparators", schema.getSchemaName() );
         
-        NamingEnumeration list = partition.list( dn );
+        NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
             LdapDN resultDN = new LdapDN( result.getName() );
             resultDN.normalize( attrRegistry.getNormalizerMapping() );
-            Attributes attrs = partition.lookup( resultDN );
+            Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
             Comparator comparator = factory.getComparator( attrs, targetRegistries );
             ComparatorDescription comparatorDescription = getComparatorDescription( schema.getSchemaName(), attrs );
             targetRegistries.getComparatorRegistry().register( comparatorDescription, comparator );

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java Wed May 23 17:26:40 2007
@@ -42,5 +42,5 @@
     void modify( LdapDN name, int modOp, Attributes mods, Attributes entry, Attributes targetEntry ) throws NamingException;
     void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry ) throws NamingException;
     void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, Attributes entry ) throws NamingException;
-    void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException;
+    void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException;
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java Wed May 23 17:26:40 2007
@@ -22,6 +22,7 @@
 
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
@@ -75,7 +76,7 @@
             return;
         }
 
-        if ( !"objectclass".equalsIgnoreCase( attribute.getID() ) )
+        if ( !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( attribute.getID() ) )
         {
             return;
         }
@@ -134,7 +135,7 @@
             return;
         }
 
-        Attribute objectClass = attributes.get( "objectClass" );
+        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( objectClass == null )
         {
             return;
@@ -195,7 +196,7 @@
             return;
         }
 
-        if ( !"objectclass".equalsIgnoreCase( attribute.getID() ) )
+        if ( !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( attribute.getID() ) )
         {
             return;
         }
@@ -276,7 +277,7 @@
             return;
         }
 
-        Attribute objectClass = attributes.get( "objectClass" );
+        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( objectClass == null )
         {
             return;

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java Wed May 23 17:26:40 2007
@@ -33,9 +33,9 @@
 import javax.naming.directory.BasicAttribute;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -97,18 +97,18 @@
             throw new NullPointerException( "entry cannot be null" );
         }
         
-        if ( entry.get( SystemSchemaConstants.CN_AT ) == null )
+        if ( entry.get( SchemaConstants.CN_AT ) == null )
         {
             throw new NullPointerException( "entry must have a valid cn attribute" );
         }
-        name = ( String ) entry.get( SystemSchemaConstants.CN_AT ).get();
+        name = ( String ) entry.get( SchemaConstants.CN_AT ).get();
         
-        if ( entry.get( SystemSchemaConstants.CREATORS_NAME_AT ) == null )
+        if ( entry.get( SchemaConstants.CREATORS_NAME_AT ) == null )
         {
             throw new NullPointerException( "entry must have a valid " 
-                + SystemSchemaConstants.CREATORS_NAME_AT + " attribute" );
+                + SchemaConstants.CREATORS_NAME_AT + " attribute" );
         }
-        owner = ( String ) entry.get( SystemSchemaConstants.CREATORS_NAME_AT ).get();
+        owner = ( String ) entry.get( SchemaConstants.CREATORS_NAME_AT ).get();
         
         if ( entry.get( MetaSchemaConstants.M_DISABLED_AT ) != null )
         {

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Wed May 23 17:26:40 2007
@@ -34,17 +34,24 @@
 import javax.naming.directory.DirContext;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
-import org.apache.directory.server.constants.CoreSchemaConstants;
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
+import org.apache.directory.server.core.authn.AuthenticationService;
+import org.apache.directory.server.core.authz.AuthorizationService;
+import org.apache.directory.server.core.authz.DefaultAuthorizationService;
+import org.apache.directory.server.core.collective.CollectiveAttributeService;
+import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.core.normalization.NormalizationService;
+import org.apache.directory.server.core.referral.ReferralService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.NotImplementedException;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -98,17 +105,17 @@
 
     private static final Set<String> VALID_OU_VALUES = new HashSet<String>();
     private static final String[] opAttrs = new String[] {
-        "comparators",
-        "normalizers",
-        "syntaxCheckers",
-        "ldapSyntaxes",
-        "matchingRules",
-        "attributeTypes",
-        "objectClasses",
-        "matchingRuleUse",
-        "dITStructureRules",
-        "dITContentRules",
-        "nameForms"
+        SchemaConstants.COMPARATORS_AT,
+        SchemaConstants.NORMALIZERS_AT,
+        SchemaConstants.SYNTAX_CHECKERS_AT,
+        SchemaConstants.LDAP_SYNTAXES_AT,
+        SchemaConstants.MATCHING_RULES_AT,
+        SchemaConstants.ATTRIBUTE_TYPES_AT,
+        SchemaConstants.OBJECT_CLASSES_AT,
+        SchemaConstants.MATCHING_RULE_USE_AT,
+        SchemaConstants.DIT_STRUCTURE_RULES_AT,
+        SchemaConstants.DIT_CONTENT_RULES_AT,
+        SchemaConstants.NAME_FORMS_AT
     };
     private static final String[] metaObjectClasses = new String[] {
         "metaComparator",
@@ -158,27 +165,27 @@
     
     static 
     {
-        VALID_OU_VALUES.add( "normalizers" );
-        VALID_OU_VALUES.add( "comparators" );
-        VALID_OU_VALUES.add( "syntaxcheckers" );
-        VALID_OU_VALUES.add( "syntaxes" );
-        VALID_OU_VALUES.add( "matchingrules" );
-        VALID_OU_VALUES.add( "matchingruleuse" );
-        VALID_OU_VALUES.add( "attributetypes" );
-        VALID_OU_VALUES.add( "objectclasses" );
-        VALID_OU_VALUES.add( "nameforms" );
-        VALID_OU_VALUES.add( "ditcontentrules" );
-        VALID_OU_VALUES.add( "ditstructurerules" );
+        VALID_OU_VALUES.add( SchemaConstants.NORMALIZERS_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.COMPARATORS_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.SYNTAX_CHECKERS_AT.toLowerCase() );
+        VALID_OU_VALUES.add( "syntaxes".toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.MATCHING_RULES_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.MATCHING_RULE_USE_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.ATTRIBUTE_TYPES_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.OBJECT_CLASSES_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.NAME_FORMS_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.DIT_CONTENT_RULES_AT.toLowerCase() );
+        VALID_OU_VALUES.add( SchemaConstants.DIT_STRUCTURE_RULES_AT.toLowerCase() );
         
         HashSet<String> set = new HashSet<String>();
-        set.add( "normalizationService" );
-        set.add( "authenticationService" );
-        set.add( "referralService" );
-        set.add( "authorizationService" );
-        set.add( "defaultAuthorizationService" );
-        set.add( "exceptionService" );
-        set.add( "schemaService" );
-        set.add( "collectiveAttributeService" );
+        set.add( NormalizationService.NAME );
+        set.add( AuthenticationService.NAME );
+        set.add( ReferralService.NAME );
+        set.add( AuthorizationService.NAME );
+        set.add( DefaultAuthorizationService.NAME );
+        set.add( ExceptionService.NAME );
+        set.add( SchemaService.NAME );
+        set.add( CollectiveAttributeService.NAME );
         SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS = Collections.unmodifiableCollection( set );
     }
 
@@ -189,7 +196,7 @@
         this.loader = loader;
         this.globalRegistries = globalRegistries;
         this.objectClassAT = this.globalRegistries.getAttributeTypeRegistry()
-            .lookup( SystemSchemaConstants.OBJECT_CLASS_AT );
+            .lookup( SchemaConstants.OBJECT_CLASS_AT );
         
         this.metaSchemaHandler = new MetaSchemaHandler( this.globalRegistries, this.loader );
         
@@ -210,37 +217,37 @@
         
         OidRegistry oidRegistry = globalRegistries.getOidRegistry();
         
-        comparatorsOid = oidRegistry.getOid( ApacheSchemaConstants.COMPARATORS_AT );
+        comparatorsOid = oidRegistry.getOid( SchemaConstants.COMPARATORS_AT );
         opAttr2handlerIndex.put( comparatorsOid, new Integer( COMPARATOR_INDEX ) );
         
-        normalizersOid = oidRegistry.getOid( ApacheSchemaConstants.NORMALIZERS_AT );
+        normalizersOid = oidRegistry.getOid( SchemaConstants.NORMALIZERS_AT );
         opAttr2handlerIndex.put( normalizersOid, new Integer( NORMALIZER_INDEX ) );
         
-        syntaxCheckersOid = oidRegistry.getOid( ApacheSchemaConstants.SYNTAX_CHECKERS_AT );
+        syntaxCheckersOid = oidRegistry.getOid( SchemaConstants.SYNTAX_CHECKERS_AT );
         opAttr2handlerIndex.put( syntaxCheckersOid, new Integer( SYNTAX_CHECKER_INDEX ) );
         
-        ldapSyntaxesOid = oidRegistry.getOid( SystemSchemaConstants.LDAP_SYNTAXES_AT );
+        ldapSyntaxesOid = oidRegistry.getOid( SchemaConstants.LDAP_SYNTAXES_AT );
         opAttr2handlerIndex.put( ldapSyntaxesOid, new Integer( SYNTAX_INDEX ) );
         
-        matchingRulesOid = oidRegistry.getOid( SystemSchemaConstants.MATCHING_RULES_AT );
+        matchingRulesOid = oidRegistry.getOid( SchemaConstants.MATCHING_RULES_AT );
         opAttr2handlerIndex.put( matchingRulesOid, new Integer( MATCHING_RULE_INDEX ) );
 
-        attributeTypesOid = oidRegistry.getOid( SystemSchemaConstants.ATTRIBUTE_TYPES_AT );
+        attributeTypesOid = oidRegistry.getOid( SchemaConstants.ATTRIBUTE_TYPES_AT );
         opAttr2handlerIndex.put( attributeTypesOid, new Integer( ATTRIBUTE_TYPE_INDEX ) );
 
-        objectClassesOid = oidRegistry.getOid( SystemSchemaConstants.OBJECT_CLASSES_AT );
+        objectClassesOid = oidRegistry.getOid( SchemaConstants.OBJECT_CLASSES_AT );
         opAttr2handlerIndex.put( objectClassesOid, new Integer( OBJECT_CLASS_INDEX ) );
         
-        matchingRuleUseOid = oidRegistry.getOid( SystemSchemaConstants.MATCHING_RULE_USE_AT );
+        matchingRuleUseOid = oidRegistry.getOid( SchemaConstants.MATCHING_RULE_USE_AT );
         opAttr2handlerIndex.put( matchingRuleUseOid, new Integer( MATCHING_RULE_USE_INDEX ) );
 
-        ditStructureRulesOid = oidRegistry.getOid( SystemSchemaConstants.DIT_STRUCTURE_RULES_AT );
+        ditStructureRulesOid = oidRegistry.getOid( SchemaConstants.DIT_STRUCTURE_RULES_AT );
         opAttr2handlerIndex.put( ditStructureRulesOid, new Integer( DIT_STRUCTURE_RULE_INDEX ) );
 
-        ditContentRulesOid = oidRegistry.getOid( SystemSchemaConstants.DIT_CONTENT_RULES_AT );
+        ditContentRulesOid = oidRegistry.getOid( SchemaConstants.DIT_CONTENT_RULES_AT );
         opAttr2handlerIndex.put( ditContentRulesOid, new Integer( DIT_CONTENT_RULE_INDEX ) );
 
-        nameFormsOid = oidRegistry.getOid( SystemSchemaConstants.NAME_FORMS_AT );
+        nameFormsOid = oidRegistry.getOid( SchemaConstants.NAME_FORMS_AT );
         opAttr2handlerIndex.put( nameFormsOid, new Integer( NAME_FORM_INDEX ) );
         
         initHandlerMaps();
@@ -300,7 +307,7 @@
             return;
         }
         
-        if ( AttributeUtils.containsValue( oc, CoreSchemaConstants.ORGANIZATIONAL_UNIT_OC, objectClassAT ) )
+        if ( AttributeUtils.containsValue( oc, SchemaConstants.ORGANIZATIONAL_UNIT_OC, objectClassAT ) )
         {
             if ( name.size() != 3 )
             {
@@ -347,7 +354,7 @@
             return;
         }
         
-        if ( AttributeUtils.containsValue( oc, CoreSchemaConstants.ORGANIZATIONAL_UNIT_OC, objectClassAT ) )
+        if ( AttributeUtils.containsValue( oc, SchemaConstants.ORGANIZATIONAL_UNIT_OC, objectClassAT ) )
         {
             if ( name.size() != 3 )
             {
@@ -454,17 +461,18 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         Attribute oc = AttributeUtils.getAttribute( entry, objectClassAT );
         
         for ( int ii = 0; ii < oc.size(); ii++ )
         {
             String oid = globalRegistries.getOidRegistry().getOid( ( String ) oc.get( ii ) );
+            
             if ( objectClass2handlerMap.containsKey( oid ) )
             {
                 SchemaChangeHandler handler = objectClass2handlerMap.get( oid );
-                handler.move( oriChildName, newParentName, entry );
+                handler.replace( oriChildName, newParentName, entry );
                 updateSchemaModificationAttributes();
                 return;
             }
@@ -472,7 +480,7 @@
 
         if ( AttributeUtils.containsValue( oc, MetaSchemaConstants.META_SCHEMA_OC, objectClassAT ) )
         {
-            metaSchemaHandler.move( oriChildName, newParentName, entry );
+            metaSchemaHandler.replace( oriChildName, newParentName, entry );
             updateSchemaModificationAttributes();
             return;
         }
@@ -895,6 +903,7 @@
             new AttributeImpl( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT, modifiersName ) );
         LdapDN name = new LdapDN( "cn=schemaModifications,ou=schema" );
         name.normalize( globalRegistries.getAttributeTypeRegistry().getNormalizerMapping() );
-        invocation.getProxy().modify( name, mods, SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS );
+        
+        invocation.getProxy().modify( new ModifyOperationContext( name, mods ), SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS );
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Wed May 23 17:26:40 2007
@@ -35,13 +35,16 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
@@ -86,7 +89,11 @@
     private final static Logger log = LoggerFactory.getLogger( SchemaPartitionDao.class );
     private final static NumericOidSyntaxChecker NUMERIC_OID_CHECKER = new NumericOidSyntaxChecker();
     private static final String[] SCHEMA_ATTRIBUTES = new String[] { 
-        "creatorsName", "m-dependencies", "objectClass", "cn", "m-disabled" };
+        SchemaConstants.CREATORS_NAME_AT, 
+        "m-dependencies", 
+        SchemaConstants.OBJECT_CLASS_AT, 
+        SchemaConstants.CN_AT,
+        "m-disabled" };
 
 
     private final Partition partition;
@@ -129,10 +136,10 @@
         this.attrRegistry = this.bootstrapRegistries.getAttributeTypeRegistry();
         
         this.M_NAME_OID = oidRegistry.getOid( MetaSchemaConstants.M_NAME_AT );
-        this.CN_OID = oidRegistry.getOid( SystemSchemaConstants.CN_AT );
+        this.CN_OID = oidRegistry.getOid( SchemaConstants.CN_AT );
         this.disabledAttributeType = attrRegistry.lookup( MetaSchemaConstants.M_DISABLED_AT );
         this.M_OID_OID = oidRegistry.getOid( MetaSchemaConstants.M_OID_AT );
-        this.OBJECTCLASS_OID = oidRegistry.getOid( SystemSchemaConstants.OBJECT_CLASS_AT );
+        this.OBJECTCLASS_OID = oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT );
         this.M_SYNTAX_OID = oidRegistry.getOid( MetaSchemaConstants.M_SYNTAX_AT );
         this.M_ORDERING_OID = oidRegistry.getOid( MetaSchemaConstants.M_ORDERING_AT );
         this.M_EQUALITY_OID = oidRegistry.getOid( MetaSchemaConstants.M_EQUALITY_AT );
@@ -169,7 +176,7 @@
         while( list.hasMore() )
         {
             SearchResult sr = ( SearchResult ) list.next();
-            schemaNames.add( ( String ) sr.getAttributes().get( "cn" ).get() );
+            schemaNames.add( ( String ) sr.getAttributes().get( SchemaConstants.CN_AT ).get() );
         }
         
         return schemaNames;
@@ -180,11 +187,12 @@
     {
         LdapDN base = new LdapDN( "ou=schema" );
         base.normalize( attrRegistry.getNormalizerMapping() );
-        ExprNode filter = new SimpleNode( oidRegistry.getOid( "objectClass" ), "metaSchema", AssertionEnum.EQUALITY );
+        ExprNode filter = new SimpleNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ), "metaSchema", AssertionEnum.EQUALITY );
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         searchControls.setReturningAttributes( SCHEMA_ATTRIBUTES );
-        return partition.search( base, new HashMap(), filter, searchControls );
+        return partition.search( 
+            new SearchOperationContext( base, new HashMap(), filter, searchControls ) );
     }
 
 
@@ -192,7 +200,7 @@
     {
         LdapDN dn = new LdapDN( "cn=" + schemaName + ",ou=schema" );
         dn.normalize( attrRegistry.getNormalizerMapping() );
-        return factory.getSchema( partition.lookup( dn ) );
+        return factory.getSchema( partition.lookup( new LookupOperationContext( dn ) ) );
     }
 
 
@@ -223,7 +231,8 @@
 
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -266,7 +275,8 @@
 
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -309,7 +319,8 @@
 
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -352,7 +363,8 @@
 
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -395,7 +407,8 @@
 
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -486,7 +499,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -545,7 +559,7 @@
     {
         LdapDN dn = new LdapDN( "cn=" + schemaName + ",ou=schema" );
         dn.normalize( attrRegistry.getNormalizerMapping() );
-        Attributes entry = partition.lookup( dn );
+        Attributes entry = partition.lookup( new LookupOperationContext( dn ) );
         Attribute disabledAttr = AttributeUtils.getAttribute( entry, disabledAttributeType );
         ModificationItemImpl[] mods = new ModificationItemImpl[3];
         
@@ -565,11 +579,11 @@
         mods[0] = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, 
             new AttributeImpl( MetaSchemaConstants.M_DISABLED_AT ) );
         mods[1] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-            new AttributeImpl( SystemSchemaConstants.MODIFIERS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL ) );
+            new AttributeImpl( SchemaConstants.MODIFIERS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL ) );
         mods[2] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-            new AttributeImpl( SystemSchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ) );
+            new AttributeImpl( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ) );
         
-        partition.modify( dn, mods );
+        partition.modify( new ModifyOperationContext( dn, mods ) );
     }
 
 
@@ -602,7 +616,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -651,7 +666,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -678,7 +694,8 @@
         // (& (m-oid=*) (m-name=*) )
         filter.addNode( new PresenceNode( M_OID_OID ) );
         filter.addNode( new PresenceNode( M_NAME_OID ) );
-        return partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+        return partition.search( 
+            new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
     }
 
 
@@ -726,7 +743,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -773,7 +791,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -814,7 +833,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 SearchResult sr = ne.next();
@@ -893,7 +913,8 @@
         
         try
         {
-            ne = partition.search( partition.getSuffix(), new HashMap(), filter, searchControls );
+            ne = partition.search( 
+                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );