directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r528782 - in /directory/apacheds/trunk/core/src: main/java/org/apache/directory/server/core/authn/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/exception/ main/java/org/apache/directory/server...
Date Sat, 14 Apr 2007 08:29:47 GMT
Author: elecharny
Date: Sat Apr 14 01:29:46 2007
New Revision: 528782

URL: http://svn.apache.org/viewvc?view=rev&rev=528782
Log:
One more ServiceContext used : GetMatchedDN

Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedDNServiceContext.java
Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
Sat Apr 14 01:29:46 2007
@@ -230,15 +230,15 @@
     }
 
 
-    public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
+    public LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext
) throws NamingException
     {
         if ( IS_DEBUG )
         {
-            log.debug( "Matching name = '" + dn.toString() + "'" );
+            log.debug( "Matching name = '" + getMatchedDNContext.getDn().getUpName() + "'"
);
         }
 
         checkAuthenticated();
-        return next.getMatchedName( dn );
+        return next.getMatchedName( getMatchedDNContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
Sat Apr 14 01:29:46 2007
@@ -1010,7 +1010,7 @@
     }
 
 
-    public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
+    public LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext
) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the
admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -1020,12 +1020,12 @@
         
         if ( isPrincipalAnAdministrator( principalDn ) || !enabled )
         {
-            return next.getMatchedName( dn );
+            return next.getMatchedName( getMatchedDNContext );
         }
 
         // get the present matched name
         Attributes entry;
-        LdapDN matched = next.getMatchedName( dn );
+        LdapDN matched = next.getMatchedName( getMatchedDNContext );
 
         // 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

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
Sat Apr 14 01:29:46 2007
@@ -34,6 +34,7 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
+import org.apache.directory.server.core.interceptor.context.GetMatchedDNServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
 import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
@@ -139,7 +140,7 @@
         {
             LdapNameNotFoundException e2 = new LdapNameNotFoundException( "Parent " + parentDn.getUpName()

                 + " not found" );
-            e2.setResolvedName( new LdapDN( nexus.getMatchedName( parentDn ).getUpName()
) );
+            e2.setResolvedName( new LdapDN( nexus.getMatchedName( new GetMatchedDNServiceContext(
parentDn ) ).getUpName() ) );
             throw e2;
         }
         
@@ -505,6 +506,7 @@
         
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
+        
         if ( !nextInterceptor.hasEntry( new EntryServiceContext( dn ) ) )
         {
             LdapNameNotFoundException e;
@@ -518,7 +520,10 @@
                 e = new LdapNameNotFoundException( dn.toString() );
             }
 
-            e.setResolvedName( new LdapDN( proxy.getMatchedName( dn ).getUpName() ) );
+            e.setResolvedName( 
+                new LdapDN( 
+                    proxy.getMatchedName( 
+                        new GetMatchedDNServiceContext( dn ) ).getUpName() ) );
             throw e;
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
Sat Apr 14 01:29:46 2007
@@ -111,9 +111,9 @@
     }
 
 
-    public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
+    public LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext
) throws NamingException
     {
-        return next.getMatchedName( dn );
+        return next.getMatchedName( getMatchedDNContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
Sat Apr 14 01:29:46 2007
@@ -125,9 +125,9 @@
 
 
     /**
-     * Filters {@link PartitionNexus#getMatchedName(org.apache.directory.shared.ldap.name.LdapDN)}
call.
+     * Filters {@link PartitionNexus#getMatchedName( ServiceContext )} call.
      */
-    LdapDN getMatchedName ( NextInterceptor next, LdapDN name ) throws NamingException;
+    LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext ) throws
NamingException;
 
 
     /**
@@ -161,19 +161,19 @@
 
 
     /**
-     * Filters {@link Partition#delete(ServiceContext)} call.
+     * Filters {@link Partition#delete( ServiceContext )} call.
      */
     void delete( NextInterceptor next, ServiceContext deleteContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#add(ServiceContext)} call.
+     * Filters {@link Partition#add( ServiceContext )} call.
      */
     void add( NextInterceptor next, ServiceContext addContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#modify(ServiceContext)} call.
+     * Filters {@link Partition#modify( ServiceContext )} call.
      */
     void modify( NextInterceptor next, ServiceContext modifyContext ) throws NamingException;
 
@@ -198,43 +198,43 @@
 
 
     /**
-     * Filters {@link Partition#lookup(ServiceContext)} call.
+     * Filters {@link Partition#lookup( ServiceContext )} call.
      */
     Attributes lookup( NextInterceptor next, ServiceContext lookupContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#hasEntry(ServiceContext)} call.
+     * Filters {@link Partition#hasEntry( ServiceContext )} call.
      */
     boolean hasEntry( NextInterceptor next, ServiceContext entryContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#rename(ServiceContext)} call.
+     * Filters {@link Partition#rename( ServiceContext )} call.
      */
     void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#move(ServiceContext)} call.
+     * Filters {@link Partition#move( ServiceContext )} call.
      */
     void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#moveAndRename(ServiceContext)} call.
+     * Filters {@link Partition#moveAndRename( ServiceContext) } call.
      */
     void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException;
 
     /**
-     * Filters {@link Partition#bind(ServiceContext)} call.
+     * Filters {@link Partition#bind( ServiceContext )} call.
      */
     void bind( NextInterceptor next, ServiceContext bindContext )
         throws NamingException;
 
     /**
-     * Filters {@link Partition#unbind(ServiceContext)} call.
+     * Filters {@link Partition#unbind( ServiceContext )} call.
      */
     void unbind( NextInterceptor next, ServiceContext unbindContext ) throws NamingException;
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Sat Apr 14 01:29:46 2007
@@ -91,9 +91,9 @@
         }
 
 
-        public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
+        public LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext
) throws NamingException
         {
-            return ( LdapDN ) nexus.getMatchedName( dn ).clone();
+            return ( LdapDN ) nexus.getMatchedName( getMatchedDNContext ).clone();
         }
 
 
@@ -543,14 +543,15 @@
     }
 
 
-    public LdapDN getMatchedName( LdapDN name ) throws NamingException
+    public LdapDN getMatchedName( ServiceContext getMatchedDNContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
+
         try
         {
-            return head.getMatchedName( next, name );
+            return head.getMatchedName( next, getMatchedDNContext );
         }
         catch ( NamingException ne )
         {
@@ -1040,14 +1041,14 @@
                 }
 
 
-                public LdapDN getMatchedName ( LdapDN dn ) throws NamingException
+                public LdapDN getMatchedName ( ServiceContext getMatchedDNContext ) throws
NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
 
                     try
                     {
-                        return interceptor.getMatchedName( next.nextInterceptor, dn );
+                        return interceptor.getMatchedName( next.nextInterceptor, getMatchedDNContext
);
                     }
                     catch ( NamingException ne )
                     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
Sat Apr 14 01:29:46 2007
@@ -46,21 +46,21 @@
 public interface NextInterceptor
 {
     /**
-     * Calls the next interceptor's {@link Interceptor#compare(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,String,Object)}.
+     * Calls the next interceptor's {@link Interceptor#compare( NextInterceptor, ServiceContext
)}.
      */
     boolean compare( ServiceContext compareContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#getRootDSE(NextInterceptor, ServiceContext
)}.
+     * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, ServiceContext
)}.
      */
     Attributes getRootDSE( ServiceContext getRootDSEContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#getMatchedName(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN)}.
+     * Calls the next interceptor's {@link Interceptor#getMatchedName( NextInterceptor, ServiceContext
)}.
      */
-    LdapDN getMatchedName ( LdapDN name ) throws NamingException;
+    LdapDN getMatchedName ( ServiceContext getMatchedDNContext ) throws NamingException;
 
 
     /**
@@ -94,13 +94,13 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#add(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#add( NextInterceptor, ServiceContext
)}.
      */
     void add( ServiceContext addContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#modify( NextInterceptor, ServiceContext
)}.
      */
     void modify( ServiceContext modifyContext ) throws NamingException;
 
@@ -125,42 +125,42 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#lookup( NextInterceptor, ServiceContext
)}.
      */
     Attributes lookup( ServiceContext lookupContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#hasEntry(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#hasEntry( NextInterceptor, ServiceContext
)}.
      */
     boolean hasEntry( ServiceContext entryContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#rename(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, ServiceContext
)}.
      */
     void rename( ServiceContext renameContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#move( NextInterceptor, ServiceContext
)}.
      */
     void move( ServiceContext moveContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#moveAndRename(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#moveAndRename( NextInterceptor, ServiceContext
)}.
      */
     void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#bind(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,byte[],java.util.List,String)}
+     * Calls the next interceptor's {@link Interceptor#bind( NextInterceptor, ServiceContext
)}
      */
     void bind( ServiceContext bindContext ) throws NamingException;
 
     /**
-     * Calls the next interceptor's {@link Interceptor#unbind(NextInterceptor, ServiceContext))}
+     * Calls the next interceptor's {@link Interceptor#unbind( NextInterceptor, ServiceContext
))}
      */
     void unbind( ServiceContext unbindContext ) throws NamingException;
 }

Added: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedDNServiceContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedDNServiceContext.java?view=auto&rev=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedDNServiceContext.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedDNServiceContext.java
Sat Apr 14 01:29:46 2007
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.server.core.interceptor.context;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+
+/**
+ * A GetMatchedDN context used for Interceptors. It contains all the informations
+ * needed for the getMatchedDN operation, and used by all the interceptors
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class GetMatchedDNServiceContext  extends AbstractServiceContext
+{
+    /**
+     * Creates a new instance of GetMatchedDNServiceContext.
+     */
+    public GetMatchedDNServiceContext()
+    {
+        super();
+    }
+    
+    /**
+     * Creates a new instance of GetMatchedDNServiceContext.
+     *
+     * @param dn The entry DN used to get the rootDSE
+     */
+    public GetMatchedDNServiceContext( LdapDN dn )
+    {
+        super( dn );
+    }
+    
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return "GetMatchedDNContext with DN '" + getDn().getUpName() + "'";
+    }
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
Sat Apr 14 01:29:46 2007
@@ -370,10 +370,10 @@
     // Normalize all Name based arguments for other interface operations
     // ------------------------------------------------------------------------
 
-    public LdapDN getMatchedName ( NextInterceptor nextInterceptor, LdapDN name ) throws
NamingException
+    public LdapDN getMatchedName ( NextInterceptor nextInterceptor, ServiceContext getMatchedDNContext
) throws NamingException
     {
-        name = LdapDN.normalize( name, attrNormalizers );
-        return nextInterceptor.getMatchedName( name );
+        LdapDN.normalize( getMatchedDNContext.getDn(), attrNormalizers );
+        return nextInterceptor.getMatchedName( getMatchedDNContext );
     }
 
 

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?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- 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 Apr 14 01:29:46 2007
@@ -591,9 +591,10 @@
     /**
      * @see PartitionNexus#getMatchedName(org.apache.directory.shared.ldap.name.LdapDN)
      */
-    public LdapDN getMatchedName ( LdapDN dn ) throws NamingException
+    public LdapDN getMatchedName ( ServiceContext getMatchedDNContext ) throws NamingException
     {
-        dn = ( LdapDN ) dn.clone();
+        LdapDN dn = ( LdapDN ) getMatchedDNContext.getDn().clone();
+        
         while ( dn.size() > 0 )
         {
             if ( hasEntry( new EntryServiceContext( dn ) ) )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
Sat Apr 14 01:29:46 2007
@@ -221,13 +221,14 @@
     /**
      * Gets the most significant Dn that exists within the server for any Dn.
      *
-     * @param name the normalized distinguished name to use for matching.
+     * @param getMatchedDNContext 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 NamingException if there are any problems
      */
-    public abstract LdapDN getMatchedName ( LdapDN name ) throws NamingException;
+    public abstract LdapDN getMatchedName ( ServiceContext getMatchedDNContext ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
Sat Apr 14 01:29:46 2007
@@ -208,21 +208,22 @@
     }
 
 
-    public LdapDN getMatchedName ( LdapDN dn ) throws NamingException
+    public LdapDN getMatchedName ( ServiceContext getMatchedDNContext ) throws NamingException
     {
-        return getMatchedName( dn, null );
+        return getMatchedName( getMatchedDNContext, null );
     }
 
 
-    public LdapDN getMatchedName( LdapDN dn, Collection bypass ) throws NamingException
+    public LdapDN getMatchedName( ServiceContext getMatchedDNContext, Collection bypass )
throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
-        Object[] args = new Object[] { dn };
+        Object[] args = new Object[] { getMatchedDNContext };
         stack.push( new Invocation( this, caller, "getMatchedDn", args, bypass ) );
+        
         try
         {
-            return this.configuration.getInterceptorChain().getMatchedName( dn );
+            return this.configuration.getInterceptorChain().getMatchedName( getMatchedDNContext
);
         }
         finally
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Sat Apr 14 01:29:46 2007
@@ -2027,10 +2027,13 @@
                 }
                 catch ( NamingException ne )
                 {
-                    log.error( "Attribute value '{}' for attribute '{}' is synatxically incorrect",

-                        (value instanceof String ? value : StringTools.dumpBytes( (byte[])value
) ), 
-                        attribute.getID());
-                    throw ne;
+                    String message = "Attribute value '" + 
+                        (value instanceof String ? value : StringTools.dumpBytes( (byte[])value
) ) + 
+                        "' for attribute '" + attribute.getID() + "' is syntaxically incorrect";
+                    log.info( message );
+                    
+                    throw new LdapInvalidAttributeValueException( message, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
+
                 }
             }
         }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?view=diff&rev=528782&r1=528781&r2=528782
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
(original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
Sat Apr 14 01:29:46 2007
@@ -296,10 +296,10 @@
         }
 
 
-        public LdapDN getMatchedName ( NextInterceptor next, LdapDN name ) throws NamingException
+        public LdapDN getMatchedName ( NextInterceptor next, ServiceContext getMatchedDNContext
) throws NamingException
         {
             interceptors.add( this );
-            return next.getMatchedName( name );
+            return next.getMatchedName( getMatchedDNContext );
         }
 
 



Mime
View raw message