directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r628098 [3/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/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Fri Feb 15 08:12:35 2008
@@ -32,8 +32,8 @@
 import org.apache.directory.server.core.entry.DefaultServerAttribute;
 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.ServerModification;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 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;
@@ -58,17 +58,14 @@
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.syntax.NumericOidSyntaxChecker;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.DateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 
 /**
@@ -164,16 +161,12 @@
     public Map<String,Schema> getSchemas() throws NamingException
     {
         Map<String,Schema> schemas = new HashMap<String,Schema>();
-        NamingEnumeration<SearchResult> list = listSchemas();
+        NamingEnumeration<ServerSearchResult> list = listSchemas();
         
         while( list.hasMore() )
         {
-            SearchResult sr = list.next();
-            Schema schema = factory.getSchema( 
-                ServerEntryUtils.toServerEntry( 
-                    sr.getAttributes(),
-                    LdapDN.EMPTY_LDAPDN,
-                    registries ) ); 
+        	ServerSearchResult sr = list.next();
+            Schema schema = factory.getSchema( sr.getServerEntry() );
             schemas.put( schema.getSchemaName(), schema );
         }
         
@@ -184,19 +177,19 @@
     public Set<String> getSchemaNames() throws NamingException
     {
         Set<String> schemaNames = new HashSet<String>();
-        NamingEnumeration<SearchResult> list = listSchemas();
+        NamingEnumeration<ServerSearchResult> list = listSchemas();
         
         while( list.hasMore() )
         {
-            SearchResult sr = list.next();
-            schemaNames.add( ( String ) sr.getAttributes().get( SchemaConstants.CN_AT ).get() );
+        	ServerSearchResult sr = list.next();
+            schemaNames.add( sr.getServerEntry().get( SchemaConstants.CN_AT ).getString() );
         }
         
         return schemaNames;
     }
     
 
-    private NamingEnumeration<SearchResult> listSchemas() throws NamingException
+    private NamingEnumeration<ServerSearchResult> listSchemas() throws NamingException
     {
         LdapDN base = new LdapDN( ServerDNConstants.OU_SCHEMA_DN );
         base.normalize( attrRegistry.getNormalizerMapping() );
@@ -234,7 +227,7 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
 
         try
         {
@@ -280,7 +273,7 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
 
         try
         {
@@ -326,7 +319,7 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
 
         try
         {
@@ -372,7 +365,7 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
 
         try
         {
@@ -418,7 +411,7 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
 
         try
         {
@@ -483,8 +476,8 @@
     
     public LdapDN findDn( String entityName ) throws NamingException
     {
-        SearchResult sr = find( entityName );
-        LdapDN dn = new LdapDN( sr.getName() );
+    	ServerSearchResult sr = find( entityName );
+        LdapDN dn = sr.getDn();
         dn.normalize( attrRegistry.getNormalizerMapping() );
         return dn;
     }
@@ -504,7 +497,7 @@
      * @throws NamingException if more than one entity has the name, or if there 
      * are underlying data access problems
      */
-    public SearchResult find( String entityName ) throws NamingException
+    public ServerSearchResult find( String entityName ) throws NamingException
     {
         BranchNode filter = new OrNode();
         SimpleNode nameAVA = new EqualityNode( M_NAME_OID, entityName.toLowerCase() );
@@ -513,7 +506,7 @@
         filter.addNode( oidAVA );
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
@@ -525,7 +518,7 @@
                 return null;
             }
             
-            SearchResult sr = ne.next();
+            ServerSearchResult sr = ne.next();
             if ( ne.hasMore() )
             {
                 throw new NamingException( "Got more than one result for the entity name: " + entityName );
@@ -629,9 +622,9 @@
      * @return the set of matchingRules and attributeTypes depending on a syntax
      * @throws NamingException if the dao fails to perform search operations
      */
-    public Set<SearchResult> listSyntaxDependents( String numericOid ) throws NamingException
+    public Set<ServerSearchResult> listSyntaxDependents( String numericOid ) throws NamingException
     {
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         // subfilter for (| (objectClass=metaMatchingRule) (objectClass=metaAttributeType))  
@@ -646,7 +639,7 @@
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
@@ -669,9 +662,9 @@
     }
 
 
-    public Set<SearchResult> listMatchingRuleDependents( MatchingRule mr ) throws NamingException
+    public Set<ServerSearchResult> listMatchingRuleDependents( MatchingRule mr ) throws NamingException
     {
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         // ( objectClass = metaAttributeType )
@@ -695,7 +688,7 @@
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
@@ -718,7 +711,7 @@
     }
 
 
-    public NamingEnumeration<SearchResult> listAllNames() throws NamingException
+    public NamingEnumeration<ServerSearchResult> listAllNames() throws NamingException
     {
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -732,7 +725,7 @@
     }
 
 
-    public Set<SearchResult> listAttributeTypeDependents( AttributeType at ) throws NamingException
+    public Set<ServerSearchResult> listAttributeTypeDependents( AttributeType at ) throws NamingException
     {
         /*
          * Right now the following inefficient filter is being used:
@@ -752,7 +745,7 @@
          * )
          */
         
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         // ( objectClass = metaAttributeType )
@@ -772,7 +765,7 @@
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
@@ -802,7 +795,7 @@
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
      * @throws NamingException if there is a problem while searching the schema partition
      */
-    public Set<SearchResult> listSchemaDependents( String schemaName ) throws NamingException
+    public Set<ServerSearchResult> listSchemaDependents( String schemaName ) throws NamingException
     {
         /*
          * The following filter is being used:
@@ -810,7 +803,7 @@
          * ( & ( objectClass = metaSchema ) ( m-dependencies = $schemaName ) )
          */
         
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         filter.addNode( new EqualityNode( OBJECTCLASS_OID, 
@@ -820,7 +813,7 @@
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
@@ -850,9 +843,9 @@
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
      * @throws NamingException if there is a problem while searching the schema partition
      */
-    public Set<SearchResult> listEnabledSchemaDependents( String schemaName ) throws NamingException
+    public Set<ServerSearchResult> listEnabledSchemaDependents( String schemaName ) throws NamingException
     {
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         filter.addNode( new EqualityNode( OBJECTCLASS_OID, 
@@ -862,16 +855,17 @@
         
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {
             ne = partition.search( new SearchOperationContext( registries, partition.getSuffixDn(),
                      AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
+            
             while( ne.hasMore() )
             {
-                SearchResult sr = ne.next();
-                Attribute disabled = AttributeUtils.getAttribute( sr.getAttributes(), disabledAttributeType );
+            	ServerSearchResult sr = ne.next();
+                ServerAttribute disabled = sr.getServerEntry().get( disabledAttributeType );
                 
                 if ( disabled == null )
                 {
@@ -895,7 +889,7 @@
     }
 
 
-    public Set<SearchResult> listObjectClassDependents( ObjectClass oc ) throws NamingException
+    public Set<ServerSearchResult> listObjectClassDependents( ObjectClass oc ) throws NamingException
     {
         /*
          * Right now the following inefficient filter is being used:
@@ -921,7 +915,7 @@
          * )
          */
         
-        Set<SearchResult> set = new HashSet<SearchResult>( );
+        Set<ServerSearchResult> set = new HashSet<ServerSearchResult>( );
         BranchNode filter = new AndNode();
         
         BranchNode or = new OrNode();
@@ -942,7 +936,7 @@
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> ne = null;
+        NamingEnumeration<ServerSearchResult> ne = null;
         
         try
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Fri Feb 15 08:12:35 2008
@@ -28,8 +28,8 @@
 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.ServerModification;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
@@ -74,7 +74,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.LdapContext;
 import java.util.ArrayList;
@@ -171,15 +170,15 @@
             //suffix = LdapDN.normalize( suffix, registry.getNormalizerMapping() );
             suffix.normalize( atRegistry.getNormalizerMapping() );
             
-            NamingEnumeration<SearchResult> subentries = nexus.search( 
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search( 
                 new SearchOperationContext( registries, suffix, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dnName = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dnName = new LdapDN( result.getDn() );
                 
-                ServerEntry subentry = ServerEntryUtils.toServerEntry( result.getAttributes(), dnName, registries );
+                ServerEntry subentry = result.getServerEntry();
                 String subtree = subentry.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ).getString();
                 SubtreeSpecification ss;
 
@@ -240,9 +239,9 @@
     // Methods/Code dealing with Subentry Visibility
     // -----------------------------------------------------------------------
 
-    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();
 
         if ( !isSubentryVisible( invocation ) )
@@ -255,9 +254,9 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
-        NamingEnumeration<SearchResult> result = nextInterceptor.search( opContext );
+        NamingEnumeration<ServerSearchResult> result = nextInterceptor.search( opContext );
         Invocation invocation = InvocationStack.getInstance().peek();
         SearchControls searchCtls = opContext.getSearchControls();
 
@@ -484,15 +483,15 @@
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
 
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
 
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( result.getAttributes(), dn, registries );
+                ServerEntry candidate = result.getServerEntry();
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
@@ -618,15 +617,15 @@
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
 
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = new LdapDN( result.getDn() );
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( result.getAttributes(), dn, registries );
+                ServerEntry candidate = result.getServerEntry();
                 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
@@ -659,7 +658,7 @@
         ExprNode filter = new PresenceNode( "administrativeRole" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> aps = nexus.search(
+        NamingEnumeration<ServerSearchResult> aps = nexus.search(
                 new SearchOperationContext( registries, name, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
 
         if ( aps.hasMore() )
@@ -777,19 +776,16 @@
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
 
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( 
-                    result.getAttributes(),
-                    dn,
-                    registries );
+                ServerEntry candidate = result.getServerEntry();
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
@@ -857,18 +853,15 @@
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( 
-                    result.getAttributes(),
-                    dn,
-                    registries );
+                ServerEntry candidate = result.getServerEntry();
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
@@ -935,18 +928,15 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( 
-                    result.getAttributes(),
-                    dn,
-                    registries );
+                ServerEntry candidate = result.getServerEntry();
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
@@ -1073,15 +1063,15 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
-            NamingEnumeration<SearchResult> subentries = nexus.search(
+            NamingEnumeration<ServerSearchResult> subentries = nexus.search(
                     new SearchOperationContext( registries, oldBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( result.getAttributes(), dn, registries );
+                ServerEntry candidate =  result.getServerEntry();
 
                 if ( evaluator.evaluate( ssOld, apName, dn, candidate ) )
                 {
@@ -1098,10 +1088,10 @@
                     new SearchOperationContext( registries, newBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             while ( subentries.hasMore() )
             {
-                SearchResult result = subentries.next();
-                LdapDN dn = new LdapDN( result.getName() );
+            	ServerSearchResult result = subentries.next();
+                LdapDN dn = result.getDn();
                 dn.normalize( atRegistry.getNormalizerMapping() );
-                ServerEntry candidate = ServerEntryUtils.toServerEntry( result.getAttributes(), dn, registries );
+                ServerEntry candidate = result.getServerEntry();
 
                 if ( evaluator.evaluate( ssNew, apName, dn, candidate ) )
                 {
@@ -1373,10 +1363,10 @@
      */
     public class HideSubentriesFilter implements SearchResultFilter
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            String dn = result.getName();
+            String dn = result.getDn().getNormName();
 
             // see if we can get a match without normalization
             if ( subentryCache.hasSubentry( dn ) )
@@ -1386,9 +1376,7 @@
 
             // see if we can use objectclass if present
             ServerAttribute objectClasses = 
-                ServerEntryUtils.toServerAttribute( 
-                    result.getAttributes().get( SchemaConstants.OBJECT_CLASS_AT ), 
-                    atRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT ) );
+                result.getServerEntry().get( SchemaConstants.OBJECT_CLASS_AT );
             
             if ( objectClasses != null )
             {
@@ -1406,7 +1394,7 @@
             LdapDN name = new LdapDN( invocation.getCaller().getNameInNamespace() );
             name.normalize( atRegistry.getNormalizerMapping() );
 
-            LdapDN rest = new LdapDN( result.getName() );
+            LdapDN rest = result.getDn();
             rest.normalize( atRegistry.getNormalizerMapping() );
             name.addAll( rest );
             return !subentryCache.hasSubentry( name.toString() );
@@ -1419,10 +1407,10 @@
      */
     public class HideEntriesFilter implements SearchResultFilter
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            String dn = result.getName();
+            String dn = result.getDn().getNormName();
 
             // see if we can get a match without normalization
             if ( subentryCache.hasSubentry( dn ) )
@@ -1432,10 +1420,7 @@
 
             // see if we can use objectclass if present
             ServerAttribute objectClasses = 
-                ServerEntryUtils.toServerAttribute( 
-                    result.getAttributes().get( 
-                        SchemaConstants.OBJECT_CLASS_AT),
-                    atRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT ) );
+                result.getServerEntry().get( SchemaConstants.OBJECT_CLASS_AT);
             
             if ( objectClasses != null )
             {
@@ -1452,7 +1437,7 @@
             LdapDN name = new LdapDN( invocation.getCaller().getNameInNamespace() );
             name.normalize( atRegistry.getNormalizerMapping() );
 
-            LdapDN rest = new LdapDN( result.getName() );
+            LdapDN rest = result.getDn();
             rest.normalize( atRegistry.getNormalizerMapping() );
             name.addAll( rest );
             return subentryCache.hasSubentry( name.toNormName() );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Fri Feb 15 08:12:35 2008
@@ -24,7 +24,7 @@
 import org.apache.directory.server.core.DirectoryService;
 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.ModifyOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
@@ -47,7 +47,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -116,14 +115,14 @@
             ExprNode filter = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            NamingEnumeration<SearchResult> results = 
+            NamingEnumeration<ServerSearchResult> results = 
                 nexus.search( new SearchOperationContext( registries, baseDn, AliasDerefMode.DEREF_ALWAYS, filter, ctls ) );
             
             while ( results.hasMore() )
             {
-                SearchResult result = results.next();
-                LdapDN subentryDn = new LdapDN( result.getName() );
-                ServerEntry resultEntry = ServerEntryUtils.toServerEntry( result.getAttributes(), subentryDn, registries );
+            	ServerSearchResult result = results.next();
+                LdapDN subentryDn = result.getDn();
+                ServerEntry resultEntry = result.getServerEntry();
                 ServerAttribute triggerSpec = resultEntry.get( PRESCRIPTIVE_TRIGGER_ATTR );
                 
                 if ( triggerSpec == null )

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Fri Feb 15 08:12:35 2008
@@ -26,6 +26,7 @@
 import org.apache.directory.server.core.changelog.ChangeLog;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
@@ -46,7 +47,6 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.util.ArrayList;
@@ -177,7 +177,7 @@
         }
 
 
-        public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
+        public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
             throws NamingException
         {
             //noinspection unchecked
@@ -185,7 +185,7 @@
         }
 
 
-        public NamingEnumeration<SearchResult> search( SearchOperationContext opContext, Collection bypass ) throws NamingException
+        public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext, Collection bypass ) throws NamingException
         {
             //noinspection unchecked
             return new BogusEnumeration( count );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.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.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -45,7 +46,6 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.SearchResult;
 import java.util.Iterator;
 
 
@@ -163,7 +163,7 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.search( opContext );

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java Fri Feb 15 08:12:35 2008
@@ -21,11 +21,11 @@
 
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
+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.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.invocation.Invocation;
 
@@ -61,11 +61,11 @@
      */
     public static final SearchResultFilter DELETED_ENTRIES_FILTER = new SearchResultFilter()
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            Attributes entry = result.getAttributes();
-            Attribute deleted = entry.get( ENTRY_DELETED );
+            ServerEntry entry = result.getServerEntry();
+            ServerAttribute deleted = entry.get( ENTRY_DELETED );
             Object value = deleted == null ? null : deleted.get();
             return ( value == null || !"TRUE".equalsIgnoreCase( value.toString() ) );
         }

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java Fri Feb 15 08:12:35 2008
@@ -23,13 +23,13 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
 
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.operation.support.EntryUtil;
 import org.apache.directory.mitosis.store.ReplicationStore;
 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.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
@@ -99,7 +99,7 @@
     private void recursiveDelete( PartitionNexus nexus, LdapDN normalizedName, Registries registries )
         throws NamingException
     {
-        NamingEnumeration<SearchResult> ne = nexus.list( new ListOperationContext( registries, normalizedName ) );
+        NamingEnumeration<ServerSearchResult> ne = nexus.list( new ListOperationContext( registries, normalizedName ) );
         
         if ( !ne.hasMore() )
         {
@@ -109,8 +109,8 @@
 
         while ( ne.hasMore() )
         {
-            SearchResult sr = ne.next();
-            LdapDN dn = new LdapDN( sr.getName() );
+        	ServerSearchResult sr = ne.next();
+            LdapDN dn = sr.getDn();
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             recursiveDelete( nexus, dn, registries );
         }

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Fri Feb 15 08:12:35 2008
@@ -29,7 +29,7 @@
 import org.apache.directory.server.core.entry.DefaultServerAttribute;
 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.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
@@ -50,7 +50,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 import java.util.List;
 
@@ -271,16 +270,16 @@
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         
-        NamingEnumeration<SearchResult> e = nexus.search( 
+        NamingEnumeration<ServerSearchResult> e = nexus.search( 
             new SearchOperationContext( registries, oldName, AliasDerefMode.DEREF_ALWAYS,
                     new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
         while ( e.hasMore() )
         {
-            SearchResult sr = e.next();
+        	ServerSearchResult sr = e.next();
 
             // Get the name of the old entry
-            LdapDN oldEntryName = new LdapDN( sr.getName() );
+            LdapDN oldEntryName = sr.getDn();
             oldEntryName.normalize( attributeRegistry.getNormalizerMapping() );
 
             // Delete the old entry
@@ -294,8 +293,7 @@
                         "TRUE" ) ) );
 
             // Get the old entry attributes and replace RDN if required
-            LdapDN entryName = new LdapDN( sr.getName() ); 
-            ServerEntry entry = ServerEntryUtils.toServerEntry( sr.getAttributes(), entryName, registries );
+            ServerEntry entry = sr.getServerEntry();
             
             if ( oldEntryName.size() == oldName.size() )
             {

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java Fri Feb 15 08:12:35 2008
@@ -35,6 +35,7 @@
 import org.apache.directory.server.core.DirectoryService;
 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.ServerValue;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -73,9 +74,7 @@
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 import java.net.InetSocketAddress;
 import java.text.ParseException;
@@ -349,20 +348,21 @@
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         ctrl.setReturningAttributes( new String[] { "entryCSN", "entryDeleted" } );
 
-        NamingEnumeration<SearchResult> e = nexus.search(
+        NamingEnumeration<ServerSearchResult> e = nexus.search(
             new SearchOperationContext( registries, contextName, AliasDerefMode.DEREF_ALWAYS, filter, ctrl ) );
 
         List<LdapDN> names = new ArrayList<LdapDN>();
+        
         try
         {
             while ( e.hasMore() )
             {
-                SearchResult sr = e.next();
-                LdapDN name = new LdapDN( sr.getName() );
+            	ServerSearchResult sr = e.next();
+                LdapDN name = sr.getDn();
                 
                 if ( name.size() > contextName.size() )
                 {
-                    names.add( new LdapDN( sr.getName() ) );
+                    names.add( name );
                 }
             }
         }
@@ -496,11 +496,9 @@
 
 
     @Override
-    public NamingEnumeration<SearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
-        DirContext ctx = ( DirContext ) InvocationStack.getInstance().peek().getCaller();
-
-    	NamingEnumeration<SearchResult> result = nextInterceptor.search(
+    	NamingEnumeration<ServerSearchResult> result = nextInterceptor.search(
 	            new SearchOperationContext(
 	                registries, opContext.getDn(), opContext.getAliasDerefMode(),
 	                new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ),
@@ -512,7 +510,7 @@
 
 
     @Override
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
         SearchControls searchControls = opContext.getSearchControls();
 
@@ -525,7 +523,7 @@
             searchControls.setReturningAttributes( newAttrIds );
         }
 
-    	NamingEnumeration<SearchResult> result = nextInterceptor.search(
+    	NamingEnumeration<ServerSearchResult> result = nextInterceptor.search(
             new SearchOperationContext( registries, opContext.getDn(), opContext.getAliasDerefMode(), opContext.getFilter(), searchControls ) );
         return new SearchResultFilteringEnumeration( result, searchControls, InvocationStack.getInstance().peek(),
             Constants.DELETED_ENTRIES_FILTER, "Search Replication filter" );

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Fri Feb 15 08:12:35 2008
@@ -44,7 +44,7 @@
 import org.apache.directory.mitosis.store.ReplicationStore;
 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.SearchOperationContext;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -60,7 +60,6 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import java.net.InetSocketAddress;
 import java.util.Map;
 
@@ -384,7 +383,7 @@
         // Retrieve all subtree including the base entry
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration<SearchResult> e = ctx.getDirectoryService().getPartitionNexus().search(
+        NamingEnumeration<ServerSearchResult> e = ctx.getDirectoryService().getPartitionNexus().search(
             new SearchOperationContext( ctx.getDirectoryService().getRegistries(), contextName, AliasDerefMode.DEREF_ALWAYS,
             new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
@@ -392,11 +391,8 @@
         {
             while ( e.hasMore() )
             {
-                SearchResult sr = e.next();
-                ServerEntry attrs = ServerEntryUtils.toServerEntry( 
-                    sr.getAttributes(), 
-                    new LdapDN( sr.getName() ), 
-                    ctx.getDirectoryService().getRegistries() ) ;
+            	ServerSearchResult sr = e.next();
+                ServerEntry attrs = sr.getServerEntry(); 
 
                 // Skip entries without entryCSN attribute.
                 ServerAttribute entryCSNAttr = attrs.get( org.apache.directory.mitosis.common.Constants.ENTRY_CSN );
@@ -424,12 +420,12 @@
                 }
                 catch ( IllegalArgumentException ex )
                 {
-                    SessionLog.warn( ctx.getSession(), "An entry with improper entryCSN: " + sr.getName() );
+                    SessionLog.warn( ctx.getSession(), "An entry with improper entryCSN: " + sr.getDn() );
                     continue;
                 }
 
                 // Convert the entry into AddEntryOperation log.
-                LdapDN dn = new LdapDN( sr.getName() );
+                LdapDN dn = sr.getDn();
                 dn.normalize( ctx.getDirectoryService().getRegistries()
                         .getAttributeTypeRegistry().getNormalizerMapping() );
                 Operation op = new AddEntryOperation( csn, dn, attrs );

Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DefaultSearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DefaultSearchHandler.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DefaultSearchHandler.java (original)
+++ directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DefaultSearchHandler.java Fri Feb 15 08:12:35 2008
@@ -21,6 +21,7 @@
 
 
 import org.apache.directory.server.constants.ServerDNConstants;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
@@ -29,6 +30,7 @@
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.AbandonListener;
+import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ManageDsaITControl;
 import org.apache.directory.shared.ldap.message.PersistentSearchControl;

Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java (original)
+++ directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java Fri Feb 15 08:12:35 2008
@@ -47,7 +47,6 @@
 import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.SearchResponseReference;
 import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
-import org.apache.directory.shared.ldap.message.ServerSearchResult;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.mina.common.IoSession;
@@ -105,7 +104,7 @@
         {
             if ( underlying.hasMore() )
             {
-                ServerSearchResult result = ( ServerSearchResult ) underlying.next();
+                SearchResult result = (SearchResult ) underlying.next();
 
                 /*
                  * Now we have to build the prefetched object from the 'result'
@@ -113,13 +112,13 @@
                  */
                 Attribute ref = result.getAttributes().get( SchemaConstants.REF_AT );
                 
-                if ( !ctx.isReferral( result.getDn() )
+                if ( !ctx.isReferral( result.getName() )
                     || req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )
                 {
                     SearchResponseEntry respEntry;
                     respEntry = new SearchResponseEntryImpl( req.getMessageId() );
                     respEntry.setAttributes( result.getAttributes() );
-                    respEntry.setObjectName( result.getDn() );
+                    respEntry.setObjectName( new LdapDN( result.getName() ) );
                     prefetched = respEntry;
                 }
                 else

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=628098&r1=628097&r2=628098&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Fri Feb 15 08:12:35 2008
@@ -43,6 +43,7 @@
 
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
@@ -358,21 +359,28 @@
     public void testBogusAttributeInSearchFilter() throws Exception
     {
         SearchControls cons = new SearchControls();
-        NamingEnumeration e = sysRoot.search( "", "(bogusAttribute=abc123)", cons );
+        NamingEnumeration<SearchResult> e = sysRoot.search( "", "(bogusAttribute=abc123)", cons );
         assertNotNull( e );
         assertEquals( e.getClass(), EmptyEnumeration.class );
+        
         e = sysRoot.search( "", "(!(bogusAttribute=abc123))", cons );
         assertNotNull( e );
+        assertFalse( e.hasMore() );
         assertEquals( e.getClass(), EmptyEnumeration.class );
+        
         e = sysRoot.search( "", "(|(bogusAttribute=abc123)(bogusAttribute=abc123))", cons );
         assertNotNull( e );
+        assertFalse( e.hasMore() );
         assertEquals( e.getClass(), EmptyEnumeration.class );
+        
         e = sysRoot.search( "", "(|(bogusAttribute=abc123)(ou=abc123))", cons );
         assertNotNull( e );
+        assertFalse( e.hasMore() );
         assertFalse( e.getClass().equals( EmptyEnumeration.class ) );
 
         e = sysRoot.search( "", "(OBJECTclass=*)", cons );
         assertNotNull( e );
+        assertTrue( e.hasMore() );
         assertFalse( e.getClass().equals( EmptyEnumeration.class ) );
 
         e = sysRoot.search( "", "(objectclass=*)", cons );



Mime
View raw message