directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951626 - 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/interceptor/contex...
Date Sat, 05 Jun 2010 00:51:28 GMT
Author: elecharny
Date: Sat Jun  5 00:51:27 2010
New Revision: 951626

URL: http://svn.apache.org/viewvc?rev=951626&view=rev
Log:
Removed the getmatchedName method and getMatchedNameContext : they are useless.

Removed:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedNameOperationContext.java
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/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/authz/AciAuthorizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.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/normalization/NormalizationInterceptor.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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -29,7 +29,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -64,12 +63,6 @@ public interface OperationManager
     /**
      * TODO document after determining if this method should be here.
      */
-    DN getMatchedName( GetMatchedNameOperationContext opContext ) throws LdapException;
-
-
-    /**
-     * TODO document after determining if this method should be here.
-     */
     DN getSuffix ( GetSuffixOperationContext 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -33,7 +33,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -137,12 +136,6 @@ public abstract class BaseInterceptor im
     }
 
 
-    public DN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-    {
-        return next.getMatchedName( opContext );
-    }
-
-
     public ClonedServerEntry 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -30,7 +30,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -141,12 +140,6 @@ public interface Interceptor
 
 
     /**
-     * Filters {@link DefaultPartitionNexus#getMatchedName( GetMatchedNameOperationContext
)} call.
-     */
-    DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws
LdapException;
-
-
-    /**
      * Filters {@link DefaultPartitionNexus#getSuffix( GetSuffixOperationContext )} call.
      */
     DN getSuffix ( NextInterceptor next, GetSuffixOperationContext 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -37,7 +37,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -111,12 +110,6 @@ public class InterceptorChain
         }
 
 
-        public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-        {
-            return ( DN ) nexus.getMatchedName( opContext ).clone();
-        }
-
-
         public DN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext )
throws LdapException
         {
             return ( DN ) nexus.getSuffix( opContext ).clone();
@@ -547,28 +540,6 @@ public class InterceptorChain
     }
 
 
-    public DN getMatchedName( GetMatchedNameOperationContext opContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            return head.getMatchedName( next, opContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
     public DN getSuffix( GetSuffixOperationContext opContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -1037,27 +1008,6 @@ public class InterceptorChain
                 }
 
 
-                public DN getMatchedName( GetMatchedNameOperationContext opContext ) throws
LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        return interceptor.getMatchedName( next.nextInterceptor, opContext
);
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
                 public DN getSuffix( GetSuffixOperationContext opContext ) throws LdapException
                 {
                     Element next = getNextEntry();

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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -29,7 +29,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -69,12 +68,6 @@ public interface NextInterceptor
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#getMatchedName( NextInterceptor, GetMatchedNameOperationContext
)}.
-     */
-    DN getMatchedName( GetMatchedNameOperationContext opContext ) throws LdapException;
-
-
-    /**
      * Calls the next interceptor's {@link Interceptor#getSuffix( NextInterceptor, GetSuffixOperationContext
)}.
      */
     DN getSuffix( GetSuffixOperationContext 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -24,7 +24,6 @@ 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.GetMatchedNameOperationContext;
 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;
@@ -101,19 +100,6 @@ public interface PartitionNexus extends 
 
 
     /**
-     * Gets the most significant Dn that exists within the server for any Dn.
-     *
-     * @param getMatchedNameContext the context containing the  distinguished name 
-     * to use for matching.
-     * @return a distinguished name representing the matching portion of dn,
-     * as originally provided by the user on creation of the matched entry or 
-     * the empty string distinguished name if no match was found.
-     * @throws Exception if there are any problems
-     */
-    public DN getMatchedName( GetMatchedNameOperationContext matchedNameContext ) throws
LdapException;
-
-
-    /**
      * Gets the distinguished name of the suffix that would hold an entry with
      * the supplied distinguished name parameter.  If the DN argument does not
      * fall under a partition suffix then the empty string Dn is returned.

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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -92,13 +91,6 @@ public class MockInterceptor implements 
     }
 
 
-    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-    {
-        interceptors.add( this );
-        return next.getMatchedName( opContext );
-    }
-
-
     public DN getSuffix( NextInterceptor next, GetSuffixOperationContext 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -29,7 +29,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -73,11 +72,6 @@ public class MockOperationManager implem
     {
     }
 
-    public DN getMatchedName( GetMatchedNameOperationContext opContext ) throws LdapException
-    {
-        return null;
-    }
-
     public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws LdapException
     {
         return null;

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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -468,29 +467,6 @@ public class DefaultOperationManager imp
     /**
      * {@inheritDoc}
      */
-    public DN getMatchedName( GetMatchedNameOperationContext opContext ) throws LdapException
-    {
-        LOG.debug( ">> GetMatchedNameOperation : {}", opContext );
-
-        ensureStarted();
-        push( opContext );
-
-        try
-        {
-            return directoryService.getInterceptorChain().getMatchedName( opContext );
-        }
-        finally
-        {
-            pop();
-
-            LOG.debug( "<< GetMatchedNameOperation successful" );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public ClonedServerEntry 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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -41,7 +41,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -228,18 +227,6 @@ public class AuthenticationInterceptor e
     }
 
 
-    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-    {
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "Operation Context: {}", opContext );
-        }
-
-        checkAuthenticated( opContext );
-        return next.getMatchedName( opContext );
-    }
-
-
     public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext
opContext ) throws LdapException
     {
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=951626&r1=951625&r2=951626&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Sat Jun  5 00:51:27 2010
@@ -47,7 +47,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
@@ -1062,48 +1061,6 @@ public class AciAuthorizationInterceptor
     }
 
 
-    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-    {
-        // Access the principal requesting the operation, and bypass checks if it is the
admin
-        LdapPrincipal principal = opContext.getSession().getEffectivePrincipal();
-        DN principalDn = principal.getDN();
-
-        if ( isPrincipalAnAdministrator( principalDn )
-            || !opContext.getSession().getDirectoryService().isAccessControlEnabled() )
-        {
-            return next.getMatchedName( opContext );
-        }
-
-        // get the present matched name
-        Entry entry;
-        DN matched = next.getMatchedName( opContext );
-
-        // check if we have disclose on error permission for the entry at the matched dn
-        // if not remove rdn and check that until nothing is left in the name and return
-        // that but if permission is granted then short the process and return the dn
-        while ( matched.size() > 0 )
-        {
-            entry = opContext.lookup( matched, ByPassConstants.GETMATCHEDDN_BYPASS );
-
-            Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
-            Collection<ACITuple> tuples = new HashSet<ACITuple>();
-            addPerscriptiveAciTuples( opContext, tuples, matched, ( ( ClonedServerEntry )
entry ).getOriginalEntry() );
-            addEntryAciTuples( tuples, entry );
-            addSubentryAciTuples( opContext, tuples, matched, entry );
-
-            if ( engine.hasPermission( schemaManager, opContext, userGroups, principalDn,
principal
-                .getAuthenticationLevel(), matched, null, null, MATCHEDNAME_PERMS, tuples,
entry, null ) )
-            {
-                return matched;
-            }
-
-            matched.remove( matched.size() - 1 );
-        }
-
-        return matched;
-    }
-
-
     public void cacheNewGroup( DN name, Entry entry ) throws Exception
     {
         groupCache.groupAdded( name, entry );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=951626&r1=951625&r2=951626&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Sat Jun  5 00:51:27 2010
@@ -183,8 +183,6 @@ public class ExceptionInterceptor extend
             {
                 LdapNoSuchObjectException e2 = new LdapNoSuchObjectException( I18n.err( I18n.ERR_251,
parentDn
                     .getName() ) );
-                //e2.setResolvedName( new DN( nexus.getMatchedName( 
-                //  new GetMatchedNameOperationContext( opContext.getSession(), parentDn
) ).getName() ) );
                 throw e2;
             }
 
@@ -596,10 +594,6 @@ public class ExceptionInterceptor extend
                 e = new LdapNoSuchObjectException( dn.getName() );
             }
 
-            //e.setResolvedName( 
-            //    new DN( 
-            //        opContext.getSession().getDirectoryService().getOperationManager().getMatchedName(

-            //            new GetMatchedNameOperationContext( opContext.getSession(), dn
) ).getName() ) );
             throw e;
         }
     }

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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -33,7 +33,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -95,10 +94,6 @@ public class TimerInterceptor implements
     private static AtomicLong totalDelete = new AtomicLong( 0 );
     private static AtomicInteger nbDeleteCalls = new AtomicInteger( 0 );
     
-    /** Stats for the GetMatchedName operation */
-    private static AtomicLong totalGetMatchedName = new AtomicLong( 0 );
-    private static AtomicInteger nbGetMatchedNameCalls = new AtomicInteger( 0 );
-    
     /** Stats for the GetRootDSE operation */
     private static AtomicLong totalGetRootDSE = new AtomicLong( 0 );
     private static AtomicInteger nbGetRootDSECalls = new AtomicInteger( 0 );
@@ -592,36 +587,6 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws LdapException
-    {
-        long t0 = System.nanoTime();
-        DN dn = next.getMatchedName( opContext );
-        long delta = System.nanoTime() - t0;
-        
-        if ( IS_DEBUG_STATS )
-        {
-            nbGetMatchedNameCalls.incrementAndGet();
-            totalGetMatchedName.getAndAdd( delta );
-    
-            if ( nbGetMatchedNameCalls.get() % 1000 == 0 )
-            {
-                long average = totalGetMatchedName.get()/(nbGetMatchedNameCalls.get() * 1000);
-                OPERATION_STATS.debug( name + " : Average getMatchedName = {} microseconds,
nb getMatchedNames = {}", average, nbGetMatchedNameCalls.get() );
-            }
-        }
-
-        if ( IS_DEBUG_TIME )
-        {
-            OPERATION_TIME.debug( "{} : Delta getMatchedName = {}", name, delta );
-        }
-        
-        return dn;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public DN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext ) throws
LdapException
     {
         long t0 = System.nanoTime();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=951626&r1=951625&r2=951626&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
Sat Jun  5 00:51:27 2010
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
@@ -298,17 +297,6 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public DN getMatchedName( NextInterceptor nextInterceptor, GetMatchedNameOperationContext
opContext )
-        throws LdapException
-    {
-        opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
-        return nextInterceptor.getMatchedName( opContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public DN getSuffix( NextInterceptor nextInterceptor, GetSuffixOperationContext opContext
) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );

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=951626&r1=951625&r2=951626&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 00:51:27 2010
@@ -49,7 +49,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 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.ListOperationContext;
@@ -1063,27 +1062,6 @@ public class DefaultPartitionNexus exten
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.server.core.partition.PartitionNexus#getMatchedName(org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext)
-     */
-    public DN getMatchedName( GetMatchedNameOperationContext matchedNameContext ) throws
LdapException
-    {
-        DN dn = ( DN ) matchedNameContext.getDn().clone();
-
-        while ( dn.size() > 0 )
-        {
-            if ( hasEntry( new EntryOperationContext( matchedNameContext.getSession(), dn
) ) )
-            {
-                return dn;
-            }
-
-            dn.remove( dn.size() - 1 );
-        }
-
-        return dn;
-    }
-
-
-    /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#getSuffix(org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext)
      */
     public DN getSuffix( GetSuffixOperationContext getSuffixContext ) throws LdapException



Mime
View raw message