directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1070362 [1/2] - in /directory: apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/ apacheds/branches/m1/core-api/src/main/java/o...
Date Mon, 14 Feb 2011 01:45:31 GMT
Author: elecharny
Date: Mon Feb 14 01:45:29 2011
New Revision: 1070362

URL: http://svn.apache.org/viewvc?rev=1070362&view=rev
Log:
o Inverted the SchemaManager and String parameter of the DN constructor
o Removed useless constructors
o Added a Dn.add( int Rdn ) method
o Fixed the server code accordingly to these modifications

Modified:
    directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
    directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/branches/m1/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDnFactory.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
    directory/apacheds/branches/m1/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
    directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java
    directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
    directory/apacheds/branches/m1/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
    directory/apacheds/branches/m1/service/src/main/java/org/apache/directory/server/ApacheDsService.java
    directory/apacheds/branches/m1/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
    directory/shared/branches/m1/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/DnSerializer.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/DnComparator.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UniqueMemberComparator.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DnNormalizer.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/UniqueMemberNormalizer.java

Modified: directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Mon Feb 14 01:45:29 2011
@@ -32,8 +32,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.shared.asn1.util.OID;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
@@ -738,10 +738,10 @@ public class LdapCoreSessionConnection i
 
             if ( modDnRequest.getNewRdn() != null )
             {
-                newRdn = new Dn( modDnRequest.getNewRdn().getName(), schemaManager );
+                newRdn = new Dn( schemaManager, modDnRequest.getNewRdn().getName() );
             }
 
-            Dn oldRdn = new Dn( modDnRequest.getName().getRdn().getName(), schemaManager );
+            Dn oldRdn = new Dn( schemaManager, modDnRequest.getName().getRdn().getName() );
 
             boolean rdnChanged = modDnRequest.getNewRdn() != null
                 && !newRdn.getNormName().equals( oldRdn.getNormName() );

Modified: directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Mon Feb 14 01:45:29 2011
@@ -46,7 +46,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizerAdaptor;
 import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.shared.ldap.model.message.controls.Cascade;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
@@ -54,6 +53,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.message.controls.Cascade;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaUtils;
 import org.apache.directory.shared.util.DateUtils;
@@ -211,7 +211,7 @@ public final class SchemaPartition exten
         // Load apachemeta schema from within the ldap-schema Jar with all the
         // schema it depends on.  This is a minimal mandatory set of schemas.
         // -----------------------------------------------------------------------
-        schemaDn = new Dn( SchemaConstants.OU_SCHEMA, schemaManager );
+        schemaDn = new Dn( schemaManager, SchemaConstants.OU_SCHEMA );
         
         wrapped.setId( ID );
         wrapped.setSuffix(schemaDn);
@@ -236,7 +236,7 @@ public final class SchemaPartition exten
             throw new RuntimeException( e );
         }
 
-        schemaModificationDn = new Dn( ServerDNConstants.SCHEMA_MODIFICATIONS_DN, schemaManager );
+        schemaModificationDn = new Dn( schemaManager, ServerDNConstants.SCHEMA_MODIFICATIONS_DN );
     }
 
 

Modified: directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java (original)
+++ directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java Mon Feb 14 01:45:29 2011
@@ -195,7 +195,7 @@ public class SchemaPartitionDaoImpl impl
 
     private EntryFilteringCursor listSchemas() throws Exception
     {
-        Dn base = new Dn( SchemaConstants.OU_SCHEMA, schemaManager );
+        Dn base = new Dn( schemaManager, SchemaConstants.OU_SCHEMA );
         ExprNode filter = new EqualityNode<String>( OBJECT_CLASS_AT,
             new StringValue( MetaSchemaConstants.META_SCHEMA_OC ) );
 
@@ -213,7 +213,7 @@ public class SchemaPartitionDaoImpl impl
      */
     public Schema getSchema( String schemaName ) throws Exception
     {
-        Dn dn = new Dn( "cn=" + schemaName + ",ou=schema", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=" + schemaName + ",ou=schema" );
         return factory.getSchema( partition.lookup( new LookupOperationContext( null, dn ) ) );
     }
 
@@ -565,7 +565,7 @@ public class SchemaPartitionDaoImpl impl
      */
     public void enableSchema( String schemaName ) throws Exception
     {
-        Dn dn = new Dn( "cn=" + schemaName + ",ou=schema", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=" + schemaName + ",ou=schema" );
         Entry entry = partition.lookup( new LookupOperationContext( null, dn ) );
         EntryAttribute disabledAttr = entry.get( disabledAttributeType );
         List<Modification> mods = new ArrayList<Modification>( 3 );

Modified: directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java (original)
+++ directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java Mon Feb 14 01:45:29 2011
@@ -24,6 +24,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.i18n.I18n;
@@ -31,13 +33,13 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.entry.Modification;
-import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -100,7 +102,7 @@ public class SchemaSynchronizer implemen
         dependenciesAT = registries.getAttributeTypeRegistry()
             .lookup( MetaSchemaConstants.M_DEPENDENCIES_AT );
 
-        ouSchemaDn = new Dn( SchemaConstants.OU_SCHEMA, schemaManager );
+        ouSchemaDn = new Dn( schemaManager, SchemaConstants.OU_SCHEMA );
     }
 
 

Modified: directory/apacheds/branches/m1/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Mon Feb 14 01:45:29 2011
@@ -150,7 +150,7 @@ public class IntegrationUtils
             principalDn = "";
         }
 
-        Dn userDn = new Dn( principalDn, service.getSchemaManager() );
+        Dn userDn = new Dn( service.getSchemaManager(), principalDn );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
 
         if ( dn == null )
@@ -172,7 +172,7 @@ public class IntegrationUtils
             principalDn = "";
         }
 
-        Dn userDn = new Dn( principalDn, service.getSchemaManager() );
+        Dn userDn = new Dn( service.getSchemaManager(), principalDn );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
 
         if ( dn == null )

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java Mon Feb 14 01:45:29 2011
@@ -38,18 +38,18 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.*;
+import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.FilterParser;
 import org.apache.directory.shared.ldap.model.filter.SearchScope;
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -143,7 +143,7 @@ public class AuthorizationServiceAsNonAd
         Modification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
         mods.add( mod );
       
-        Dn userDn = new Dn( "uid=akarasulu,ou=users,ou=system", service.getSchemaManager() );
+        Dn userDn = new Dn( service.getSchemaManager(), "uid=akarasulu,ou=users,ou=system" );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
         CoreSession akarasuluSession = service.getSession( principal );
 

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Mon Feb 14 01:45:29 2011
@@ -62,7 +62,7 @@ public class PartitionConfigurationIT ex
         // Test AddContextPartition
         service.addPartition( partition );
 
-        Dn suffixDn = new Dn( "ou=removable", service.getSchemaManager() );
+        Dn suffixDn = new Dn( service.getSchemaManager(), "ou=removable" );
 
         Entry ctxEntry = LdifUtils.createEntry( service.getSchemaManager(), suffixDn,
             "objectClass: top",

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Mon Feb 14 01:45:29 2011
@@ -603,7 +603,7 @@ public class MetaSyntaxHandlerIT extends
 
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
-        Dn dn = new Dn( getSubschemaSubentryDN(), service.getSchemaManager() );
+        Dn dn = new Dn( service.getSchemaManager(), getSubschemaSubentryDN() );
         Attribute attr = new BasicAttribute( opAttr );
 
         for ( String description : descriptions )

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Mon Feb 14 01:45:29 2011
@@ -77,8 +77,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.comparators.BooleanComparator;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimNormalizer;
-import org.apache.directory.shared.ldap.model.schema.parsers.*;
-import org.apache.directory.shared.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescription;
 import org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescriptionSchemaParser;
@@ -87,7 +85,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.model.schema.parsers.NormalizerDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.apache.directory.shared.util.Base64;
@@ -1923,7 +1923,7 @@ public class SubschemaSubentryIT extends
         Attribute modifiersNameAttr = subentry.get( "modifiersName" );
         Attribute modifyTimestampAttr = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttr );
-        Dn expectedDn = new Dn( "uid=admin,ou=system", service.getSchemaManager() );
+        Dn expectedDn = new Dn( service.getSchemaManager(), "uid=admin,ou=system" );
         assertEquals( expectedDn.getName(), modifiersNameAttr.get() );
         assertNotNull( modifyTimestampAttr );
 
@@ -1959,7 +1959,7 @@ public class SubschemaSubentryIT extends
         Attribute modifiersNameAttrAfter = subentry.get( "modifiersName" );
         Attribute modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
-        expectedDn = new Dn( "uid=admin,ou=system", service.getSchemaManager() );
+        expectedDn = new Dn( service.getSchemaManager(), "uid=admin,ou=system" );
         assertEquals( expectedDn.getName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
 

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDnFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDnFactory.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDnFactory.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDnFactory.java Mon Feb 14 01:45:29 2011
@@ -99,7 +99,7 @@ public class DefaultDnFactory implements
         {
             LOG.debug( "Dn {} not found in the cache, creating", dn );
 
-            cachedDn = new Dn( dn, schemaManager );
+            cachedDn = new Dn( schemaManager, dn );
 
             if ( dnCache != null )
             {

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java Mon Feb 14 01:45:29 2011
@@ -67,9 +67,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
@@ -755,7 +755,7 @@ public class AdministrativePointIntercep
     {
         List<Entry> entries = new ArrayList<Entry>();
 
-        Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+        Dn adminDn = new Dn( schemaManager, ServerDNConstants.ADMIN_SYSTEM_DN );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -1139,7 +1139,7 @@ public class AdministrativePointIntercep
         // Load all the AdministratvePoint :
         // Autonomous Administrative Point first, then Specific
         // administrative point, finally the Inner administrative Point
-        Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+        Dn adminDn = new Dn( schemaManager, ServerDNConstants.ADMIN_SYSTEM_DN );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Mon Feb 14 01:45:29 2011
@@ -74,13 +74,13 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.StringValue;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.model.exception.LdapOperationErrorException;
 import org.apache.directory.shared.ldap.model.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.model.filter.EqualityNode;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.OrNode;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.normalizers.ConcreteNameComponentNormalizer;
@@ -178,7 +178,7 @@ public class AciAuthorizationInterceptor
     private void initTupleCache() throws LdapException
     {
         // Load all the prescriptiveACI : they are stored in AccessControlSubentry entries
-        Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+        Dn adminDn = new Dn( schemaManager, ServerDNConstants.ADMIN_SYSTEM_DN );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -222,7 +222,7 @@ public class AciAuthorizationInterceptor
     private void initGroupCache() throws LdapException
     {
         // Load all the member/uniqueMember : they are stored in groupOfNames/groupOfUniqueName
-        Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+        Dn adminDn = new Dn( schemaManager, ServerDNConstants.ADMIN_SYSTEM_DN );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java Mon Feb 14 01:45:29 2011
@@ -359,7 +359,7 @@ public class DefaultSchemaService implem
     {
         try
         {
-            schemaModificationAttributesDn = new Dn( ServerDNConstants.SCHEMA_MODIFICATIONS_DN, getSchemaManager() );
+            schemaModificationAttributesDn = new Dn( getSchemaManager(), ServerDNConstants.SCHEMA_MODIFICATIONS_DN );
         }
         catch ( LdapException e )
         {

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Mon Feb 14 01:45:29 2011
@@ -49,8 +49,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.normalizers.ConcreteNameComponentNormalizer;
 import org.apache.directory.shared.ldap.model.schema.registries.AbstractSchemaLoader;
-import org.apache.directory.shared.ldap.model.schema.registries.Schema;
 import org.apache.directory.shared.ldap.model.schema.registries.Registries;
+import org.apache.directory.shared.ldap.model.schema.registries.Schema;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -88,7 +88,7 @@ public class PartitionSchemaLoader exten
 
     private void initializeSchemas() throws Exception
     {
-        Dn dn = new Dn( SchemaConstants.OU_SCHEMA, schemaManager );
+        Dn dn = new Dn( schemaManager, SchemaConstants.OU_SCHEMA );
 
         // Check that the ou=schema entry exists
         if ( !partition.hasEntry( new EntryOperationContext( null, dn ) ) )

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java Mon Feb 14 01:45:29 2011
@@ -94,7 +94,7 @@ public class SchemaLdifToPartitionExtrac
         this.schemaManager = schemaManager;
         this.partition = partition;
 
-        Dn dn = new Dn( SchemaConstants.OU_SCHEMA, schemaManager );
+        Dn dn = new Dn( schemaManager, SchemaConstants.OU_SCHEMA );
         EntryOperationContext hasEntryContext = new EntryOperationContext( null, dn );
         if ( partition.hasEntry( hasEntryContext ) )
         {

Modified: directory/apacheds/branches/m1/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original)
+++ directory/apacheds/branches/m1/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Mon Feb 14 01:45:29 2011
@@ -126,7 +126,7 @@ public class JdbmStoreTest
             fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors()) );
         }
 
-        EXAMPLE_COM = new Dn( "dc=example,dc=com", schemaManager );
+        EXAMPLE_COM = new Dn( schemaManager, "dc=example,dc=com" );
 
         OU_AT = schemaManager.getAttributeType( SchemaConstants.OU_AT );
         DC_AT = schemaManager.getAttributeType( SchemaConstants.DC_AT );
@@ -212,7 +212,7 @@ public class JdbmStoreTest
         store2.init( schemaManager );
 
         // inject context entry
-        Dn suffixDn = new Dn( "dc=example,dc=com", schemaManager );
+        Dn suffixDn = new Dn( schemaManager, "dc=example,dc=com" );
         Entry entry = new DefaultEntry( schemaManager, suffixDn );
         entry.add( "objectClass", "top", "domain" );
         entry.add( "dc", "example" );
@@ -489,7 +489,7 @@ public class JdbmStoreTest
     @Test
     public void testFreshStore() throws Exception
     {
-        Dn dn = new Dn( "o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "o=Good Times Co." );
         assertEquals( 1L, ( long ) store.getEntryId( dn ) );
         assertEquals( 11, store.count() );
         assertEquals( "o=Good Times Co.", store.getEntryDn( 1L ).getName() );
@@ -523,7 +523,7 @@ public class JdbmStoreTest
         assertEquals( 10, store.count() );
 
         // add an alias and delete to test dropAliasIndices method
-        Dn dn = new Dn( "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Apache" );
@@ -571,7 +571,7 @@ public class JdbmStoreTest
         assertFalse( cursor.next() );
 
         // dn id 12
-        Dn martinDn = new Dn( "cn=Marting King,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn martinDn = new Dn( schemaManager, "cn=Marting King,ou=Sales,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, martinDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -585,7 +585,7 @@ public class JdbmStoreTest
         assertTrue( cursor.previous() );
         assertEquals( 12, ( long ) cursor.get().getId() );
 
-        Dn newParentDn = new Dn( "ou=Board of Directors,o=Good Times Co.", schemaManager );
+        Dn newParentDn = new Dn( schemaManager, "ou=Board of Directors,o=Good Times Co." );
 
         Dn newDn = newParentDn.add( martinDn.getRdn() );
 
@@ -596,7 +596,7 @@ public class JdbmStoreTest
         assertEquals( 12, ( long ) cursor.get().getId() );
 
         // dn id 13
-        Dn marketingDn = new Dn( "ou=Marketing,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn marketingDn = new Dn( schemaManager, "ou=Marketing,ou=Sales,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, marketingDn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Marketing" );
@@ -605,7 +605,7 @@ public class JdbmStoreTest
         store.add( entry );
 
         // dn id 14
-        Dn jimmyDn = new Dn( "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co.", schemaManager );
+        Dn jimmyDn = new Dn( schemaManager, "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, jimmyDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Marketing" );
@@ -670,7 +670,7 @@ public class JdbmStoreTest
     @Test(expected = LdapNoSuchObjectException.class)
     public void testAddWithoutParentId() throws Exception
     {
-        Dn dn = new Dn( "cn=Marting King,ou=Not Present,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Marting King,ou=Not Present,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Not Present" );
@@ -682,7 +682,7 @@ public class JdbmStoreTest
     @Test(expected = LdapSchemaViolationException.class)
     public void testAddWithoutObjectClass() throws Exception
     {
-        Dn dn = new Dn( "cn=Martin King,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Martin King,ou=Sales,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "ou", "Sales" );
         entry.add( "cn", "Martin King" );
@@ -693,7 +693,7 @@ public class JdbmStoreTest
     @Test
     public void testModifyAddOUAttrib() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -710,7 +710,7 @@ public class JdbmStoreTest
     @Test
     public void testRename() throws Exception
     {
-        Dn dn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -729,7 +729,7 @@ public class JdbmStoreTest
     @Test
     public void testRenameEscaped() throws Exception
     {
-        Dn dn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -743,7 +743,7 @@ public class JdbmStoreTest
 
         store.rename( dn, rdn, true );
 
-        Dn dn2 = new Dn( "sn=Ja\\+es,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn2 = new Dn( schemaManager, "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
@@ -754,7 +754,7 @@ public class JdbmStoreTest
     @Test
     public void testMove() throws Exception
     {
-        Dn childDn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn childDn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
         Entry childEntry = new DefaultEntry( schemaManager, childDn );
         childEntry.add( "objectClass", "top", "person", "organizationalPerson" );
         childEntry.add( "ou", "Engineering" );
@@ -764,16 +764,16 @@ public class JdbmStoreTest
 
         store.add( childEntry );
 
-        Dn parentDn = new Dn( "ou=Sales,o=Good Times Co.", schemaManager );
+        Dn parentDn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );
 
         Rdn rdn = new Rdn( "cn=Ryan" );
 
         store.moveAndRename( childDn, parentDn, rdn, childEntry, true );
 
         // to drop the alias indices
-        childDn = new Dn( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
+        childDn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );
 
-        parentDn = new Dn( "ou=Engineering,o=Good Times Co.", schemaManager );
+        parentDn = new Dn( schemaManager, "ou=Engineering,o=Good Times Co." );
 
         assertEquals( 3, store.getSubAliasIndex().count() );
 
@@ -788,7 +788,7 @@ public class JdbmStoreTest
     @Test
     public void testModifyAdd() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SURNAME_AT, SN_AT );
@@ -818,7 +818,7 @@ public class JdbmStoreTest
     @Test
     public void testModifyReplace() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, SN_AT );
@@ -849,7 +849,7 @@ public class JdbmStoreTest
     @Test
     public void testModifyRemove() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, SN_AT );
@@ -880,7 +880,7 @@ public class JdbmStoreTest
     @Test
     public void testModifyReplaceNonExistingIndexAttribute() throws Exception
     {
-        Dn dn = new Dn( "cn=Tim B,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Tim B,ou=Sales,o=Good Times Co." );
         Entry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "cn", "Tim B" );
@@ -938,7 +938,7 @@ public class JdbmStoreTest
         // do not add ou index this time
         store.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID ) );
 
-        Dn suffixDn = new Dn( "o=Good Times Co.", schemaManager );
+        Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
         store.setSuffixDn( suffixDn );
         // init the store to call deleteUnusedIndexFiles() method
         store.init( schemaManager );

Modified: directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java (original)
+++ directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java Mon Feb 14 01:45:29 2011
@@ -154,7 +154,7 @@ public class LdifPartitionTest
     private ClonedServerEntry createEntry( String dn ) throws Exception
     {
         Entry entry = new DefaultEntry( schemaManager );
-        entry.setDn( new Dn( dn, schemaManager ) );
+        entry.setDn( new Dn( schemaManager, dn ) );
         entry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
         entry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
 
@@ -175,7 +175,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifAddEntries() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -220,7 +220,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifAddExistingEntry() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -274,7 +274,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifDeleteExistingEntry() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -309,7 +309,7 @@ public class LdifPartitionTest
 
         DeleteOperationContext delCtx = new DeleteOperationContext( session );
 
-        Dn dn = new Dn( "dc=test1,dc=test,ou=test,ou=system", schemaManager );
+        Dn dn = new Dn( schemaManager, "dc=test1,dc=test,ou=test,ou=system" );
 
         delCtx.setDn( dn );
 
@@ -326,13 +326,13 @@ public class LdifPartitionTest
         assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn%2bobjectclass=domain" ).exists() );
         assertTrue( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn%2bobjectclass=domain.ldif" ).exists() );
 
-        dn = new Dn( "dc=test2,dc=test,ou=test,ou=system", schemaManager );
+        dn = new Dn( schemaManager, "dc=test2,dc=test,ou=test,ou=system" );
 
         delCtx.setDn( dn );
 
         partition.delete( delCtx );
 
-        dn = new Dn( "dc=mvrdn+objectClass=domain,dc=test,ou=test,ou=system", schemaManager );
+        dn = new Dn( schemaManager, "dc=mvrdn+objectClass=domain,dc=test,ou=test,ou=system" );
 
         delCtx.setDn( dn );
 
@@ -360,7 +360,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifSearchExistingEntry() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -429,10 +429,8 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( "dc=child1,ou=test,ou=system",
-            schemaManager ) ) );
-        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( "dc=child2,ou=test,ou=system",
-            schemaManager ) ) );
+        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=child1,ou=test,ou=system" ) ) );
+        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=child2,ou=test,ou=system" ) ) );
 
         MoveOperationContext moveOpCtx = new MoveOperationContext( session, childEntry1.getDn(), childEntry2.getDn() );
         partition.move( moveOpCtx );
@@ -459,7 +457,7 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, true );
@@ -486,7 +484,7 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, false );
@@ -518,9 +516,9 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
-        Dn childDn2 = new Dn( "dc=child2,ou=test,ou=system", schemaManager );
+        Dn childDn2 = new Dn( schemaManager, "dc=child2,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1,
@@ -548,9 +546,9 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
-        Dn childDn2 = new Dn( "dc=child2,ou=test,ou=system", schemaManager );
+        Dn childDn2 = new Dn( schemaManager, "dc=child2,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1,
@@ -586,7 +584,7 @@ public class LdifPartitionTest
     @Test
     public void testSpecialCharacters() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -614,7 +612,7 @@ public class LdifPartitionTest
     @Test
     public void testControlCharacters() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
@@ -645,7 +643,7 @@ public class LdifPartitionTest
 
     private CoreSession injectEntries() throws Exception
     {
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );

Modified: directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java (original)
+++ directory/apacheds/branches/m1/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java Mon Feb 14 01:45:29 2011
@@ -56,7 +56,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.CsnFactory;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.*;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
@@ -70,17 +70,21 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.ldif.LdifReader;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.name.NameComponentNormalizer;
+import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.normalizers.ConcreteNameComponentNormalizer;
 import org.apache.directory.shared.ldap.schemaextractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schemaextractor.impl.DefaultSchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.util.exception.Exceptions;
 import org.apache.directory.shared.util.Strings;
-import org.junit.*;
+import org.apache.directory.shared.util.exception.Exceptions;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 
@@ -136,7 +140,7 @@ public class SingleFileLdifPartitionTest
 
         defaultCSNFactory = new CsnFactory( 0 );
 
-        Dn adminDn = new Dn( "uid=admin,ou=system", schemaManager );
+        Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
         mockSession = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
 
@@ -164,7 +168,7 @@ public class SingleFileLdifPartitionTest
     private ClonedServerEntry createEntry( String dn ) throws Exception
     {
         Entry entry = new DefaultEntry( schemaManager );
-        entry.setDn( new Dn( dn, schemaManager ) );
+        entry.setDn( new Dn( schemaManager, dn ) );
         entry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
         entry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
 
@@ -680,10 +684,8 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( "dc=child1,ou=test,ou=system",
-            schemaManager ) ) );
-        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( "dc=child2,ou=test,ou=system",
-            schemaManager ) ) );
+        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=child1,ou=test,ou=system" ) ) );
+        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=child2,ou=test,ou=system" ) ) );
 
         MoveOperationContext moveOpCtx = new MoveOperationContext( mockSession, childEntry1.getDn(),
             childEntry2.getDn() );
@@ -705,10 +707,8 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( "dc=grandChild11,dc=child1,ou=test,ou=system",
-            schemaManager ) ) );
-        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( "dc=child2,ou=test,ou=system",
-            schemaManager ) ) );
+        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=grandChild11,dc=child1,ou=test,ou=system" ) ) );
+        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new Dn( schemaManager, "dc=child2,ou=test,ou=system" ) ) );
 
         MoveOperationContext moveOpCtx = new MoveOperationContext( mockSession, childEntry1.getDn(),
             childEntry2.getDn() );
@@ -731,7 +731,7 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( mockSession, childDn1, newRdn, true );
@@ -739,7 +739,7 @@ public class SingleFileLdifPartitionTest
 
         partition = reloadPartition();
 
-        childDn1 = new Dn( "dc=renamedChild1,ou=test,ou=system", schemaManager );
+        childDn1 = new Dn( schemaManager, "dc=renamedChild1,ou=test,ou=system" );
 
         Entry entry = partition.lookup( new LookupOperationContext( mockSession, childDn1 ) );
 
@@ -753,7 +753,7 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( mockSession, childDn1, newRdn, false );
@@ -761,7 +761,7 @@ public class SingleFileLdifPartitionTest
 
         partition = reloadPartition();
 
-        childDn1 = new Dn( "dc=renamedChild1,ou=test,ou=system", schemaManager );
+        childDn1 = new Dn( schemaManager, "dc=renamedChild1,ou=test,ou=system" );
 
         Entry entry = partition.lookup( new LookupOperationContext( mockSession, childDn1 ) );
 
@@ -775,9 +775,9 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
-        Dn childDn2 = new Dn( "dc=child2,ou=test,ou=system", schemaManager );
+        Dn childDn2 = new Dn( schemaManager, "dc=child2,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( mockSession, childDn1,
@@ -786,7 +786,7 @@ public class SingleFileLdifPartitionTest
 
         partition = reloadPartition();
 
-        childDn1 = new Dn( "dc=movedChild1,dc=child2,ou=test,ou=system", schemaManager );
+        childDn1 = new Dn( schemaManager, "dc=movedChild1,dc=child2,ou=test,ou=system" );
 
         Entry entry = partition.lookup( new LookupOperationContext( mockSession, childDn1 ) );
 
@@ -802,9 +802,9 @@ public class SingleFileLdifPartitionTest
     {
         SingleFileLdifPartition partition = injectEntries();
 
-        Dn childDn1 = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
+        Dn childDn1 = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
 
-        Dn childDn2 = new Dn( "dc=child2,ou=test,ou=system", schemaManager );
+        Dn childDn2 = new Dn( schemaManager, "dc=child2,ou=test,ou=system" );
 
         Rdn newRdn = new Rdn( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( mockSession, childDn1,
@@ -813,7 +813,7 @@ public class SingleFileLdifPartitionTest
 
         partition = reloadPartition();
 
-        childDn1 = new Dn( "dc=movedChild1,dc=child2,ou=test,ou=system", schemaManager );
+        childDn1 = new Dn( schemaManager, "dc=movedChild1,dc=child2,ou=test,ou=system" );
 
         Entry entry = partition.lookup( new LookupOperationContext( mockSession, childDn1 ) );
 
@@ -1028,7 +1028,7 @@ public class SingleFileLdifPartitionTest
                 
                 try
                 {
-                    Dn dn = new Dn( "dc=grandChild12,dc=child1,ou=test,ou=system", schemaManager );
+                    Dn dn = new Dn( schemaManager, "dc=grandChild12,dc=child1,ou=test,ou=system" );
 
                     Rdn oldRdn = new Rdn( SchemaConstants.DC_AT + "=" + "grandChild12" );
 
@@ -1084,10 +1084,10 @@ public class SingleFileLdifPartitionTest
                 
                 try
                 {
-                    Dn originalDn = new Dn( "dc=grandChild11,dc=child1,ou=test,ou=system", schemaManager );
+                    Dn originalDn = new Dn( schemaManager, "dc=grandChild11,dc=child1,ou=test,ou=system" );
 
-                    Dn originalParent = new Dn( "dc=child1,ou=test,ou=system", schemaManager );
-                    Dn newParent = new Dn( "dc=child2,ou=test,ou=system", schemaManager );
+                    Dn originalParent = new Dn( schemaManager, "dc=child1,ou=test,ou=system" );
+                    Dn newParent = new Dn( schemaManager, "dc=child2,ou=test,ou=system" );
 
                     Dn tmpDn = originalDn;
                     Dn tmpParentDn = newParent;

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java Mon Feb 14 01:45:29 2011
@@ -75,9 +75,9 @@ public class ModifyDnHandler extends Lda
         try
         {
             SchemaManager schemaManager = session.getCoreSession().getDirectoryService().getSchemaManager();
-            Dn newRdn = new Dn( req.getNewRdn().getName(), schemaManager );
+            Dn newRdn = new Dn( schemaManager, req.getNewRdn().getName() );
             
-            Dn oldRdn = new Dn( req.getName().getRdn().getName(), schemaManager );
+            Dn oldRdn = new Dn( schemaManager, req.getName().getRdn().getName() );
             
             boolean rdnChanged = req.getNewRdn() != null && 
                 ! newRdn.getNormName().equals( oldRdn.getNormName() );

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Mon Feb 14 01:45:29 2011
@@ -1339,7 +1339,7 @@ public class SearchHandler extends LdapR
         DirectoryService ds = session.getCoreSession().getDirectoryService();
         PartitionNexus nexus = ds.getPartitionNexus();
         Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
-        Dn subschemaSubentryDn = new Dn( subschemaSubentry.getString(), ds.getSchemaManager() );
+        Dn subschemaSubentryDn = new Dn( ds.getSchemaManager(), subschemaSubentry.getString() );
         String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
 
         return subschemaSubentryDnNorm.equals( baseNormForm );
@@ -1387,8 +1387,8 @@ public class SearchHandler extends LdapR
             }
 
             // Normalize the Dn to check for same dn
-            Dn urlDn = new Dn( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService()
-                .getSchemaManager() );
+            Dn urlDn = new Dn( session.getCoreSession().getDirectoryService()
+                .getSchemaManager(), ldapUrl.getDn().getName() );
 
             if ( urlDn.getNormName().equals( req.getBase().getNormName() ) )
             {
@@ -1467,8 +1467,8 @@ public class SearchHandler extends LdapR
                 LOG.error( I18n.err( I18n.ERR_165, ref, referralAncestor ) );
             }
 
-            Dn urlDn = new Dn( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService()
-                .getSchemaManager() );
+            Dn urlDn = new Dn( session.getCoreSession().getDirectoryService()
+                .getSchemaManager(), ldapUrl.getDn().getName() );
 
             if ( urlDn.getNormName().equals( referralAncestor.getDn().getNormName() ) )
             {

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java Mon Feb 14 01:45:29 2011
@@ -190,7 +190,7 @@ public class SyncReplConsumer implements
         cookieModLst = new ArrayList<Modification>( 1 );
         cookieModLst.add( cookieMod );
 
-        configEntryDn = new Dn( config.getConfigEntryDn(), schemaManager );
+        configEntryDn = new Dn( schemaManager, config.getConfigEntryDn() );
 
         prepareSyncSearchRequest();
     }
@@ -926,7 +926,7 @@ public class SyncReplConsumer implements
             }
         }
 
-        Dn dn = new Dn( config.getBaseDn(), schemaManager );
+        Dn dn = new Dn( schemaManager, config.getBaseDn() );
 
         LOG.debug( "selecting entries to be deleted using filter {}", filter.toString() );
         EntryFilteringCursor cursor = session.search( dn, SearchScope.SUBTREE, filter,

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java Mon Feb 14 01:45:29 2011
@@ -199,47 +199,43 @@ public class AdministrativePointPersiste
         DnNode<SubschemaAdministrativePoint> ssCache = ldapServer.getDirectoryService().getSubschemaAPCache();
 
         // The ACs
-        AdministrativePoint aap1 = acCache.getElement( new Dn( "ou=AAP1,ou=noAP1,ou=system", schemaManager ) );
+        AdministrativePoint aap1 = acCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
         assertNotNull( aap1 );
 
-        AdministrativePoint aap2 = acCache.getElement( new Dn( "ou=AAP2,ou=system", schemaManager ) );
+        AdministrativePoint aap2 = acCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
         assertNotNull( aap2 );
 
-        AdministrativePoint subAap1 = acCache.getElement( new Dn( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system",
-            schemaManager ) );
+        AdministrativePoint subAap1 = acCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
         assertNotNull( subAap1 );
 
         // The ACs
-        aap1 = caCache.getElement( new Dn( "ou=AAP1,ou=noAP1,ou=system", schemaManager ) );
+        aap1 = caCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
         assertNotNull( aap1 );
 
-        aap2 = caCache.getElement( new Dn( "ou=AAP2,ou=system", schemaManager ) );
+        aap2 = caCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
         assertNotNull( aap2 );
 
-        subAap1 = caCache.getElement( new Dn( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system",
-            schemaManager ) );
+        subAap1 = caCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
         assertNotNull( subAap1 );
 
         // The TEs
-        aap1 = teCache.getElement( new Dn( "ou=AAP1,ou=noAP1,ou=system", schemaManager ) );
+        aap1 = teCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
         assertNotNull( aap1 );
 
-        aap2 = teCache.getElement( new Dn( "ou=AAP2,ou=system", schemaManager ) );
+        aap2 = teCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
         assertNotNull( aap2 );
 
-        subAap1 = teCache.getElement( new Dn( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system",
-            schemaManager ) );
+        subAap1 = teCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
         assertNotNull( subAap1 );
 
         // The SSs
-        aap1 = ssCache.getElement( new Dn( "ou=AAP1,ou=noAP1,ou=system", schemaManager ) );
+        aap1 = ssCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
         assertNotNull( aap1 );
 
-        aap2 = ssCache.getElement( new Dn( "ou=AAP2,ou=system", schemaManager ) );
+        aap2 = ssCache.getElement( new Dn( schemaManager, "ou=AAP2,ou=system" ) );
         assertNotNull( aap2 );
 
-        subAap1 = ssCache.getElement( new Dn( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system",
-            schemaManager ) );
+        subAap1 = ssCache.getElement( new Dn( schemaManager, "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ) );
         assertNotNull( subAap1 );
     }
 }

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Mon Feb 14 01:45:29 2011
@@ -87,7 +87,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.model.entry.*;
+import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
@@ -739,7 +739,7 @@ public class AddIT extends AbstractLdapT
             principalDn = "";
         }
 
-        Dn userDn = new Dn( principalDn, service.getSchemaManager() );
+        Dn userDn = new Dn( service.getSchemaManager(), principalDn );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
 
         if ( dn == null )

Modified: directory/apacheds/branches/m1/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/branches/m1/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Mon Feb 14 01:45:29 2011
@@ -29,6 +29,8 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.Set;
 
+import javax.naming.NamingException;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
@@ -391,7 +393,7 @@ public class ApacheDS
         }
 
 
-        Dn dn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, directoryService.getSchemaManager() );
+        Dn dn = new Dn( directoryService.getSchemaManager(), ServerDNConstants.ADMIN_SYSTEM_DN );
         
         ensureLdifFileBase();
 

Modified: directory/apacheds/branches/m1/service/src/main/java/org/apache/directory/server/ApacheDsService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/service/src/main/java/org/apache/directory/server/ApacheDsService.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/service/src/main/java/org/apache/directory/server/ApacheDsService.java (original)
+++ directory/apacheds/branches/m1/service/src/main/java/org/apache/directory/server/ApacheDsService.java Mon Feb 14 01:45:29 2011
@@ -252,7 +252,7 @@ public class ApacheDsService
         configPartition = new SingleFileLdifPartition();
         configPartition.setId( "config" );
         configPartition.setPartitionPath( confFile.toURI() );
-        configPartition.setSuffix( new Dn( "ou=config", schemaManager ) );
+        configPartition.setSuffix( new Dn( schemaManager, "ou=config" ) );
         configPartition.setSchemaManager( schemaManager );
 
         configPartition.initialize();

Modified: directory/apacheds/branches/m1/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java (original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java Mon Feb 14 01:45:29 2011
@@ -53,7 +53,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
-import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1471,7 +1470,7 @@ public abstract class AbstractStore<E, I
         ID parentId = id;
 
         List<Rdn> rdnList = new ArrayList<Rdn>();
-        String upName = "";
+        StringBuilder upName = new StringBuilder();
         String normName = "";
 
         do
@@ -1484,12 +1483,12 @@ public abstract class AbstractStore<E, I
                 if ( rdnList.isEmpty() )
                 {
                     normName = rdn.getNormName();
-                    upName = rdn.getName();
+                    upName.append( rdn.getName() );
                 }
                 else
                 {
                     normName = normName + "," + rdn.getNormName();
-                    upName = upName + "," + rdn.getName();
+                    upName.append( ',' ).append( rdn.getName() );
                 }
 
                 rdnList.add( rdn );
@@ -1499,7 +1498,7 @@ public abstract class AbstractStore<E, I
         }
         while ( !parentId.equals( getRootId() ) );
 
-        Dn dn = new Dn( upName, normName, Strings.getBytesUtf8(normName), rdnList );
+        Dn dn = new Dn( schemaManager, upName.toString() );
 
         return dn;
     }
@@ -1785,7 +1784,7 @@ public abstract class AbstractStore<E, I
         ID ancestorId; // Id of an alias entry relative
 
         // Access aliasedObjectName, normalize it and generate the Name
-        normalizedAliasTargetDn = new Dn( aliasTarget, schemaManager );
+        normalizedAliasTargetDn = new Dn( schemaManager, aliasTarget );
 
         /*
          * Check For Cycles
@@ -1923,7 +1922,7 @@ public abstract class AbstractStore<E, I
     protected void dropAliasIndices( ID aliasId ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        ID targetId = getEntryId( new Dn( targetDn, schemaManager ) );
+        ID targetId = getEntryId( new Dn( schemaManager, targetDn ) );
 
         if ( targetId == null )
         {
@@ -1995,7 +1994,7 @@ public abstract class AbstractStore<E, I
     protected void dropAliasIndices( ID aliasId, Dn movedBase ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        ID targetId = getEntryId( new Dn( targetDn, schemaManager ) );
+        ID targetId = getEntryId( new Dn( schemaManager, targetDn ) );
         Dn aliasDn = getEntryDn( aliasId );
 
         /*

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java (original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java Mon Feb 14 01:45:29 2011
@@ -109,7 +109,7 @@ public class AbstractStoreTest
             fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors()) );
         }
 
-        EXAMPLE_COM = new Dn( "dc=example,dc=com", schemaManager );
+        EXAMPLE_COM = new Dn( schemaManager, "dc=example,dc=com" );
         
         OU_AT = schemaManager.getAttributeType( SchemaConstants.OU_AT );
         CN_AT = schemaManager.getAttributeType( SchemaConstants.CN_AT );
@@ -167,7 +167,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyAddObjectClass() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -200,7 +200,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveIndexedAttribute() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -234,7 +234,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveAllIndexedAttribute() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -267,7 +267,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveObjectClass() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -300,7 +300,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveAllObjectClass() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -329,7 +329,7 @@ public class AbstractStoreTest
     @Test
     public void testCheckCsnIndexUpdate() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         AttributeType csnAt = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT );



Mime
View raw message