directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951689 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/interceptor/ core-api/src/main/java/org/apache/directory/server/core/partition/ core-ap...
Date Sat, 05 Jun 2010 09:59:50 GMT
Author: elecharny
Date: Sat Jun  5 09:59:49 2010
New Revision: 951689

URL: http://svn.apache.org/viewvc?rev=951689&view=rev
Log:
Cleaned up the getRootDSE operation : the interface returns an Entry, instead of a ClonedServerEntry,
and we don't create anymore such an instance : we just return a clone of the actual rootDSE.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/OperationManager.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockOperationManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/OperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/OperationManager.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/OperationManager.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/OperationManager.java
Sat Jun  5 09:59:49 2010
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
 
 import java.util.Set;
 
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -57,7 +56,7 @@ public interface OperationManager
     /**
      * TODO document after determining if this method should be here.
      */
-    ClonedServerEntry getRootDSE( GetRootDSEOperationContext  opContext ) throws LdapException;
+    Entry getRootDSE( GetRootDSEOperationContext  opContext ) throws LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
Sat Jun  5 09:59:49 2010
@@ -26,7 +26,6 @@ import javax.naming.Context;
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -136,7 +135,7 @@ public abstract class BaseInterceptor im
     }
 
 
-    public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext ) throws LdapException
+    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext )
throws LdapException
     {
         return next.getRootDSE( opContext );
     }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
Sat Jun  5 09:59:49 2010
@@ -23,7 +23,6 @@ package org.apache.directory.server.core
 import java.util.Set;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -136,7 +135,7 @@ public interface Interceptor
     /**
      * Filters {@link DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext )} call.
      */
-    ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext  opContext
) throws LdapException;
+    Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext  opContext ) throws
LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Sat Jun  5 09:59:49 2010
@@ -103,7 +103,7 @@ public class InterceptorChain
         }
 
 
-        public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext )
+        public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext
)
             throws LdapException
         {
             return nexus.getRootDSE( opContext );
@@ -518,7 +518,7 @@ public class InterceptorChain
     }
 
 
-    public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
+    public Entry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
     {
         Element entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -987,7 +987,7 @@ public class InterceptorChain
                 }
 
 
-                public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext
) throws LdapException
+                public Entry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
                 {
                     Element next = getNextEntry();
                     Interceptor interceptor = next.interceptor;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
Sat Jun  5 09:59:49 2010
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
 
 import java.util.Set;
 
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -64,7 +63,7 @@ public interface NextInterceptor
     /**
      * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, GetRootDSEOperationContext
)}.
      */
-    ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException;
+    Entry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
Sat Jun  5 09:59:49 2010
@@ -22,11 +22,11 @@ package org.apache.directory.server.core
 
 import java.util.Set;
 
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
 import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -58,7 +58,7 @@ public interface PartitionNexus extends 
      *
      * @return the attributes of the RootDSE
      */
-    public ClonedServerEntry getRootDSE( GetRootDSEOperationContext getRootDSEContext );
+    public Entry getRootDSE( GetRootDSEOperationContext getRootDSEContext );
 
 
     /**

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
Sat Jun  5 09:59:49 2010
@@ -23,7 +23,6 @@ package org.apache.directory.server.core
 import java.util.List;
 import java.util.Set;
 
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
@@ -83,7 +82,7 @@ public class MockInterceptor implements 
     }
 
 
-    public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext )
+    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext )
         throws LdapException
     {
         interceptors.add( this );

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockOperationManager.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockOperationManager.java
(original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockOperationManager.java
Sat Jun  5 09:59:49 2010
@@ -40,6 +40,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 
@@ -72,7 +73,7 @@ public class MockOperationManager implem
     {
     }
 
-    public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
+    public Entry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
     {
         return null;
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Sat Jun  5 09:59:49 2010
@@ -1436,7 +1436,7 @@ public class DefaultDirectoryService imp
             if( changeLog.isExposed() && changeLog.isTagSearchSupported() )
             {
                 String clSuffix = ( ( TaggableSearchableChangeLogStore ) changeLog.getChangeLogStore()
).getPartition().getSuffixDn().getName();
-                partitionNexus.getRootDSE( null ).getOriginalEntry().add( SchemaConstants.CHANGELOG_CONTEXT_AT,
clSuffix );
+                partitionNexus.getRootDSE( null ).add( SchemaConstants.CHANGELOG_CONTEXT_AT,
clSuffix );
             }
         }
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
Sat Jun  5 09:59:49 2010
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
@@ -467,7 +466,7 @@ public class DefaultOperationManager imp
     /**
      * {@inheritDoc}
      */
-    public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
+    public Entry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
     {
         LOG.debug( ">> GetRootDSEOperation : {}", opContext );
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Sat Jun  5 09:59:49 2010
@@ -31,7 +31,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.DefaultCoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.Interceptor;
@@ -227,7 +226,7 @@ public class AuthenticationInterceptor e
     }
 
 
-    public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext ) throws LdapException
+    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext )
throws LdapException
     {
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
Sat Jun  5 09:59:49 2010
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
@@ -288,7 +287,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext )
+    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext )
         throws LdapException
     {
         long t0 = System.nanoTime();
@@ -312,7 +311,7 @@ public class TimerInterceptor implements
             OPERATION_TIME.debug( "{} : Delta getRootDSE = {}", name, delta );
         }
         
-        return (ClonedServerEntry)rootDSE;
+        return rootDSE;
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=951689&r1=951688&r2=951689&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sat Jun  5 09:59:49 2010
@@ -758,7 +758,7 @@ public class DefaultPartitionNexus exten
         // -----------------------------------------------------------
         if ( ( ids == null ) || ( ids.length == 0 ) )
         {
-            Entry rootDSE = ( Entry ) getRootDSE( null ).clone();
+            Entry rootDSE = getRootDSE( null );
             return new BaseEntryFilteringCursor( new SingletonCursor<Entry>( rootDSE
), searchOperationContext );
         }
 
@@ -796,7 +796,7 @@ public class DefaultPartitionNexus exten
         // return everything
         if ( allUserAttributes && allOperationalAttributes )
         {
-            Entry rootDSE = ( Entry ) getRootDSE( null ).clone();
+            Entry rootDSE = getRootDSE( null );
             return new BaseEntryFilteringCursor( new SingletonCursor<Entry>( rootDSE
), searchOperationContext );
         }
 
@@ -928,9 +928,9 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#getRootDSE(org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext)
      */
-    public ClonedServerEntry getRootDSE( GetRootDSEOperationContext getRootDSEContext )
+    public Entry getRootDSE( GetRootDSEOperationContext getRootDSEContext )
     {
-        return new ClonedServerEntry( rootDSE );
+        return rootDSE.clone();
     }
 
 



Mime
View raw message