directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r628098 [2/3] - in /directory: apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ apacheds/branches/bigbang/co...
Date Fri, 15 Feb 2008 16:12:48 GMT
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Fri Feb 15 08:12:35 2008
@@ -27,6 +27,7 @@
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
@@ -65,12 +66,10 @@
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.CascadeControl;
 import org.apache.directory.shared.ldap.message.EntryChangeControl;
 import org.apache.directory.shared.ldap.message.ManageDsaITControl;
 import org.apache.directory.shared.ldap.message.PersistentSearchControl;
-import org.apache.directory.shared.ldap.message.ServerSearchResult;
 import org.apache.directory.shared.ldap.message.SubentriesControl;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -90,7 +89,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -893,14 +891,14 @@
     /**
      * @see Partition#list(ListOperationContext)
      */
-    public NamingEnumeration<SearchResult> list( ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException
     {
         Partition backend = getPartition( opContext.getDn() );
         return backend.list( opContext );
     }
 
 
-    public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
+    public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
         throws NamingException
     {
         LdapDN base = opContext.getDn();
@@ -929,8 +927,8 @@
                 if ( ( ids == null ) || ( ids.length == 0 ) )
                 {
                 	ServerEntry rootDSE = (ServerEntry)getRootDSE( null ).clone();
-                    SearchResult result = new ServerSearchResult( "", null, ServerEntryUtils.toAttributesImpl( rootDSE ), false );
-                    return new SingletonEnumeration<SearchResult>( result );
+                    ServerSearchResult result = new ServerSearchResult( "", null, rootDSE, false );
+                    return new SingletonEnumeration<ServerSearchResult>( result );
                 }
                 
                 // -----------------------------------------------------------
@@ -975,16 +973,17 @@
                 // return nothing
                 if ( containsOneDotOne )
                 {
-                    SearchResult result = new ServerSearchResult( "", null, new AttributesImpl(), false );
-                    return new SingletonEnumeration<SearchResult>( result );
+                	ServerEntry serverEntry = new DefaultServerEntry( registries, base );
+                    ServerSearchResult result = new ServerSearchResult( "", null, serverEntry, false );
+                    return new SingletonEnumeration<ServerSearchResult>( result );
                 }
                 
                 // return everything
                 if ( containsAsterisk && containsPlus )
                 {
                 	ServerEntry rootDSE = (ServerEntry)getRootDSE( null ).clone();
-                    SearchResult result = new ServerSearchResult( "", null, ServerEntryUtils.toAttributesImpl( rootDSE ), false );
-                    return new SingletonEnumeration<SearchResult>( result );
+                    ServerSearchResult result = new ServerSearchResult( "", null, rootDSE, false );
+                    return new SingletonEnumeration<ServerSearchResult>( result );
                 }
                 
                 ServerEntry serverEntry = new DefaultServerEntry( registries, opContext.getDn() );
@@ -1009,9 +1008,8 @@
                     }
                 }
 
-                Attributes attrs = ServerEntryUtils.toAttributesImpl( serverEntry );
-                SearchResult result = new ServerSearchResult( "", null, attrs, false );
-                return new SingletonEnumeration<SearchResult>( result );
+                ServerSearchResult result = new ServerSearchResult( "", null, serverEntry, false );
+                return new SingletonEnumeration<ServerSearchResult>( result );
             }
 
             throw new LdapNameNotFoundException();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java Fri Feb 15 08:12:35 2008
@@ -22,6 +22,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
@@ -40,7 +41,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
 
 
 /**
@@ -248,7 +248,7 @@
      * @return a NamingEnumeration containing objects of type {@link SearchResult}
      * @throws NamingException if there are any problems
      */
-    NamingEnumeration<SearchResult> list( ListOperationContext opContext ) throws NamingException;
+    NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException;
 
 
     /**
@@ -265,7 +265,7 @@
      * <a href="http://java.sun.com/j2se/1.4.2/docs/api/
      * javax/naming/directory/SearchResult.html">SearchResult</a>.
      */
-    NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
+    NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
         throws NamingException;
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Fri Feb 15 08:12:35 2008
@@ -33,7 +33,6 @@
 import javax.naming.ServiceUnavailableException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import javax.naming.event.EventContext;
 import javax.naming.event.NamingListener;
 import javax.naming.ldap.LdapContext;
@@ -43,6 +42,7 @@
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.event.EventInterceptor;
@@ -477,13 +477,13 @@
     }
 
 
-    public NamingEnumeration<SearchResult> list( ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException
     {
         return list( opContext, null );
     }
 
 
-    public NamingEnumeration<SearchResult> list( ListOperationContext opContext, Collection<String> bypass )
+    public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext, Collection<String> bypass )
             throws NamingException
     {
         ensureStarted();
@@ -501,10 +501,10 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
+    public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
             throws NamingException
     {
-        NamingEnumeration<SearchResult> ne = search( opContext, null );
+        NamingEnumeration<ServerSearchResult> ne = search( opContext, null );
 
         if ( ne instanceof SearchResultFilteringEnumeration )
         {
@@ -522,7 +522,7 @@
                     int count = 1; // with prefetch we've missed one which is ok since 1 is the minimum
 
 
-                    public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+                    public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
                             throws NamingException
                     {
                         if ( controls.getTimeLimit() > 0 )
@@ -553,7 +553,7 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( SearchOperationContext opContext, Collection<String> bypass )
+    public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext, Collection<String> bypass )
             throws NamingException
     {
         ensureStarted();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Fri Feb 15 08:12:35 2008
@@ -24,6 +24,7 @@
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.enumeration.SearchResultEnumeration;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
@@ -38,8 +39,6 @@
 import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.gui.PartitionViewer;
-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.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
@@ -50,7 +49,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -85,8 +83,7 @@
     protected SearchEngine searchEngine;
     protected Optimizer optimizer;
 
-    protected AttributeTypeRegistry attributeTypeRegistry;
-    protected OidRegistry oidRegistry;
+    protected Registries registries;
 
     protected String id;
     protected int cacheSize = -1;
@@ -303,16 +300,16 @@
     private static final String[] ENTRY_DELETED_ATTRS = new String[] { "entrydeleted" };
 
 
-    public NamingEnumeration<SearchResult> list( ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException
     {
         SearchResultEnumeration list;
         list = new BTreeSearchResultEnumeration( ENTRY_DELETED_ATTRS, list( getEntryId( opContext.getDn().getNormName() ) ),
-            this, attributeTypeRegistry );
+            this, registries );
         return list;
     }
 
 
-    public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
+    public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
         throws NamingException
     {
         SearchControls searchCtls = opContext.getSearchControls();
@@ -325,7 +322,7 @@
             opContext.getFilter(), 
             searchCtls );
 
-        return new BTreeSearchResultEnumeration( attrIds, underlying, this, attributeTypeRegistry );
+        return new BTreeSearchResultEnumeration( attrIds, underlying, this, registries );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java Fri Feb 15 08:12:35 2008
@@ -21,9 +21,9 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.directory.Attributes;
 
-import org.apache.directory.shared.ldap.message.ServerSearchResult;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 
 
 /**
@@ -52,9 +52,9 @@
      * @param id the database id of the entry
      * @param name the user provided relative or distinguished name
      * @param obj the object if any
-     * @param attrs the attributes of the entry
+     * @param attrs the entry
      */
-    public BTreeSearchResult(Long id, String name, Object obj, Attributes attrs) throws InvalidNameException
+    public BTreeSearchResult(Long id, String name, Object obj, ServerEntry attrs) throws InvalidNameException
     {
         super( name, obj, attrs );
         this.id = id;
@@ -67,10 +67,10 @@
      * @param id the database id of the entry
      * @param name the user provided relative or distinguished name
      * @param obj the object if any
-     * @param attrs the attributes of the entry
+     * @param attrs the entry
      * @param isRelative whether or not the name is relative to the base
      */
-    public BTreeSearchResult(Long id, String name, Object obj, Attributes attrs, boolean isRelative) throws InvalidNameException
+    public BTreeSearchResult(Long id, String name, Object obj, ServerEntry attrs, boolean isRelative) throws InvalidNameException
     {
         super( name, obj, attrs, isRelative );
         this.id = id;
@@ -84,9 +84,9 @@
      * @param name the user provided relative or distinguished name
      * @param className the classname of the entry if any
      * @param obj the object if any
-     * @param attrs the attributes of the entry
+     * @param attrs the entry
      */
-    public BTreeSearchResult(Long id, String name, String className, Object obj, Attributes attrs) throws InvalidNameException
+    public BTreeSearchResult(Long id, String name, String className, Object obj, ServerEntry attrs) throws InvalidNameException
     {
         super( name, className, obj, attrs );
         this.id = id;
@@ -100,10 +100,10 @@
      * @param name the user provided relative or distinguished name
      * @param className the classname of the entry if any
      * @param obj the object if any
-     * @param attrs the attributes of the entry
+     * @param attrs the entry
      * @param isRelative whether or not the name is relative to the base
      */
-    public BTreeSearchResult(Long id, String name, String className, Object obj, Attributes attrs,
+    public BTreeSearchResult(Long id, String name, String className, Object obj, ServerEntry attrs,
         boolean isRelative) throws InvalidNameException
     {
         super( name, className, obj, attrs, isRelative );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java Fri Feb 15 08:12:35 2008
@@ -27,15 +27,18 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
 
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.enumeration.SearchResultEnumeration;
-import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 
 /**
@@ -60,7 +63,7 @@
 
     private boolean attrIdsHasStar = false;
     private boolean attrIdsHasPlus = false;
-    private AttributeTypeRegistry registry = null;
+    private Registries registries = null;
 
 
     /**
@@ -70,15 +73,15 @@
      * @param attrIds the returned attributes
      * @param underlying the enumeration over IndexRecords
      */
-    public BTreeSearchResultEnumeration(String[] attrIds, NamingEnumeration<IndexRecord> underlying, BTreePartition db,
-        AttributeTypeRegistry registry)
+    public BTreeSearchResultEnumeration( String[] attrIds, NamingEnumeration<IndexRecord> underlying, BTreePartition db,
+        Registries registries)
     {
         this.partition = db;
         this.attrIds = attrIds;
         this.underlying = underlying;
         this.attrIdsHasStar = containsStar( attrIds );
         this.attrIdsHasPlus = containsPlus( attrIds );
-        this.registry = registry;
+        this.registries = registries;
     }
 
 
@@ -103,11 +106,12 @@
     /**
      * @see javax.naming.NamingEnumeration#next()
      */
-    public SearchResult next() throws NamingException
+    public ServerSearchResult next() throws NamingException
     {
         IndexRecord rec = underlying.next();
-        Attributes entry;
+        ServerEntry entry;
         String name = partition.getEntryUpdn( (Long)rec.getEntryId() );
+        LdapDN dn = new LdapDN( name );
 
         if ( null == rec.getAttributes() )
         {
@@ -116,31 +120,32 @@
 
         if ( attrIds == null )
         {
-            entry = ( Attributes ) rec.getAttributes().clone();
+            entry = ServerEntryUtils.toServerEntry( (Attributes)rec.getAttributes().clone(), dn, registries );
         }
         else if ( attrIdsHasPlus && attrIdsHasStar )
         {
-            entry = ( Attributes ) rec.getAttributes().clone();
+            entry = ServerEntryUtils.toServerEntry( ( Attributes ) rec.getAttributes().clone(), dn, registries );
         }
         else if ( attrIdsHasPlus )
         {
-            entry = new AttributesImpl();
+            entry = new DefaultServerEntry( registries, dn );
 
             // add all listed attributes
-            for ( int ii = 0; ii < attrIds.length; ii++ )
+            for ( String attrId:attrIds )
             {
-                if ( attrIds[ii].equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
+                if ( attrId.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
                 {
                     continue;
                 }
                 // there is no attribute by that name in the entry so we continue
-                if ( null == rec.getAttributes().get( attrIds[ii] ) )
+                if ( null == rec.getAttributes().get( attrId ) )
                 {
                     continue;
                 }
 
-                // clone attribute to stuff into the new resultant entry
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrIds[ii] ).clone();
+            	ServerAttribute attr = ServerEntryUtils.toServerAttribute( ( Attribute ) rec.getAttributes().get( attrId ).clone(), 
+            			registries.getAttributeTypeRegistry().lookup( attrId ) ); 
+
                 entry.put( attr );
             }
 
@@ -150,35 +155,38 @@
             while ( list.hasMore() )
             {
                 String attrId = list.next();
-                AttributeType attrType = registry.lookup( attrId );
+                AttributeType attrType = registries.getAttributeTypeRegistry().lookup( attrId );
+                
                 if ( attrType.getUsage() == UsageEnum.USER_APPLICATIONS )
                 {
                     continue;
                 }
 
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrId ).clone();
+            	ServerAttribute attr = ServerEntryUtils.toServerAttribute( ( Attribute ) rec.getAttributes().get( attrId ).clone(), 
+            			registries.getAttributeTypeRegistry().lookup( attrId ) ); 
                 entry.put( attr );
             }
         }
         else if ( attrIdsHasStar )
         {
-            entry = new AttributesImpl();
+            entry = new DefaultServerEntry( registries, dn );
 
             // add all listed operational attributes
-            for ( int ii = 0; ii < attrIds.length; ii++ )
+            for ( String attrId:attrIds )
             {
-                if ( attrIds[ii].equals( SchemaConstants.ALL_USER_ATTRIBUTES ) )
+                if ( attrId.equals( SchemaConstants.ALL_USER_ATTRIBUTES ) )
                 {
                     continue;
                 }
                 // there is no attribute by that name in the entry so we continue
-                if ( null == rec.getAttributes().get( attrIds[ii] ) )
+                if ( null == rec.getAttributes().get( attrId ) )
                 {
                     continue;
                 }
 
                 // clone attribute to stuff into the new resultant entry
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrIds[ii] ).clone();
+            	ServerAttribute attr = ServerEntryUtils.toServerAttribute( ( Attribute ) rec.getAttributes().get( attrId ).clone(), 
+            			registries.getAttributeTypeRegistry().lookup( attrId ) ); 
                 entry.put( attr );
             }
 
@@ -188,54 +196,55 @@
             while ( list.hasMore() )
             {
                 String attrId = list.next();
-                AttributeType attrType = registry.lookup( attrId );
+                AttributeType attrType = registries.getAttributeTypeRegistry().lookup( attrId );
                 
                 if ( attrType.getUsage() == UsageEnum.USER_APPLICATIONS )
                 {
-                    Attribute attr = ( Attribute ) rec.getAttributes().get( attrId ).clone();
+                	ServerAttribute attr = ServerEntryUtils.toServerAttribute( ( Attribute ) rec.getAttributes().get( attrId ).clone(), 
+                			registries.getAttributeTypeRegistry().lookup( attrId ) ); 
                     entry.put( attr );
                 }
             }
         }
         else
         {
-            entry = new AttributesImpl();
+            entry = new DefaultServerEntry( registries, dn );
 
-            Attributes attrs = rec.getAttributes();
+            ServerEntry attrs = ServerEntryUtils.toServerEntry( rec.getAttributes(), dn, registries );
             
-            for ( int ii = 0; ii < attrIds.length; ii++ )
+            for ( String attrId:attrIds )
             {
-                if ( SchemaConstants.NO_ATTRIBUTE.equals( attrIds[ii] ) )
+                if ( SchemaConstants.NO_ATTRIBUTE.equals( attrId ) )
                 {
                     break;
                 }
                 
-                Attribute attr = AttributeUtils.getAttribute( attrs, registry.lookup( attrIds[ii] ) );
+                ServerAttribute attr = attrs.get( registries.getAttributeTypeRegistry().lookup( attrId ) );
                 
                 // there is no attribute by that name in the entry so we continue
                 if ( null == attr )
                 {
                     // May be it's because the attributeType is a inherited one?
-                    Iterator<AttributeType> descendants = registry.descendants( attrIds[ii] );
+                    Iterator<AttributeType> descendants = registries.getAttributeTypeRegistry().descendants( attrId );
                     
                     while ( descendants.hasNext() )
                     {
                         AttributeType atype = descendants.next();
                         
-                        attr = AttributeUtils.getAttribute( attrs, atype );
+                        attr = attrs.get( atype );
                         
                         if ( attr != null )
                         {
                             // we may have more than one descendant, like sn and cn
                             // for name, so add all of them
-                            entry.put( (Attribute)attr.clone() );
+                            entry.put( (ServerAttribute)attr.clone() );
                         }
                     }
                 }
                 else
                 {
                     // clone attribute to stuff into the new resultant entry
-                    entry.put( (Attribute)attr.clone() );
+                    entry.put( (ServerAttribute)attr.clone() );
                 }
             }
         }
@@ -296,7 +305,7 @@
     /**
      * @see java.util.Enumeration#nextElement()
      */
-    public SearchResult nextElement()
+    public ServerSearchResult nextElement()
     {
         try
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java Fri Feb 15 08:12:35 2008
@@ -22,8 +22,7 @@
 
 import javax.naming.NamingException;
 
-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.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -67,15 +66,14 @@
      * @param oidRegistry the oid reg used for attrID to oid resolution
      * @param attributeTypeRegistry the attribtype reg used for value comparison
      */
-    public ExpressionEvaluator(BTreePartition db, OidRegistry oidRegistry,
-        AttributeTypeRegistry attributeTypeRegistry)
+    public ExpressionEvaluator(BTreePartition db, Registries registries )
     {
         ScopeEvaluator scopeEvaluator = null;
         SubstringEvaluator substringEvaluator = null;
 
         scopeEvaluator = new ScopeEvaluator( db );
-        substringEvaluator = new SubstringEvaluator( db, oidRegistry, attributeTypeRegistry );
-        leafEvaluator = new LeafEvaluator( db, oidRegistry, attributeTypeRegistry, scopeEvaluator, substringEvaluator );
+        substringEvaluator = new SubstringEvaluator( db, registries );
+        leafEvaluator = new LeafEvaluator( db, registries, scopeEvaluator, substringEvaluator );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java Fri Feb 15 08:12:35 2008
@@ -28,8 +28,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-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.NotImplementedException;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
@@ -70,10 +69,7 @@
     private BTreePartition db;
 
     /** Oid Registry used to translate attributeIds to OIDs */
-    private OidRegistry oidRegistry;
-
-    /** AttributeType registry needed for normalizing and comparing values */
-    private AttributeTypeRegistry attributeTypeRegistry;
+    private Registries registries;
 
     /** Substring node evaluator we depend on */
     private SubstringEvaluator substringEvaluator;
@@ -89,12 +85,11 @@
      * @param scopeEvaluator
      * @param substringEvaluator
      */
-    public LeafEvaluator( BTreePartition db, OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry,
+    public LeafEvaluator( BTreePartition db, Registries registries,
         ScopeEvaluator scopeEvaluator, SubstringEvaluator substringEvaluator )
     {
         this.db = db;
-        this.oidRegistry = oidRegistry;
-        this.attributeTypeRegistry = attributeTypeRegistry;
+        this.registries = registries;
         this.scopeEvaluator = scopeEvaluator;
         this.substringEvaluator = substringEvaluator;
     }
@@ -272,8 +267,8 @@
         }
 
         // get the attribute associated with the node
-        Attribute attr = AttributeUtils.getAttribute( record.getAttributes(), attributeTypeRegistry.lookup( node
-            .getAttribute() ) );
+        Attribute attr = AttributeUtils.getAttribute( record.getAttributes(), 
+        		registries.getAttributeTypeRegistry().lookup( node.getAttribute() ) );
 
         // If we do not have the attribute just return false
         if ( null == attr )
@@ -366,7 +361,8 @@
         }
 
         // Now, get the AttributeType associated with the Attribute id
-        AttributeType type = attributeTypeRegistry.lookup( oidRegistry.getOid( attrId ) );
+        AttributeType type = registries.getAttributeTypeRegistry().lookup( 
+        		registries.getOidRegistry().getOid( attrId ) );
 
         // here, we may have some descendants if the attribute is not found
         if ( AttributeUtils.getAttribute( entry, type ) != null )
@@ -378,11 +374,11 @@
         {
             // The attribute was not found in the entry, but it may have
             // some descendant. Let's chack that
-            if ( attributeTypeRegistry.hasDescendants( attrId ) )
+            if ( registries.getAttributeTypeRegistry().hasDescendants( attrId ) )
             {
                 // Ok, we have to check for each descendant if pone of 
                 // them is present into the entry
-                Iterator<AttributeType> descendants = attributeTypeRegistry.descendants( attrId );
+                Iterator<AttributeType> descendants = registries.getAttributeTypeRegistry().descendants( attrId );
 
                 while ( descendants.hasNext() )
                 {
@@ -459,7 +455,7 @@
         }
 
         // get the attribute associated with the node 
-        AttributeType type = attributeTypeRegistry.lookup( filterAttr );
+        AttributeType type = registries.getAttributeTypeRegistry().lookup( filterAttr );
         Attribute attr = AttributeUtils.getAttribute( entry, type );
 
         if ( attr != null )
@@ -488,9 +484,9 @@
 
         // If we do not have the attribute, loop through the descendant
         // May be the node Attribute has descendant ?
-        if ( attributeTypeRegistry.hasDescendants( filterAttr ) )
+        if ( registries.getAttributeTypeRegistry().hasDescendants( filterAttr ) )
         {
-            Iterator<AttributeType> descendants = attributeTypeRegistry.descendants( filterAttr );
+            Iterator<AttributeType> descendants = registries.getAttributeTypeRegistry().descendants( filterAttr );
 
             while ( descendants.hasNext() )
             {
@@ -573,8 +569,8 @@
     private MatchingRule getMatchingRule( String attrId, int matchType ) throws NamingException
     {
         MatchingRule mrule = null;
-        String oid = oidRegistry.getOid( attrId );
-        AttributeType type = attributeTypeRegistry.lookup( oid );
+        String oid = registries.getOidRegistry().getOid( attrId );
+        AttributeType type = registries.getAttributeTypeRegistry().lookup( oid );
 
         switch ( matchType )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java Fri Feb 15 08:12:35 2008
@@ -45,8 +45,10 @@
 {
     /** Database used */
     private final BTreePartition db;
+    
     /** Evaluator used is an Avalon dependent object */
     private final SubstringEvaluator evaluator;
+    
     /** the attribute type registry */
     private final AttributeTypeRegistry attributeTypeRegistry;
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java Fri Feb 15 08:12:35 2008
@@ -29,8 +29,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-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.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -51,11 +50,8 @@
     private BTreePartition db;
     
     /** Oid Registry used to translate attributeIds to OIDs */
-    private OidRegistry oidRegistry;
+    private Registries registries;
     
-    /** AttributeType registry needed for normalizing and comparing values */
-    private AttributeTypeRegistry attributeTypeRegistry;
-
 
     /**
      * Creates a new SubstringEvaluator for substring expressions.
@@ -64,12 +60,10 @@
      * @param oidRegistry the OID registry for name to OID mapping
      * @param attributeTypeRegistry the attributeType registry
      */
-    public SubstringEvaluator( BTreePartition db, OidRegistry oidRegistry,
-        AttributeTypeRegistry attributeTypeRegistry )
+    public SubstringEvaluator( BTreePartition db, Registries registries )
     {
         this.db = db;
-        this.oidRegistry = oidRegistry;
-        this.attributeTypeRegistry = attributeTypeRegistry;
+        this.registries = registries;
     }
 
 
@@ -82,8 +76,8 @@
         SubstringNode snode = ( SubstringNode ) node;
         String filterAttribute = snode.getAttribute();
         
-        String oid = oidRegistry.getOid( filterAttribute );
-        AttributeType type = attributeTypeRegistry.lookup( oid );
+        String oid = registries.getOidRegistry().getOid( filterAttribute );
+        AttributeType type = registries.getAttributeTypeRegistry().lookup( oid );
 
         MatchingRule rule = type.getSubstr();
         
@@ -202,9 +196,9 @@
         
         // If we do not have the attribute, loop through the descendant
         // May be the node Attribute has descendant ?
-        if ( attributeTypeRegistry.hasDescendants( filterAttribute ) )
+        if ( registries.getAttributeTypeRegistry().hasDescendants( filterAttribute ) )
         {
-            Iterator<AttributeType> descendants = attributeTypeRegistry.descendants( filterAttribute );
+            Iterator<AttributeType> descendants = registries.getAttributeTypeRegistry().descendants( filterAttribute );
 
             while ( descendants.hasNext() )
             {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Fri Feb 15 08:12:35 2008
@@ -151,10 +151,9 @@
 
     protected void initRegistries( Registries registries )
     {
-        attributeTypeRegistry = registries.getAttributeTypeRegistry();
-        oidRegistry = registries.getOidRegistry();
-        ExpressionEvaluator evaluator = new ExpressionEvaluator( this, oidRegistry, attributeTypeRegistry );
-        ExpressionEnumerator enumerator = new ExpressionEnumerator( this, attributeTypeRegistry, evaluator );
+        this.registries = registries;
+        ExpressionEvaluator evaluator = new ExpressionEvaluator( this, registries );
+        ExpressionEnumerator enumerator = new ExpressionEnumerator( this, registries.getAttributeTypeRegistry(), evaluator );
         this.searchEngine = new DefaultSearchEngine( this, evaluator, enumerator, optimizer );
         store.initRegistries( registries );
     }
@@ -198,8 +197,8 @@
                 index.setWkDirPath( obj.getWkDirPath() );
             }
 
-            String oid = oidRegistry.getOid( index.getAttributeId() );
-            if ( SYS_INDEX_OIDS.contains( oidRegistry.getOid( index.getAttributeId() ) ) )
+            String oid = registries.getOidRegistry().getOid( index.getAttributeId() );
+            if ( SYS_INDEX_OIDS.contains( registries.getOidRegistry().getOid( index.getAttributeId() ) ) )
             {
                 if ( oid.equals( Oid.ALIAS ) )
                 {
@@ -242,7 +241,7 @@
             store.setEnableOptimizer( isOptimizerEnabled() );
         }
 
-        store.init( oidRegistry, attributeTypeRegistry );
+        store.init( registries.getOidRegistry(), registries.getAttributeTypeRegistry() );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Fri Feb 15 08:12:35 2008
@@ -33,6 +33,7 @@
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.enumeration.ReferralHandlingEnumeration;
@@ -87,7 +88,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 
 /**
@@ -886,7 +886,7 @@
         Partition partition = opContext.getPartition();
         LdapDN suffix = partition.getSuffixDn();
         Invocation invocation = InvocationStack.getInstance().peek();
-        NamingEnumeration<SearchResult> list = invocation.getProxy().search( new SearchOperationContext( registries, suffix,
+        NamingEnumeration<ServerSearchResult> list = invocation.getProxy().search( new SearchOperationContext( registries, suffix,
                 AliasDerefMode.DEREF_ALWAYS, getReferralFilter(), getControls() ), SEARCH_BYPASS );
         addReferrals( list, suffix );
     }
@@ -896,7 +896,7 @@
     {
         // remove referrals immediately before removing the partition
         Invocation invocation = InvocationStack.getInstance().peek();
-        NamingEnumeration<SearchResult> list = invocation.getProxy().search( 
+        NamingEnumeration<ServerSearchResult> list = invocation.getProxy().search( 
             new SearchOperationContext( registries, opContext.getDn(), AliasDerefMode.DEREF_ALWAYS,
                     getReferralFilter(), getControls() ), SEARCH_BYPASS );
         
@@ -905,13 +905,13 @@
     }
 
 
-    private void addReferrals( NamingEnumeration<SearchResult> referrals, LdapDN base ) throws NamingException
+    private void addReferrals( NamingEnumeration<ServerSearchResult> referrals, LdapDN base ) throws NamingException
     {
         while ( referrals.hasMore() )
         {   
-            SearchResult r = referrals.next();
+        	ServerSearchResult r = referrals.next();
             LdapDN referral;
-            LdapDN result = new LdapDN( r.getName() );
+            LdapDN result = new LdapDN( r.getDn() );
             result.normalize( atRegistry.getNormalizerMapping() );
             
             if ( r.isRelative() )
@@ -926,13 +926,13 @@
     }
 
 
-    private void deleteReferrals( NamingEnumeration<SearchResult> referrals, LdapDN base ) throws NamingException
+    private void deleteReferrals( NamingEnumeration<ServerSearchResult> referrals, LdapDN base ) throws NamingException
     {
         while ( referrals.hasMore() )
         {
-            SearchResult r = referrals.next();
+        	ServerSearchResult r = referrals.next();
             LdapDN referral;
-            LdapDN result = new LdapDN( r.getName() );
+            LdapDN result = new LdapDN( r.getDn() );
             result.normalize( atRegistry.getNormalizerMapping() );
 
             if ( r.isRelative() )
@@ -947,7 +947,7 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext )
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext )
         throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -1027,7 +1027,7 @@
 
     class ReferralFilter implements SearchResultFilter//, SearchResultEnumerationAppender 
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
             return false;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java Fri Feb 15 08:12:35 2008
@@ -23,6 +23,7 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -34,7 +35,6 @@
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -115,13 +115,13 @@
     }
 
     
-    protected Set<String> getOids( Set<SearchResult> results ) throws NamingException
+    protected Set<String> getOids( Set<ServerSearchResult> results ) throws NamingException
     {
         Set<String> oids = new HashSet<String>( results.size() );
         
-        for ( SearchResult result : results )
+        for ( ServerSearchResult result : results )
         {
-            LdapDN dn = new LdapDN( result.getName() );
+            LdapDN dn = result.getDn();
             dn.normalize( this.targetRegistries.getAttributeTypeRegistry().getNormalizerMapping() );
             oids.add( ( String ) dn.getRdn().getValue() );
         }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java Fri Feb 15 08:12:35 2008
@@ -23,10 +23,10 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -109,7 +109,8 @@
     {
         String schemaName = getSchemaName( name );
         AttributeType at = factory.getAttributeType( entry, targetRegistries, schemaName );
-        Set<SearchResult> dependees = dao.listAttributeTypeDependents( at );
+        Set<ServerSearchResult> dependees = dao.listAttributeTypeDependents( at );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The attributeType with OID " + at.getOid() 
@@ -138,7 +139,8 @@
     {
         Schema schema = getSchema( name );
         AttributeType oldAt = factory.getAttributeType( entry, targetRegistries, schema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        Set<ServerSearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The attributeType with OID " + oldAt.getOid()
@@ -174,7 +176,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         AttributeType oldAt = factory.getAttributeType( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        Set<ServerSearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The attributeType with OID " + oldAt.getOid()
@@ -214,7 +217,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         AttributeType oldAt = factory.getAttributeType( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        Set<ServerSearchResult> dependees = dao.listAttributeTypeDependents( oldAt );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The attributeType with OID " + oldAt.getOid() 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java Fri Feb 15 08:12:35 2008
@@ -23,10 +23,10 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -94,7 +94,8 @@
     {
         String schemaName = getSchemaName( name );
         MatchingRule mr = factory.getMatchingRule( entry, targetRegistries, schemaName );
-        Set<SearchResult> dependees = dao.listMatchingRuleDependents( mr );
+        Set<ServerSearchResult> dependees = dao.listMatchingRuleDependents( mr );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The matchingRule with OID " + mr.getOid() 
@@ -123,7 +124,8 @@
     {
         Schema schema = getSchema( name );
         MatchingRule oldMr = factory.getMatchingRule( entry, targetRegistries, schema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        Set<ServerSearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The matchingRule with OID " + oldMr.getOid()
@@ -160,7 +162,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         MatchingRule oldMr = factory.getMatchingRule( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        Set<ServerSearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The matchingRule with OID " + oldMr.getOid()
@@ -201,7 +204,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         MatchingRule oldMr = factory.getMatchingRule( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        Set<ServerSearchResult> dependees = dao.listMatchingRuleDependents( oldMr );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The matchingRule with OID " + oldMr.getOid() 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java Fri Feb 15 08:12:35 2008
@@ -23,10 +23,10 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -94,7 +94,8 @@
     {
         String schemaName = getSchemaName( name );
         ObjectClass oc = factory.getObjectClass( entry, targetRegistries, schemaName );
-        Set<SearchResult> dependees = dao.listObjectClassDependents( oc );
+        Set<ServerSearchResult> dependees = dao.listObjectClassDependents( oc );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The objectClass with OID " + oc.getOid() 
@@ -125,7 +126,8 @@
     {
         Schema schema = getSchema( name );
         ObjectClass oldOc = factory.getObjectClass( entry, targetRegistries, schema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listObjectClassDependents( oldOc );
+        Set<ServerSearchResult> dependees = dao.listObjectClassDependents( oldOc );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The objectClass with OID " + oldOc.getOid()
@@ -161,7 +163,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         ObjectClass oldOc = factory.getObjectClass( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listObjectClassDependents( oldOc );
+        Set<ServerSearchResult> dependees = dao.listObjectClassDependents( oldOc );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The objectClass with OID " + oldOc.getOid()
@@ -201,7 +204,8 @@
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
         ObjectClass oldAt = factory.getObjectClass( entry, targetRegistries, oldSchema.getSchemaName() );
-        Set<SearchResult> dependees = dao.listObjectClassDependents( oldAt );
+        Set<ServerSearchResult> dependees = dao.listObjectClassDependents( oldAt );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The objectClass with OID " + oldAt.getOid() 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java Fri Feb 15 08:12:35 2008
@@ -23,10 +23,10 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.schema.registries.SyntaxRegistry;
@@ -94,7 +94,8 @@
     {
         String oid = getOid( entry );
         
-        Set<SearchResult> dependees = dao.listSyntaxDependents( oid );
+        Set<ServerSearchResult> dependees = dao.listSyntaxDependents( oid );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The syntax with OID " + oid 
@@ -128,7 +129,8 @@
     {
         String oldOid = getOid( entry );
 
-        Set<SearchResult> dependees = dao.listSyntaxDependents( oldOid );
+        Set<ServerSearchResult> dependees = dao.listSyntaxDependents( oldOid );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The syntax with OID " + oldOid
@@ -168,7 +170,8 @@
         checkNewParent( newParentName );
         String oldOid = getOid( entry );
 
-        Set<SearchResult> dependees = dao.listSyntaxDependents( oldOid );
+        Set<ServerSearchResult> dependees = dao.listSyntaxDependents( oldOid );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The syntax with OID " + oldOid 
@@ -212,7 +215,8 @@
         checkNewParent( newParentName );
         String oid = getOid( entry );
         
-        Set<SearchResult> dependees = dao.listSyntaxDependents( oid );
+        Set<ServerSearchResult> dependees = dao.listSyntaxDependents( oid );
+        
         if ( dependees != null && dependees.size() > 0 )
         {
             throw new LdapOperationNotSupportedException( "The syntax with OID " + oid 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Fri Feb 15 08:12:35 2008
@@ -35,13 +35,11 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
@@ -63,7 +61,6 @@
 import org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription;
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
     
 import org.slf4j.Logger;
@@ -200,11 +197,11 @@
          * OID registry.  To prevent this we need to load all the OID's in advance
          * regardless of whether they are used or not.
          */
-        NamingEnumeration<SearchResult> ne = dao.listAllNames();
+        NamingEnumeration<ServerSearchResult> ne = dao.listAllNames();
         
         while ( ne.hasMore() )
         {
-            ServerEntry entry = ServerEntryUtils.toServerEntry( ne.next().getAttributes(), new LdapDN( "" ), registries );
+            ServerEntry entry = ne.next().getServerEntry();
             String oid = entry.get( mOidAT ).getString();
             ServerAttribute names = entry.get( mNameAT );
             targetRegistries.getOidRegistry().register( oid, oid );
@@ -249,17 +246,17 @@
     public Set<String> listDependentSchemaNames( String schemaName ) throws NamingException
     {
         Set<String> dependees = new HashSet<String>();
-        Set<SearchResult> results = dao.listSchemaDependents( schemaName );
+        Set<ServerSearchResult> results = dao.listSchemaDependents( schemaName );
         
         if ( results.isEmpty() )
         {
             return dependees;
         }
         
-        for ( SearchResult sr: results )
+        for ( ServerSearchResult sr: results )
         {
-            Attribute cn = AttributeUtils.getAttribute( sr.getAttributes(), cnAT );
-            dependees.add( (String)cn.get() );
+            ServerAttribute cn = sr.getServerEntry().get( cnAT );
+            dependees.add( cn.getString() );
         }
         
         return dependees;
@@ -277,17 +274,17 @@
     public Set<String> listEnabledDependentSchemaNames( String schemaName ) throws NamingException
     {
         Set<String> dependees = new HashSet<String>();
-        Set<SearchResult> results = dao.listEnabledSchemaDependents( schemaName );
+        Set<ServerSearchResult> results = dao.listEnabledSchemaDependents( schemaName );
         
         if ( results.isEmpty() )
         {
             return dependees;
         }
         
-        for ( SearchResult sr: results )
+        for ( ServerSearchResult sr: results )
         {
-            Attribute cn = AttributeUtils.getAttribute( sr.getAttributes(), cnAT );
-            dependees.add( (String)cn.get() );
+            ServerAttribute cn = sr.getServerEntry().get( cnAT );
+            dependees.add( cn.getString() );
         }
         
         return dependees;
@@ -428,12 +425,12 @@
         
         LOG.debug( "{} schema: loading objectClasses", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             ObjectClass oc = factory.getObjectClass( attrs, targetRegistries, schema.getSchemaName() );
@@ -529,12 +526,12 @@
         
         LOG.debug( "{} schema: loading attributeTypes", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             AttributeType at = factory.getAttributeType( attrs, targetRegistries, schema.getSchemaName() );
@@ -627,12 +624,12 @@
         
         LOG.debug( "{} schema: loading matchingRules", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             MatchingRule mrule = factory.getMatchingRule( attrs, targetRegistries, schema.getSchemaName() );
@@ -660,12 +657,12 @@
         
         LOG.debug( "{} schema: loading syntaxes", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             Syntax syntax = factory.getSyntax( attrs, targetRegistries, schema.getSchemaName() );
@@ -692,12 +689,12 @@
         
         LOG.debug( "{} schema: loading syntaxCheckers", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             SyntaxChecker sc = factory.getSyntaxChecker( attrs, targetRegistries );
@@ -726,12 +723,12 @@
         
         LOG.debug( "{} schema: loading normalizers", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             Normalizer normalizer = factory.getNormalizer( attrs, targetRegistries );
@@ -804,12 +801,12 @@
         
         LOG.debug( "{} schema: loading comparators", schema.getSchemaName() );
         
-        NamingEnumeration<SearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
+        NamingEnumeration<ServerSearchResult> list = partition.list( new ListOperationContext( registries, dn ) );
         
         while ( list.hasMore() )
         {
-            SearchResult result = list.next();
-            LdapDN resultDN = new LdapDN( result.getName() );
+        	ServerSearchResult result = list.next();
+            LdapDN resultDN = result.getDn();
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             Comparator comparator = factory.getComparator( attrs, targetRegistries );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Fri Feb 15 08:12:35 2008
@@ -28,6 +28,7 @@
 import org.apache.directory.server.core.entry.ServerBinaryValue;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
@@ -45,7 +46,6 @@
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 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.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
@@ -74,7 +74,6 @@
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.message.CascadeControl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.ServerSearchResult;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -92,10 +91,8 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.NoPermissionException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
@@ -386,9 +383,9 @@
     /**
      *
      */
-    public NamingEnumeration<SearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
-        NamingEnumeration<SearchResult> result = nextInterceptor.list( opContext );
+        NamingEnumeration<ServerSearchResult> result = nextInterceptor.list( opContext );
         Invocation invocation = InvocationStack.getInstance().peek();
         return new SearchResultFilteringEnumeration( result, new SearchControls(), invocation, binaryAttributeFilter, "List Schema Filter" );
     }
@@ -662,7 +659,7 @@
     /**
      *
      */
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
         LdapDN base = opContext.getDn();
         SearchControls searchCtls = opContext.getSearchControls();
@@ -681,7 +678,7 @@
         // Deal with the normal case : searching for a normal value (not subSchemaSubEntry)
         if ( !subschemaSubentryDnNorm.equals( baseNormForm ) )
         {
-            NamingEnumeration<SearchResult> result = nextInterceptor.search( opContext );
+            NamingEnumeration<ServerSearchResult> result = nextInterceptor.search( opContext );
 
             Invocation invocation = InvocationStack.getInstance().peek();
 
@@ -723,7 +720,7 @@
                 }
                 else
                 {
-                    return new EmptyEnumeration<SearchResult>();
+                    return new EmptyEnumeration<ServerSearchResult>();
                 }
 
                 String nodeOid = registries.getOidRegistry().getOid( node.getAttribute() );
@@ -735,13 +732,13 @@
                     && ( node instanceof EqualityNode ) )
                 {
                     // call.setBypass( true );
-                    Attributes attrs = ServerEntryUtils.toAttributesImpl( schemaService.getSubschemaEntry( searchCtls.getReturningAttributes() ) );
-                    SearchResult result = new ServerSearchResult( base.toString(), null, attrs );
-                    return new SingletonEnumeration<SearchResult>( result );
+                    ServerEntry serverEntry = schemaService.getSubschemaEntry( searchCtls.getReturningAttributes() );
+                    ServerSearchResult result = new ServerSearchResult( base.toString(), null, serverEntry );
+                    return new SingletonEnumeration<ServerSearchResult>( result );
                 }
                 else
                 {
-                    return new EmptyEnumeration<SearchResult>();
+                    return new EmptyEnumeration<ServerSearchResult>();
                 }
             }
             else if ( filter instanceof PresenceNode )
@@ -752,15 +749,15 @@
                 if ( node.getAttribute().equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
                     // call.setBypass( true );
-                    Attributes attrs = ServerEntryUtils.toAttributesImpl( schemaService.getSubschemaEntry( searchCtls.getReturningAttributes() ) );
-                    SearchResult result = new ServerSearchResult( base.toString(), null, attrs, false );
-                    return new SingletonEnumeration<SearchResult>( result );
+                    ServerEntry serverEntry = schemaService.getSubschemaEntry( searchCtls.getReturningAttributes() );
+                    ServerSearchResult result = new ServerSearchResult( base.toString(), null, serverEntry, false );
+                    return new SingletonEnumeration<ServerSearchResult>( result );
                 }
             }
         }
 
         // In any case not handled previously, just return an empty result
-        return new EmptyEnumeration<SearchResult>();
+        return new EmptyEnumeration<ServerSearchResult>();
     }
 
 
@@ -1540,13 +1537,10 @@
      */
     private class BinaryAttributeFilter implements SearchResultFilter
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            filterBinaryAttributes( ServerEntryUtils.toServerEntry( 
-                result.getAttributes(),
-                new LdapDN( result.getName() ),
-                ((ServerLdapContext)invocation.getCaller()).getService().getRegistries() ) );
+            filterBinaryAttributes( result.getServerEntry() );
             return true;
         }
     }
@@ -1557,13 +1551,10 @@
      */
     private class TopFilter implements SearchResultFilter
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            filterObjectClass( ServerEntryUtils.toServerEntry( 
-                result.getAttributes(),
-                new LdapDN( result.getName() ),
-                ((ServerLdapContext)invocation.getCaller()).getService().getRegistries() ) );
+            filterObjectClass( result.getServerEntry() );
             
             return true;
         }



Mime
View raw message