From commits-return-9185-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Mon Jun 05 17:15:58 2006 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 28121 invoked from network); 5 Jun 2006 17:15:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jun 2006 17:15:58 -0000 Received: (qmail 16222 invoked by uid 500); 5 Jun 2006 17:15:57 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 16161 invoked by uid 500); 5 Jun 2006 17:15:57 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 16123 invoked by uid 99); 5 Jun 2006 17:15:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 10:15:57 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 10:15:54 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F3DEE1A9846; Mon, 5 Jun 2006 10:15:33 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r411860 [3/3] - in /directory/branches/apacheds/optimization: core/src/main/java/org/apache/directory/server/core/authn/ core/src/main/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/authz/su... Date: Mon, 05 Jun 2006 17:15:25 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060605171533.F3DEE1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original) +++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Mon Jun 5 10:15:23 2006 @@ -112,7 +112,7 @@ evaluator = new SubtreeEvaluator( factoryCfg.getGlobalRegistries().getOidRegistry() ); // prepare to find all subentries in all namingContexts - Iterator suffixes = this.nexus.listSuffixes( true ); + Iterator suffixes = this.nexus.listSuffixes(); ExprNode filter = new SimpleNode( "objectclass", "subentry", LeafNode.EQUALITY ); SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.SUBTREE_SCOPE ); @@ -155,7 +155,7 @@ // Methods/Code dealing with Subentry Visibility // ----------------------------------------------------------------------- - public NamingEnumeration list( NextInterceptor nextInterceptor, Name base ) throws NamingException + public NamingEnumeration list( NextInterceptor nextInterceptor, LdapDN base ) throws NamingException { NamingEnumeration e = nextInterceptor.list( base ); Invocation invocation = InvocationStack.getInstance().peek(); @@ -170,7 +170,7 @@ } - public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter, + public NamingEnumeration search( NextInterceptor nextInterceptor, LdapDN base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException { NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls ); @@ -248,8 +248,8 @@ while ( list.hasNext() ) { String subentryDnStr = ( String ) list.next(); - Name subentryDn = new LdapDN( subentryDnStr ); - Name apDn = ( Name ) subentryDn.clone(); + LdapDN subentryDn = new LdapDN( subentryDnStr ); + LdapDN apDn = ( LdapDN ) subentryDn.clone(); apDn.remove( apDn.size() - 1 ); SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn ); @@ -378,7 +378,7 @@ * operational attributes calculated above. * ---------------------------------------------------------------- */ - Name baseDn = ( Name ) apName.clone(); + LdapDN baseDn = ( LdapDN ) apName.clone(); baseDn.addAll( ss.getBase() ); ExprNode filter = new PresenceNode( "objectclass" ); @@ -407,8 +407,8 @@ while ( list.hasNext() ) { String subentryDnStr = ( String ) list.next(); - Name subentryDn = new LdapDN( subentryDnStr ); - Name apDn = ( Name ) subentryDn.clone(); + LdapDN subentryDn = new LdapDN( subentryDnStr ); + LdapDN apDn = ( LdapDN ) subentryDn.clone(); apDn.remove( apDn.size() - 1 ); SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn ); @@ -504,9 +504,9 @@ * attributes we remove from the entry in a modify operation. * ---------------------------------------------------------------- */ - Name apName = ( Name ) name.clone(); + LdapDN apName = ( LdapDN ) name.clone(); apName.remove( name.size() - 1 ); - Name baseDn = ( Name ) apName.clone(); + LdapDN baseDn = ( LdapDN ) apName.clone(); baseDn.addAll( ss.getBase() ); ExprNode filter = new PresenceNode( "objectclass" ); @@ -549,7 +549,7 @@ * are, false otherwise * @throws NamingException if there are errors while searching the directory */ - private boolean hasAdministrativeDescendant( Name name ) throws NamingException + private boolean hasAdministrativeDescendant( LdapDN name ) throws NamingException { ExprNode filter = new PresenceNode( "administrativeRole" ); SearchControls controls = new SearchControls(); @@ -647,11 +647,11 @@ if ( objectClasses.contains( "subentry" ) ) { SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( name.toString() ); - Name apName = ( Name ) name.clone(); + LdapDN apName = ( LdapDN ) name.clone(); apName.remove( apName.size() - 1 ); - Name baseDn = ( Name ) apName.clone(); + LdapDN baseDn = ( LdapDN ) apName.clone(); baseDn.addAll( ss.getBase() ); - Name newName = ( Name ) name.clone(); + LdapDN newName = ( LdapDN ) name.clone(); newName.remove( newName.size() - 1 ); LdapDN rdn = new LdapDN( newRn ); @@ -716,11 +716,11 @@ if ( objectClasses.contains( "subentry" ) ) { SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( oriChildName.toString() ); - Name apName = ( Name ) oriChildName.clone(); + LdapDN apName = ( LdapDN ) oriChildName.clone(); apName.remove( apName.size() - 1 ); - Name baseDn = ( Name ) apName.clone(); + LdapDN baseDn = ( LdapDN ) apName.clone(); baseDn.addAll( ss.getBase() ); - Name newName = ( Name ) newParentName.clone(); + LdapDN newName = ( LdapDN ) newParentName.clone(); newName.remove( newName.size() - 1 ); LdapDN rdn = new LdapDN( newRn ); @@ -785,11 +785,11 @@ if ( objectClasses.contains( "subentry" ) ) { SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( oriChildName.toString() ); - Name apName = ( Name ) oriChildName.clone(); + LdapDN apName = ( LdapDN ) oriChildName.clone(); apName.remove( apName.size() - 1 ); - Name baseDn = ( Name ) apName.clone(); + LdapDN baseDn = ( LdapDN ) apName.clone(); baseDn.addAll( ss.getBase() ); - Name newName = ( Name ) newParentName.clone(); + LdapDN newName = ( LdapDN ) newParentName.clone(); newName.remove( newName.size() - 1 ); newName.add( newParentName.get( newParentName.size() - 1 ) ); @@ -872,9 +872,9 @@ next.modify( name, modOp, mods ); // search for all entries selected by the old SS and remove references to subentry - Name apName = ( Name ) name.clone(); + LdapDN apName = ( LdapDN ) name.clone(); apName.remove( apName.size() - 1 ); - Name oldBaseDn = ( Name ) apName.clone(); + LdapDN oldBaseDn = ( LdapDN ) apName.clone(); oldBaseDn.addAll( ssOld.getBase() ); ExprNode filter = new PresenceNode( "objectClass" ); SearchControls controls = new SearchControls(); @@ -899,7 +899,7 @@ Attributes apAttrs = nexus.lookup( apName ); Attribute administrativeRole = apAttrs.get( "administrativeRole" ); Attributes operational = getSubentryOperatationalAttributes( name, administrativeRole ); - Name newBaseDn = ( Name ) apName.clone(); + LdapDN newBaseDn = ( LdapDN ) apName.clone(); newBaseDn.addAll( ssNew.getBase() ); subentries = nexus.search( newBaseDn, factoryCfg.getEnvironment(), filter, controls ); while ( subentries.hasMore() ) @@ -958,9 +958,9 @@ next.modify( name, mods ); // search for all entries selected by the old SS and remove references to subentry - Name apName = ( Name ) name.clone(); + LdapDN apName = ( LdapDN ) name.clone(); apName.remove( apName.size() - 1 ); - Name oldBaseDn = ( Name ) apName.clone(); + LdapDN oldBaseDn = ( LdapDN ) apName.clone(); oldBaseDn.addAll( ssOld.getBase() ); ExprNode filter = new PresenceNode( "objectClass" ); SearchControls controls = new SearchControls(); @@ -985,7 +985,7 @@ Attributes apAttrs = nexus.lookup( apName ); Attribute administrativeRole = apAttrs.get( "administrativeRole" ); Attributes operational = getSubentryOperatationalAttributes( name, administrativeRole ); - Name newBaseDn = ( Name ) apName.clone(); + LdapDN newBaseDn = ( LdapDN ) apName.clone(); newBaseDn.addAll( ssNew.getBase() ); subentries = nexus.search( newBaseDn, factoryCfg.getEnvironment(), filter, controls ); while ( subentries.hasMore() ) Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original) +++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Mon Jun 5 10:15:23 2006 @@ -21,7 +21,6 @@ import java.util.*; -import javax.naming.Name; import javax.naming.NamingException; import javax.naming.Context; import javax.naming.NamingEnumeration; @@ -35,15 +34,13 @@ import org.apache.directory.server.core.DirectoryService; import org.apache.directory.server.core.DirectoryServiceConfiguration; import org.apache.directory.server.core.DirectoryServiceListener; -import org.apache.directory.server.core.authz.support.MaxImmSubFilter; -import org.apache.directory.server.core.authz.support.OperationScope; import org.apache.directory.server.core.jndi.DeadContext; import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy; import org.apache.directory.shared.ldap.aci.ACITuple; import org.apache.directory.shared.ldap.aci.AuthenticationLevel; import org.apache.directory.shared.ldap.aci.ProtectedItem; import org.apache.directory.shared.ldap.filter.ExprNode; -import org.apache.directory.shared.ldap.name.LdapName; +import org.apache.directory.shared.ldap.name.LdapDN; /** @@ -57,8 +54,8 @@ private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() ); private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() ); - private static final Name ROOTDSE_NAME = new LdapName(); - private static final Name ENTRY_NAME; + private static final LdapDN ROOTDSE_NAME = new LdapDN(); + private static final LdapDN ENTRY_NAME; private static final Collection PROTECTED_ITEMS = new ArrayList(); private static final Attributes ENTRY = new BasicAttributes(); @@ -66,7 +63,7 @@ { try { - ENTRY_NAME = new LdapName( "ou=test, ou=system" ); + ENTRY_NAME = new LdapDN( "ou=test, ou=system" ); } catch ( NamingException e ) { @@ -154,15 +151,15 @@ } - public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls ) + public NamingEnumeration search( LdapDN base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException { return new BogusEnumeration( count ); } - public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls, - Collection bypass ) throws NamingException + public NamingEnumeration search( LdapDN base, Map env, ExprNode filter, SearchControls searchCtls, + Collection bypass ) throws NamingException { return new BogusEnumeration( count ); } Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java (original) +++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java Mon Jun 5 10:15:23 2006 @@ -49,6 +49,7 @@ import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem; import org.apache.directory.shared.ldap.filter.PresenceNode; import org.apache.directory.shared.ldap.name.LdapName; +import org.apache.directory.shared.ldap.name.LdapDN; /** @@ -62,8 +63,8 @@ private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() ); private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() ); - private static final Name GROUP_NAME; - private static final Name USER_NAME; + private static final LdapDN GROUP_NAME; + private static final LdapDN USER_NAME; private static final Set USER_NAMES = new HashSet(); private static final Set GROUP_NAMES = new HashSet(); @@ -78,8 +79,8 @@ { try { - GROUP_NAME = new LdapName( "ou=test,ou=groups,ou=system" ); - USER_NAME = new LdapName( "ou=test, ou=users, ou=system" ); + GROUP_NAME = new LdapDN( "ou=test,ou=groups,ou=system" ); + USER_NAME = new LdapDN( "ou=test, ou=users, ou=system" ); filterA = new RelatedProtectedItemFilter( new RefinementEvaluator( new RefinementLeafEvaluator( OID_REGISTRY ) ), new ExpressionEvaluator( OID_REGISTRY, ATTR_TYPE_REGISTRY_A ) ); @@ -273,11 +274,11 @@ Collection tuples = getTuples( new ProtectedItem.RangeOfValues( new PresenceNode( "attrA" ) ) ); Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, - new LdapName( "ou=testEntry" ), null, null, entry, null ).size() ); + new LdapDN( "ou=testEntry" ), null, null, entry, null ).size() ); entry.remove( "attrA" ); Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME, - null, null, new LdapName( "ou=testEntry" ), null, null, entry, null ).size() ); + null, null, new LdapDN( "ou=testEntry" ), null, null, entry, null ).size() ); } Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java (original) +++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java Mon Jun 5 10:15:23 2006 @@ -38,6 +38,7 @@ import org.apache.directory.shared.ldap.aci.AuthenticationLevel; import org.apache.directory.shared.ldap.aci.UserClass; import org.apache.directory.shared.ldap.name.LdapName; +import org.apache.directory.shared.ldap.name.LdapDN; /** @@ -51,8 +52,8 @@ private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() ); private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() ); - private static final Name GROUP_NAME; - private static final Name USER_NAME; + private static final LdapDN GROUP_NAME; + private static final LdapDN USER_NAME; private static final Set USER_NAMES = new HashSet(); private static final Set GROUP_NAMES = new HashSet(); @@ -64,8 +65,8 @@ { try { - GROUP_NAME = new LdapName( "ou=test,ou=groups,ou=system" ); - USER_NAME = new LdapName( "ou=test, ou=users, ou=system" ); + GROUP_NAME = new LdapDN( "ou=test,ou=groups,ou=system" ); + USER_NAME = new LdapDN( "ou=test, ou=users, ou=system" ); } catch ( NamingException e ) { @@ -100,7 +101,7 @@ Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, AuthenticationLevel.NONE, USER_NAME, null, null, null, null ).size() ); Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, - AuthenticationLevel.NONE, new LdapName( "ou=unrelated" ), null, null, null, null ).size() ); + AuthenticationLevel.NONE, new LdapDN( "ou=unrelated" ), null, null, null, null ).size() ); } @@ -110,7 +111,7 @@ Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, AuthenticationLevel.NONE, null, null, null, null, null ).size() ); Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, - new LdapName( "ou=unrelateduser, ou=users" ), null, AuthenticationLevel.NONE, USER_NAME, null, null, null, + new LdapDN( "ou=unrelateduser, ou=users" ), null, AuthenticationLevel.NONE, USER_NAME, null, null, null, null ).size() ); } Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java (original) +++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java Mon Jun 5 10:15:23 2006 @@ -30,11 +30,9 @@ import org.apache.directory.server.core.jndi.DeadContext; import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy; import org.apache.directory.shared.ldap.filter.ExprNode; -import org.apache.directory.shared.ldap.name.LdapName; import org.apache.directory.shared.ldap.name.LdapDN; import javax.naming.NamingException; -import javax.naming.Name; import javax.naming.NamingEnumeration; import javax.naming.Context; import javax.naming.directory.Attributes; @@ -81,7 +79,7 @@ public void testNoBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -107,7 +105,7 @@ public void testSingleBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -137,7 +135,7 @@ public void testAdjacentDoubleBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -171,7 +169,7 @@ public void testFrontAndBackDoubleBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -201,7 +199,7 @@ public void testDoubleBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -231,7 +229,7 @@ public void testCompleteBypass() throws NamingException { - Name dn = new LdapName( "ou=system" ); + LdapDN dn = new LdapDN( "ou=system" ); Context ctx = new DeadContext(); DirectoryService ds = new MockDirectoryService(); DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds ); @@ -285,24 +283,24 @@ } - public Name getMatchedName( NextInterceptor next, Name name, boolean normalized ) throws NamingException + public LdapDN getMatchedName ( NextInterceptor next, LdapDN name ) throws NamingException { interceptors.add( this ); - return next.getMatchedName( name, normalized ); + return next.getMatchedName( name ); } - public Name getSuffix( NextInterceptor next, Name name, boolean normalized ) throws NamingException + public LdapDN getSuffix ( NextInterceptor next, LdapDN name ) throws NamingException { interceptors.add( this ); - return next.getSuffix( name, normalized ); + return next.getSuffix( name ); } - public Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException + public Iterator listSuffixes ( NextInterceptor next ) throws NamingException { interceptors.add( this ); - return next.listSuffixes( normalized ); + return next.listSuffixes(); } @@ -314,14 +312,14 @@ } - public void removeContextPartition( NextInterceptor next, Name suffix ) throws NamingException + public void removeContextPartition( NextInterceptor next, LdapDN suffix ) throws NamingException { interceptors.add( this ); next.removeContextPartition( suffix ); } - public boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException + public boolean compare( NextInterceptor next, LdapDN name, String oid, Object value ) throws NamingException { interceptors.add( this ); return next.compare( name, oid, value ); @@ -357,14 +355,14 @@ } - public NamingEnumeration list( NextInterceptor next, Name baseName ) throws NamingException + public NamingEnumeration list( NextInterceptor next, LdapDN baseName ) throws NamingException { interceptors.add( this ); return next.list( baseName ); } - public NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter, + public NamingEnumeration search( NextInterceptor next, LdapDN baseName, Map environment, ExprNode filter, SearchControls searchControls ) throws NamingException { interceptors.add( this ); @@ -372,28 +370,28 @@ } - public Attributes lookup( NextInterceptor next, Name name ) throws NamingException + public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException { interceptors.add( this ); return next.lookup( name ); } - public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException + public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException { interceptors.add( this ); return next.lookup( dn, attrIds ); } - public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException + public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException { interceptors.add( this ); return next.hasEntry( name ); } - public boolean isSuffix( NextInterceptor next, Name name ) throws NamingException + public boolean isSuffix( NextInterceptor next, LdapDN name ) throws NamingException { interceptors.add( this ); return next.isSuffix( name ); @@ -423,7 +421,7 @@ } - public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId ) + public void bind( NextInterceptor next, LdapDN bindDn, byte[] credentials, List mechanisms, String saslAuthId ) throws NamingException { interceptors.add( this ); @@ -431,7 +429,7 @@ } - public void unbind( NextInterceptor next, Name bindDn ) throws NamingException + public void unbind( NextInterceptor next, LdapDN bindDn ) throws NamingException { interceptors.add( this ); next.unbind( bindDn ); Modified: directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java (original) +++ directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java Mon Jun 5 10:15:23 2006 @@ -22,6 +22,7 @@ import org.apache.directory.server.core.referral.ReferralLut; import org.apache.directory.shared.ldap.name.LdapName; +import org.apache.directory.shared.ldap.name.LdapDN; import junit.framework.TestCase; @@ -47,7 +48,7 @@ } try { - lut.isReferral( ( Name ) null ); + lut.isReferral( ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -55,7 +56,7 @@ } try { - lut.getFarthestReferralAncestor( ( Name ) null ); + lut.getFarthestReferralAncestor( ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -63,7 +64,7 @@ } try { - lut.getNearestReferralAncestor( ( Name ) null ); + lut.getNearestReferralAncestor( ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -71,7 +72,7 @@ } try { - lut.referralAdded( ( Name ) null ); + lut.referralAdded( ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -87,7 +88,7 @@ } try { - lut.referralDeleted( ( Name ) null ); + lut.referralDeleted( ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -103,7 +104,7 @@ } try { - lut.referralChanged( ( Name ) null, ( Name ) null ); + lut.referralChanged( ( LdapDN ) null, ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -119,7 +120,7 @@ } try { - lut.referralChanged( ( Name ) null, ( String ) null ); + lut.referralChanged( ( LdapDN ) null, ( String ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -127,7 +128,7 @@ } try { - lut.referralChanged( ( String ) null, ( Name ) null ); + lut.referralChanged( ( String ) null, ( LdapDN ) null ); fail( "can't get here" ); } catch ( IllegalArgumentException e ) @@ -139,7 +140,7 @@ public void testUpdateOperations() throws NamingException { String dn = "ou=users,ou=system"; - Name name = new LdapName( dn ); + LdapDN name = new LdapDN( dn ); ReferralLut lut = new ReferralLut(); // some add delete tests @@ -181,7 +182,7 @@ // change (rename and move) tests String newDn = "ou=people,ou=system"; - Name newName = new LdapName( newDn ); + LdapDN newName = new LdapDN( newDn ); assertFalse( lut.isReferral( dn ) ); lut.referralAdded( dn ); @@ -219,10 +220,10 @@ public void testReferralAncestors() throws NamingException { - Name ancestor = new LdapName( "ou=users,ou=system" ); - Name farthest = new LdapName( "ou=system" ); - Name nearest = new LdapName( "ou=apache,ou=users,ou=system" ); - Name testDn = new LdapName( "cn=Alex Karasulu,ou=apache,ou=users,ou=system" ); + LdapDN ancestor = new LdapDN( "ou=users,ou=system" ); + LdapDN farthest = new LdapDN( "ou=system" ); + LdapDN nearest = new LdapDN( "ou=apache,ou=users,ou=system" ); + LdapDN testDn = new LdapDN( "cn=Alex Karasulu,ou=apache,ou=users,ou=system" ); ReferralLut lut = new ReferralLut(); assertNull( lut.getNearestReferralAncestor( testDn ) ); assertNull( lut.getFarthestReferralAncestor( testDn ) ); Modified: directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java?rev=411860&r1=411859&r2=411860&view=diff ============================================================================== --- directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java (original) +++ directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java Mon Jun 5 10:15:23 2006 @@ -89,7 +89,7 @@ requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId() ) ); DirectoryPartitionNexus nexus = service.getConfiguration().getPartitionNexus(); - Iterator list = nexus.listSuffixes( true ); + Iterator list = nexus.listSuffixes(); int launchedWindowCount = 0; while ( list.hasNext() ) {