directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1062306 [8/32] - in /directory: apacheds-manuals/trunk/src/advanced-user-guide/ apacheds-manuals/trunk/src/basic-user-guide/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/trunk/core-api/sr...
Date Sun, 23 Jan 2011 01:17:26 GMT
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java Sun Jan 23 01:17:06 2011
@@ -42,7 +42,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -105,7 +105,7 @@ public class ObjectClassCreateIT extends
         attributes.put( "m-description", "Account Status" );
 
         // Inject the AT
-        DN dn = new DN( "ou=attributeTypes,cn=apachemeta" );
+        Dn dn = new Dn( "ou=attributeTypes,cn=apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=2.16.840.1.113730.3.2.22.249" );
 
         getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
@@ -143,22 +143,22 @@ public class ObjectClassCreateIT extends
         attributes.put( "m-may", "accountStatus" );
 
         // Inject the OC
-        dn = new DN( "ou=objectClasses,cn=apachemeta" );
+        dn = new Dn( "ou=objectClasses,cn=apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=2.16.840.1.113730.3.2.22" );
 
         getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attributes );
     }
 
     /**
-     * Gets relative DN to ou=schema.
+     * Gets relative Dn to ou=schema.
      *
      * @param schemaName the name of the schema
      * @return the dn of the objectClass container
      * @throws NamingException on error
      */
-    private DN getObjectClassContainer( String schemaName ) throws LdapInvalidDnException
+    private Dn getObjectClassContainer( String schemaName ) throws LdapInvalidDnException
     {
-        return new DN( "ou=objectClasses,cn=" + schemaName );
+        return new Dn( "ou=objectClasses,cn=" + schemaName );
     }
 
 
@@ -182,7 +182,7 @@ public class ObjectClassCreateIT extends
         // This name is invalid
         attributes.put( "m-name", "http://example.com/users/accounts/L0" );
 
-        DN dn = getObjectClassContainer( "apachemeta" );
+        Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=" + testOID );
 
         try
@@ -217,7 +217,7 @@ public class ObjectClassCreateIT extends
         // This name is invalid
         attributes.put( "m-name", "no-objectClasses" );
 
-        DN dn = getObjectClassContainer( "apachemeta" );
+        Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( MetaSchemaConstants.M_OID_AT + "=" + testOID );
 
         try

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Sun Jan 23 01:17:06 2011
@@ -46,7 +46,7 @@ import javax.naming.directory.SearchResu
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -137,7 +137,7 @@ public class SchemaPersistenceIT extends
 
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
         Attribute attr = new BasicAttribute( opAttr );
 
         for ( String description : descriptions )

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Sun Jan 23 01:17:06 2011
@@ -68,7 +68,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
 import org.apache.directory.shared.ldap.message.ModifyResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
@@ -89,9 +89,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.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;
 import org.apache.directory.shared.util.DateUtils;
-import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -130,7 +130,7 @@ public class SubschemaSubentryIT extends
         LdapConnection conn = getAdminConnection( service );
 
         ModifyRequest modRequest = new ModifyRequestImpl();
-        modRequest.setName( new DN( GLOBAL_SUBSCHEMA_DN ) );
+        modRequest.setName( new Dn( GLOBAL_SUBSCHEMA_DN ) );
         modRequest.add( "attributeTypes", "( 2.5.4.58 NAME 'attributeCertificateAttribute' "
             + " DESC 'attribute certificate use ;binary' SYNTAX 1.3.6.1.4.1.1466.115.121.1.8 )" );
         ModifyResponse response = conn.modify( modRequest );
@@ -286,7 +286,7 @@ public class SubschemaSubentryIT extends
             assertNotNull( attrs );
             SchemaEntityFactory factory = new SchemaEntityFactory();
 
-            Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, DN.EMPTY_DN, service.getSchemaManager() );
+            Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, Dn.EMPTY_DN, service.getSchemaManager() );
 
             SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, serverEntry, service
                 .getSchemaManager().getRegistries(), schemaName );
@@ -1394,7 +1394,7 @@ public class SubschemaSubentryIT extends
     public void testAddAttributeTypeOnDisabledSchema() throws Exception
     {
         disableSchema( "nis" );
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
             + "DESC 'bogus description' SUP name SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
@@ -1424,7 +1424,7 @@ public class SubschemaSubentryIT extends
         assertNotNull( attrs );
         SchemaEntityFactory factory = new SchemaEntityFactory();
 
-        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, DN.EMPTY_DN, service.getSchemaManager() );
+        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, Dn.EMPTY_DN, service.getSchemaManager() );
 
         AttributeType at = factory.getAttributeType( service.getSchemaManager(), serverEntry, service
             .getSchemaManager().getRegistries(), "nis" );
@@ -1449,13 +1449,13 @@ public class SubschemaSubentryIT extends
     public void testAddAttributeTypeOnEnabledSchema() throws Exception
     {
         enableSchema( "nis" );
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
             + "DESC 'bogus description' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute( "attributeTypes", substrate ) );
 
-        getRootContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getRootContext( service ).modifyAttributes( JndiUtils.toName(dn), mods );
 
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "attributeTypes" );
@@ -1487,7 +1487,7 @@ public class SubschemaSubentryIT extends
         assertNotNull( attrs );
         SchemaEntityFactory factory = new SchemaEntityFactory();
 
-        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, DN.EMPTY_DN, service.getSchemaManager() );
+        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, Dn.EMPTY_DN, service.getSchemaManager() );
 
         AttributeType at = factory.getAttributeType( service.getSchemaManager(), serverEntry, service
             .getSchemaManager().getRegistries(), "nis" );
@@ -1510,7 +1510,7 @@ public class SubschemaSubentryIT extends
     public void testAddAttributeTypeWithSpaceDesc() throws Exception
     {
         enableSchema( "nis" );
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
             + "DESC '  ' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
@@ -1551,7 +1551,7 @@ public class SubschemaSubentryIT extends
         assertNotNull( attrs );
         SchemaEntityFactory factory = new SchemaEntityFactory();
 
-        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, DN.EMPTY_DN, service.getSchemaManager() );
+        Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, Dn.EMPTY_DN, service.getSchemaManager() );
 
         AttributeType at = factory.getAttributeType( service.getSchemaManager(), serverEntry, service
             .getSchemaManager().getRegistries(), "nis" );
@@ -1923,8 +1923,8 @@ 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() );
-        assertEquals( expectedDN.getName(), modifiersNameAttr.get() );
+        Dn expectedDn = new Dn( "uid=admin,ou=system", service.getSchemaManager() );
+        assertEquals( expectedDn.getName(), modifiersNameAttr.get() );
         assertNotNull( modifyTimestampAttr );
 
         Calendar cal = Calendar.getInstance( tz );
@@ -1937,7 +1937,7 @@ public class SubschemaSubentryIT extends
         // now update the schema information: add a new attribute type
 
         enableSchema( "nis" );
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
             + "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
@@ -1959,8 +1959,8 @@ 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() );
-        assertEquals( expectedDN.getName(), modifiersNameAttrAfter.get() );
+        expectedDn = new Dn( "uid=admin,ou=system", service.getSchemaManager() );
+        assertEquals( expectedDn.getName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
 
         cal = Calendar.getInstance( tz );
@@ -2010,9 +2010,9 @@ public class SubschemaSubentryIT extends
         modifiersNameAttrAfter = subentry.get( "modifiersName" );
         modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
-        expectedDN = new DN( "cn=bogus user,ou=system" );
-        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
-        assertEquals( expectedDN.getNormName(), modifiersNameAttrAfter.get() );
+        expectedDn = new Dn( "cn=bogus user,ou=system" );
+        expectedDn.normalize( service.getSchemaManager().getNormalizerMapping() );
+        assertEquals( expectedDn.getNormName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
 
         cal = Calendar.getInstance( tz );
@@ -2030,7 +2030,7 @@ public class SubschemaSubentryIT extends
 
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
-        DN dn = new DN( getSubschemaSubentryDN() );
+        Dn dn = new Dn( getSubschemaSubentryDN() );
 
         // Uses ModificationItem to keep the modification ordering
         ModificationItem[] modifications = new ModificationItem[descriptions.size()];

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java Sun Jan 23 01:17:06 2011
@@ -61,7 +61,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -222,7 +222,7 @@ public class SubentryServiceIT extends A
 
     public Entry getSubentry( String dn ) throws Exception
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass: subentry",
+        Entry subentry = LdifUtils.createEntry( new Dn( dn ), "objectClass: top", "objectClass: subentry",
             "objectClass: collectiveAttributeSubentry", "subtreeSpecification: { base \"ou=configuration\" }",
             "c-o: Test Org", "cn: testsubentry" );
 
@@ -248,7 +248,7 @@ public class SubentryServiceIT extends A
 
     public Entry getTestSubentryWithExclusion( String dn ) throws LdapException
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ),
+        Entry subentry = LdifUtils.createEntry( new Dn( dn ),
             "objectClass: top",
             "objectClass: subentry",
             "objectClass: collectiveAttributeSubentry",
@@ -274,7 +274,7 @@ public class SubentryServiceIT extends A
     private void addAdministrativeRole( LdapConnection connection, String dn, String role ) throws Exception
     {
         ModifyRequest modifyRequest = new ModifyRequestImpl();
-        modifyRequest.setName( new DN( dn ) );
+        modifyRequest.setName( new Dn( dn ) );
         modifyRequest.add( "administrativeRole", role );
         connection.modify( modifyRequest );
     }
@@ -402,7 +402,7 @@ public class SubentryServiceIT extends A
         LdapConnection connection = IntegrationUtils.getAdminConnection( service );
 
         // Add the subentry
-        Entry subEntryA = LdifUtils.createEntry( new DN( "cn=testsubentryA,dc=AP-A,dc=test,ou=system" ),
+        Entry subEntryA = LdifUtils.createEntry( new Dn( "cn=testsubentryA,dc=AP-A,dc=test,ou=system" ),
             "objectClass: top", "objectClass: subentry", "objectClass: collectiveAttributeSubentry",
             "subtreeSpecification: {}", // All the entry from the AP, including the AP
             "c-o: Test Org", "cn: testsubentryA" );
@@ -444,7 +444,7 @@ public class SubentryServiceIT extends A
 
         // Now add another subentry on AP-B
         // Add the subentry
-        Entry subEntryB = LdifUtils.createEntry( new DN( "cn=testsubentryB,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system" ),
+        Entry subEntryB = LdifUtils.createEntry( new Dn( "cn=testsubentryB,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system" ),
             "objectClass: top", "objectClass: subentry", "objectClass: collectiveAttributeSubentry",
             "subtreeSpecification: {}", // All the entry from the AP, including the AP
             "c-o: Test Org", "cn: testsubentryB" );
@@ -1270,8 +1270,8 @@ public class SubentryServiceIT extends A
         // except subentries disappear
         SubentriesControl ctl = new SubentriesControl();
         ctl.setVisibility( true );
-        sysRoot.setRequestControls( JndiUtils.toJndiControls( new Control[]
-            { ctl } ) );
+        sysRoot.setRequestControls( JndiUtils.toJndiControls(new Control[]
+                {ctl}) );
         list = sysRoot.search( "", "(objectClass=*)", searchControls );
         SearchResult result = list.next();
         assertFalse( list.hasMore() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java Sun Jan 23 01:17:06 2011
@@ -23,7 +23,7 @@ package org.apache.directory.server.core
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,7 +50,7 @@ public class BackupUtilitiesSP
     public static void backupDeleted( CoreSession session, ClonedServerEntry deletedEntry ) throws Exception
     {
         LOG.info( "User \"" + session.getEffectivePrincipal() + "\" has deleted entry \"" + deletedEntry + "\"" );
-        DN backupDn = new DN ( "ou=backupContext,ou=system" );
+        Dn backupDn = new Dn( "ou=backupContext,ou=system" );
         String deletedEntryRdn = deletedEntry.getDn().get( deletedEntry.getDn().size() - 1 );
         Entry entry = ( Entry ) deletedEntry.getOriginalEntry().clone();
         backupDn = backupDn.add( deletedEntryRdn );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/ListUtilsSP.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/ListUtilsSP.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/ListUtilsSP.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/ListUtilsSP.java Sun Jan 23 01:17:06 2011
@@ -25,7 +25,7 @@ import javax.naming.directory.DirContext
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -40,7 +40,7 @@ public class ListUtilsSP
     private static final Logger LOG = LoggerFactory.getLogger( ListUtilsSP.class );
 
 
-    public static void subscribeToGroup( DN addedEntryName, LdapContext groupCtx ) throws NamingException
+    public static void subscribeToGroup( Dn addedEntryName, LdapContext groupCtx ) throws NamingException
     {
         LOG.info( "User \"" + addedEntryName + "\" will be subscribed to \"" + groupCtx + "\"" );
         groupCtx.modifyAttributes("", DirContext.ADD_ATTRIBUTE,

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java Sun Jan 23 01:17:06 2011
@@ -34,7 +34,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.apache.directory.shared.util.Strings;
 
@@ -51,11 +51,11 @@ public class CoreContextFactory implemen
     public synchronized Context getInitialContext( Hashtable env ) throws NamingException
     {
         env = ( Hashtable<String, Object> ) env.clone();
-        DN principalDn = null;
+        Dn principalDn = null;
         
         try
         {
-            principalDn = new DN( getPrincipal( env ) );
+            principalDn = new Dn( getPrincipal( env ) );
         }
         catch ( LdapInvalidDnException lide )
         {
@@ -85,7 +85,7 @@ public class CoreContextFactory implemen
         }
         catch ( Exception e )
         {
-            JndiUtils.wrap( e );
+            JndiUtils.wrap(e);
         }
 
         // check to make sure we have access to the specified dn in provider URL

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java Sun Jan 23 01:17:06 2011
@@ -29,7 +29,7 @@ import javax.naming.NamingException;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -43,8 +43,8 @@ public class LdapJndiProperties
 {
     private static final String SASL_AUTHID = "java.naming.security.sasl.authorizationId";
 
-    private DN providerDn;
-    private DN bindDn;
+    private Dn providerDn;
+    private Dn bindDn;
     private String saslAuthId;
     private AuthenticationLevel level;
     private String saslMechanism;
@@ -130,13 +130,13 @@ public class LdapJndiProperties
 
         if ( url.trim().equals( "" ) )
         {
-            props.providerDn = DN.EMPTY_DN;
+            props.providerDn = Dn.EMPTY_DN;
         }
         else
         {
             try
             {
-                props.providerDn = new DN( url );
+                props.providerDn = new Dn( url );
             }
             catch ( LdapInvalidDnException lide )
             {
@@ -201,7 +201,7 @@ public class LdapJndiProperties
         }
         else if ( principal == null && props.level == AuthenticationLevel.NONE )
         {
-            props.bindDn = DN.EMPTY_DN;
+            props.bindDn = Dn.EMPTY_DN;
         }
         else if ( !( principal instanceof String ) )
         {
@@ -209,13 +209,13 @@ public class LdapJndiProperties
         }
         else if ( ( ( String ) principal ).trim().equals( "" ) )
         {
-            props.bindDn = DN.EMPTY_DN;
+            props.bindDn = Dn.EMPTY_DN;
         }
         else
         {
             try
             {
-                props.providerDn = new DN( ( String ) principal );
+                props.providerDn = new Dn( ( String ) principal );
             }
             catch ( LdapInvalidDnException lide )
             {
@@ -268,13 +268,13 @@ public class LdapJndiProperties
     }
 
 
-    public DN getBindDn()
+    public Dn getBindDn()
     {
         return bindDn;
     }
 
 
-    public DN getProviderDn()
+    public Dn getProviderDn()
     {
         return providerDn;
     }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Sun Jan 23 01:17:06 2011
@@ -121,9 +121,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.AVA;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Ava;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.entry.AttributeUtils;
@@ -138,7 +138,7 @@ import org.apache.directory.shared.util.
  */
 public abstract class ServerContext implements EventContext
 {
-    /** property key used for deleting the old RDN on a rename */
+    /** property key used for deleting the old Rdn on a rename */
     public static final String DELETE_OLD_RDN_PROP = JndiPropertyConstants.JNDI_LDAP_DELETE_RDN;
 
     /** Empty array of controls for use in dealing with them */
@@ -157,7 +157,7 @@ public abstract class ServerContext impl
     private final Hashtable<String, Object> env;
 
     /** The distinguished name of this Context */
-    private final DN dn;
+    private final Dn dn;
 
     /** The set of registered NamingListeners */
     private final Map<NamingListener,DirectoryListener> listeners =
@@ -331,7 +331,7 @@ public abstract class ServerContext impl
      * @param entry
      * @param target
      */
-    protected void doAddOperation( DN target, Entry entry ) throws Exception
+    protected void doAddOperation( Dn target, Entry entry ) throws Exception
     {
         // setup the op context and populate with request controls
         AddOperationContext opCtx = new AddOperationContext( session, entry );
@@ -355,7 +355,7 @@ public abstract class ServerContext impl
      * Used to encapsulate [de]marshalling of controls before and after delete operations.
      * @param target
      */
-    protected void doDeleteOperation( DN target ) throws Exception
+    protected void doDeleteOperation( Dn target ) throws Exception
     {
         // setup the op context and populate with request controls
         DeleteOperationContext opCtx = new DeleteOperationContext( session, target );
@@ -564,7 +564,7 @@ public abstract class ServerContext impl
      * @param searchControls
      * @return NamingEnumeration
      */
-    protected EntryFilteringCursor doSearchOperation( DN dn, AliasDerefMode aliasDerefMode,
+    protected EntryFilteringCursor doSearchOperation( Dn dn, AliasDerefMode aliasDerefMode,
         ExprNode filter, SearchControls searchControls ) throws Exception
     {
         OperationManager operationManager = service.getOperationManager();
@@ -607,7 +607,7 @@ public abstract class ServerContext impl
 
             if ( result )
             {
-                Entry emptyEntry = new DefaultEntry( service.getSchemaManager(), DN.EMPTY_DN );
+                Entry emptyEntry = new DefaultEntry( service.getSchemaManager(), Dn.EMPTY_DN );
                 return new BaseEntryFilteringCursor( new SingletonCursor<Entry>( emptyEntry ), searchContext );
             }
             else
@@ -643,7 +643,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after list operations.
      */
-    protected EntryFilteringCursor doListOperation( DN target ) throws Exception
+    protected EntryFilteringCursor doListOperation( Dn target ) throws Exception
     {
         // setup the op context and populate with request controls
         ListOperationContext listContext = new ListOperationContext( session, target );
@@ -661,7 +661,7 @@ public abstract class ServerContext impl
     }
 
 
-    protected Entry doGetRootDSEOperation( DN target ) throws Exception
+    protected Entry doGetRootDSEOperation( Dn target ) throws Exception
     {
         GetRootDSEOperationContext getRootDseContext = new GetRootDSEOperationContext( session, target );
         getRootDseContext.addRequestControls( convertControls( true, requestControls ) );
@@ -676,7 +676,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after lookup operations.
      */
-    protected Entry doLookupOperation( DN target ) throws Exception
+    protected Entry doLookupOperation( Dn target ) throws Exception
     {
         // setup the op context and populate with request controls
         // execute lookup/getRootDSE operation
@@ -695,7 +695,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after lookup operations.
      */
-    protected Entry doLookupOperation( DN target, String[] attrIds ) throws Exception
+    protected Entry doLookupOperation( Dn target, String[] attrIds ) throws Exception
     {
         // setup the op context and populate with request controls
         // execute lookup/getRootDSE operation
@@ -723,7 +723,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after bind operations.
      */
-    protected BindOperationContext doBindOperation( DN bindDn, byte[] credentials, String saslMechanism,
+    protected BindOperationContext doBindOperation( Dn bindDn, byte[] credentials, String saslMechanism,
         String saslAuthId ) throws Exception
     {
         // setup the op context and populate with request controls
@@ -748,11 +748,11 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after moveAndRename operations.
      */
-    protected void doMoveAndRenameOperation( DN oldDn, DN parent, RDN newRdn, boolean delOldDn )
+    protected void doMoveAndRenameOperation( Dn oldDn, Dn parent, Rdn newRdn, boolean delOldDn )
         throws Exception
     {
         // setup the op context and populate with request controls
-        MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( session, oldDn, parent, new RDN(
+        MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( session, oldDn, parent, new Rdn(
             newRdn ), delOldDn );
         moveAndRenameContext.addRequestControls( convertControls( true, requestControls ) );
 
@@ -772,7 +772,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after modify operations.
      */
-    protected void doModifyOperation( DN dn, List<Modification> modifications ) throws Exception
+    protected void doModifyOperation( Dn dn, List<Modification> modifications ) throws Exception
     {
         // setup the op context and populate with request controls
         ModifyOperationContext modifyContext = new ModifyOperationContext( session, dn, modifications );
@@ -794,7 +794,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after moveAndRename operations.
      */
-    protected void doMove( DN oldDn, DN target ) throws Exception
+    protected void doMove( Dn oldDn, Dn target ) throws Exception
     {
         // setup the op context and populate with request controls
         MoveOperationContext moveContext = new MoveOperationContext( session, oldDn, target );
@@ -816,7 +816,7 @@ public abstract class ServerContext impl
     /**
      * Used to encapsulate [de]marshalling of controls before and after rename operations.
      */
-    protected void doRename( DN oldDn, RDN newRdn, boolean delOldRdn ) throws Exception
+    protected void doRename( Dn oldDn, Rdn newRdn, boolean delOldRdn ) throws Exception
     {
         // setup the op context and populate with request controls
         RenameOperationContext renameContext = new RenameOperationContext( session, oldDn, newRdn, delOldRdn );
@@ -881,7 +881,7 @@ public abstract class ServerContext impl
      *
      * @return the distinguished name of this Context's entry.
      */
-    protected DN getDn()
+    protected Dn getDn()
     {
         return dn;
     }
@@ -963,7 +963,7 @@ public abstract class ServerContext impl
      */
     public Context createSubcontext( Name name ) throws NamingException
     {
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
         Entry serverEntry = null;
 
         try
@@ -985,7 +985,7 @@ public abstract class ServerContext impl
         }
 
         // Now add the CN attribute, which is mandatory
-        RDN rdn = target.getRdn();
+        Rdn rdn = target.getRdn();
 
         if ( rdn != null )
         {
@@ -1050,7 +1050,7 @@ public abstract class ServerContext impl
      */
     public void destroySubcontext( Name name ) throws NamingException
     {
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         if ( target.size() == 0 )
         {
@@ -1077,10 +1077,10 @@ public abstract class ServerContext impl
     }
 
 
-    private void injectRdnAttributeValues( DN target, Entry serverEntry ) throws NamingException
+    private void injectRdnAttributeValues( Dn target, Entry serverEntry ) throws NamingException
     {
-        // Add all the RDN attributes and their values to this entry
-        RDN rdn = target.getRdn( target.size() - 1 );
+        // Add all the Rdn attributes and their values to this entry
+        Rdn rdn = target.getRdn( target.size() - 1 );
 
         if ( rdn.size() == 1 )
         {
@@ -1088,7 +1088,7 @@ public abstract class ServerContext impl
         }
         else
         {
-            for ( AVA atav : rdn )
+            for ( Ava atav : rdn )
             {
                 serverEntry.put( atav.getUpType(), atav.getUpValue() );
             }
@@ -1104,7 +1104,7 @@ public abstract class ServerContext impl
         // First, use state factories to do a transformation
         DirStateFactory.Result res = DirectoryManager.getStateToBind( obj, name, this, env, null );
 
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         // let's be sure that the Attributes is case insensitive
         Entry outServerEntry = null;
@@ -1266,8 +1266,8 @@ public abstract class ServerContext impl
      */
     public void rename( Name oldName, Name newName ) throws NamingException
     {
-        DN oldDn = buildTarget( JndiUtils.fromName( oldName ) );
-        DN newDn = buildTarget( JndiUtils.fromName( newName ) );
+        Dn oldDn = buildTarget( JndiUtils.fromName( oldName ) );
+        Dn newDn = buildTarget( JndiUtils.fromName( newName ) );
 
         if ( oldDn.size() == 0 )
         {
@@ -1275,7 +1275,7 @@ public abstract class ServerContext impl
         }
 
         // calculate parents
-        DN oldParent = oldDn;
+        Dn oldParent = oldDn;
 
         try
         {
@@ -1286,7 +1286,7 @@ public abstract class ServerContext impl
             throw new NamingException( I18n.err( I18n.ERR_313, lide.getMessage() ) );
         }
 
-        DN newParent = newDn;
+        Dn newParent = newDn;
 
         try
         {
@@ -1298,8 +1298,8 @@ public abstract class ServerContext impl
         }
 
 
-        RDN oldRdn = oldDn.getRdn();
-        RDN newRdn = newDn.getRdn();
+        Rdn oldRdn = oldDn.getRdn();
+        Rdn newRdn = newDn.getRdn();
         boolean delOldRdn = true;
 
         /*
@@ -1315,11 +1315,11 @@ public abstract class ServerContext impl
 
         /*
          * We need to determine if this rename operation corresponds to a simple
-         * RDN name change or a move operation.  If the two names are the same
-         * except for the RDN then it is a simple modifyRdn operation.  If the
+         * Rdn name change or a move operation.  If the two names are the same
+         * except for the Rdn then it is a simple modifyRdn operation.  If the
          * names differ in size or have a different baseDN then the operation is
-         * a move operation.  Furthermore if the RDN in the move operation
-         * changes it is both an RDN change and a move operation.
+         * a move operation.  Furthermore if the Rdn in the move operation
+         * changes it is both an Rdn change and a move operation.
          */
         if ( oldParent.equals( newParent ) )
         {
@@ -1374,7 +1374,7 @@ public abstract class ServerContext impl
      */
     public void rebind( Name name, Object obj ) throws NamingException
     {
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
         OperationManager operationManager = service.getOperationManager();
 
         try
@@ -1440,7 +1440,7 @@ public abstract class ServerContext impl
     public Object lookup( Name name ) throws NamingException
     {
         Object obj;
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         Entry serverEntry = null;
 
@@ -1535,7 +1535,7 @@ public abstract class ServerContext impl
             {
                 try
                 {
-                    return JndiUtils.toName( new DN( name ) );
+                    return JndiUtils.toName( new Dn( name ) );
                 }
                 catch ( LdapInvalidDnException lide )
                 {
@@ -1562,7 +1562,7 @@ public abstract class ServerContext impl
             {
                 try
                 {
-                    return JndiUtils.toName( new DN( name.toString() ) );
+                    return JndiUtils.toName( new Dn( name.toString() ) );
                 }
                 catch ( LdapInvalidDnException lide )
                 {
@@ -1593,7 +1593,7 @@ public abstract class ServerContext impl
     {
         try
         {
-            return new NamingEnumerationAdapter( doListOperation( buildTarget( JndiUtils.fromName( name ) ) ) );
+            return new NamingEnumerationAdapter( doListOperation( buildTarget( JndiUtils.fromName(name) ) ) );
         }
         catch ( Exception e )
         {
@@ -1622,7 +1622,7 @@ public abstract class ServerContext impl
     public NamingEnumeration listBindings( Name name ) throws NamingException
     {
         // Conduct a special one level search at base for all objects
-        DN base = buildTarget( JndiUtils.fromName( name ) );
+        Dn base = buildTarget( JndiUtils.fromName( name ) );
         PresenceNode filter = new PresenceNode( OBJECT_CLASS_AT );
         SearchControls ctls = new SearchControls();
         ctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1676,7 +1676,7 @@ public abstract class ServerContext impl
          */
 
         // 1). Find the Dn for name and walk it from the head to tail
-        DN fqn = buildTarget( JndiUtils.fromName( name ) );
+        Dn fqn = buildTarget( JndiUtils.fromName( name ) );
         String head = prefix.get( 0 );
 
         // 2). Walk the fqn trying to match for the head of the prefix
@@ -1779,19 +1779,19 @@ public abstract class ServerContext impl
     // ------------------------------------------------------------------------
 
     /**
-     * Clones this context's DN and adds the components of the name relative to
-     * this context to the left hand side of this context's cloned DN.
+     * Clones this context's Dn and adds the components of the name relative to
+     * this context to the left hand side of this context's cloned Dn.
      *
      * @param relativeName a name relative to this context.
      * @return the name of the target
      * @throws InvalidNameException if relativeName is not a valid name in
      *      the LDAP namespace.
      */
-    DN buildTarget( DN relativeName ) throws NamingException
+    Dn buildTarget( Dn relativeName ) throws NamingException
     {
-        DN target = dn;
+        Dn target = dn;
 
-        // Add to left hand side of cloned DN the relative name arg
+        // Add to left hand side of cloned Dn the relative name arg
         try
         {
             relativeName.normalize( schemaManager );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Sun Jan 23 01:17:06 2011
@@ -74,9 +74,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.AVA;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Ava;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.entry.AttributeUtils;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.apache.directory.shared.util.Strings;
@@ -343,7 +343,7 @@ public abstract class ServerDirContext e
             return;
         }
 
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         Entry serverEntry = null;
 
@@ -526,7 +526,7 @@ public abstract class ServerDirContext e
      */
     public void rebind( Name name, Object obj, Attributes attrs ) throws NamingException
     {
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         try
         {
@@ -566,8 +566,8 @@ public abstract class ServerDirContext e
             return ( DirContext ) super.createSubcontext( name );
         }
 
-        DN target = buildTarget( JndiUtils.fromName( name ) );
-        RDN rdn = target.getRdn( target.size() - 1 );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
+        Rdn rdn = target.getRdn( target.size() - 1 );
 
         attrs = AttributeUtils.toCaseInsensitive( attrs );
         Attributes attributes = ( Attributes ) attrs.clone();
@@ -577,7 +577,7 @@ public abstract class ServerDirContext e
             String rdnAttribute = rdn.getUpType();
             String rdnValue = rdn.getUpValue().getString();
 
-            // Add the RDN attribute
+            // Add the Rdn attribute
             boolean doRdnPut = attributes.get( rdnAttribute ) == null;
             doRdnPut = doRdnPut || attributes.get( rdnAttribute ).size() == 0;
 
@@ -591,11 +591,11 @@ public abstract class ServerDirContext e
         }
         else
         {
-            for ( Iterator<AVA> ii = rdn.iterator(); ii.hasNext(); /**/)
+            for ( Iterator<Ava> ii = rdn.iterator(); ii.hasNext(); /**/)
             {
-                AVA atav = ii.next();
+                Ava atav = ii.next();
 
-                // Add the RDN attribute
+                // Add the Rdn attribute
                 boolean doRdnPut = attributes.get( atav.getNormType() ) == null;
                 doRdnPut = doRdnPut || attributes.get( atav.getNormType() ).size() == 0;
 
@@ -717,7 +717,7 @@ public abstract class ServerDirContext e
         throws NamingException
     {
         SearchControls ctls = new SearchControls();
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         // If we need to return specific attributes add em to the SearchControls
         if ( null != attributesToReturn )
@@ -774,7 +774,7 @@ public abstract class ServerDirContext e
                 }
                 catch ( Exception e )
                 {
-                    JndiUtils.wrap( e );
+                    JndiUtils.wrap(e);
                     return null; // shut compiler up
                 }
             }
@@ -807,13 +807,13 @@ public abstract class ServerDirContext e
 
             /*
              * With 1 or more value we build a set of simple nodes and add them
-             * to the AND node - each attribute value pair is a simple AVA node.
+             * to the AND node - each attribute value pair is a simple Ava node.
              */
             for ( int ii = 0; ii < attr.size(); ii++ )
             {
                 Object val = attr.get( ii );
 
-                // Add simpel AVA node if its value is a String
+                // Add simpel Ava node if its value is a String
                 if ( val instanceof String )
                 {
                     node = new EqualityNode<String>( attr.getID(), new StringValue( ( String ) val ) );
@@ -861,7 +861,7 @@ public abstract class ServerDirContext e
     public NamingEnumeration<SearchResult> search( Name name, ExprNode filter, SearchControls cons )
         throws NamingException
     {
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
         AliasDerefMode aliasDerefMode = AliasDerefMode.getEnum( getEnvironment() );
         try
         {
@@ -883,7 +883,7 @@ public abstract class ServerDirContext e
         throws NamingException
     {
         ExprNode filterNode;
-        DN target = buildTarget( JndiUtils.fromName( name ) );
+        Dn target = buildTarget( JndiUtils.fromName( name ) );
 
         try
         {

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Sun Jan 23 01:17:06 2011
@@ -37,14 +37,14 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.entry.BinaryValue;
 import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -184,7 +184,7 @@ public class ServerLdapContext extends S
      * permission is not allowed for this operation or the oid is not recognized,
      * or the attribute is not present in the entry ... you get the picture.
      */
-    public boolean compare( DN name, String oid, Object value ) throws NamingException
+    public boolean compare( Dn name, String oid, Object value ) throws NamingException
     {
         Value<?> val = null;
 
@@ -246,7 +246,7 @@ public class ServerLdapContext extends S
         }
         catch ( Exception e )
         {
-            JndiUtils.wrap( e );
+            JndiUtils.wrap(e);
         }
 
         // extract the response controls from the operation and return

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java Sun Jan 23 01:17:06 2011
@@ -65,8 +65,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
 import org.apache.directory.shared.util.Strings;
@@ -237,7 +237,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value ) throws LdapException
+    public boolean compare( Dn dn, String oid, Object value ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -248,7 +248,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws LdapException
+    public boolean compare( Dn dn, String oid, Object value, boolean ignoreReferral ) throws LdapException
     {
         CompareOperationContext compareContext = new CompareOperationContext( this, dn, oid,
             convertToValue( oid, value ) );
@@ -263,7 +263,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn ) throws LdapException
+    public void delete( Dn dn ) throws LdapException
     {
         delete( dn, LogChange.TRUE );
     }
@@ -272,7 +272,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, LogChange log ) throws LdapException
+    public void delete( Dn dn, LogChange log ) throws LdapException
     {
         DeleteOperationContext deleteContext = new DeleteOperationContext( this, dn );
 
@@ -286,7 +286,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral ) throws LdapException
+    public void delete( Dn dn, boolean ignoreReferral ) throws LdapException
     {
         delete( dn, ignoreReferral, LogChange.TRUE );
     }
@@ -295,7 +295,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws LdapException
+    public void delete( Dn dn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         DeleteOperationContext deleteContext = new DeleteOperationContext( this, dn );
 
@@ -444,9 +444,9 @@ public class DefaultCoreSession implemen
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
+     * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.Dn, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
-    public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
+    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -459,9 +459,9 @@ public class DefaultCoreSession implemen
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
+     * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.Dn, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
-    public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
+    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -478,7 +478,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public Entry lookup( DN dn ) throws LdapException
+    public Entry lookup( Dn dn ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         return operationManager.lookup( new LookupOperationContext( this, dn ) );
@@ -488,7 +488,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( DN dn, String... attrIds ) throws LdapException
+    public Entry lookup( Dn dn, String... attrIds ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         LookupOperationContext lookupContext = new LookupOperationContext( this, dn, attrIds );
@@ -502,7 +502,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( DN dn, Control[] controls, String... attrIds ) throws LdapException
+    public Entry lookup( Dn dn, Control[] controls, String... attrIds ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         LookupOperationContext lookupContext = new LookupOperationContext( this, dn, attrIds );
@@ -521,7 +521,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods ) throws LdapException
+    public void modify( Dn dn, List<Modification> mods ) throws LdapException
     {
         modify( dn, mods, LogChange.TRUE );
     }
@@ -530,7 +530,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, LogChange log ) throws LdapException
+    public void modify( Dn dn, List<Modification> mods, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -556,7 +556,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException
+    public void modify( Dn dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException
     {
         modify( dn, mods, ignoreReferral, LogChange.TRUE );
     }
@@ -565,7 +565,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException
+    public void modify( Dn dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -592,7 +592,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent ) throws LdapException
+    public void move( Dn dn, Dn newParent ) throws LdapException
     {
         move( dn, newParent, LogChange.TRUE );
     }
@@ -601,7 +601,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, LogChange log ) throws LdapException
+    public void move( Dn dn, Dn newParent, LogChange log ) throws LdapException
     {
         MoveOperationContext moveContext = new MoveOperationContext( this, dn, newParent );
         moveContext.setLogChange( log );
@@ -614,7 +614,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, boolean ignoreReferral ) throws Exception
+    public void move( Dn dn, Dn newParent, boolean ignoreReferral ) throws Exception
     {
         move( dn, newParent, ignoreReferral, LogChange.TRUE );
     }
@@ -623,7 +623,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws LdapException
+    public void move( Dn dn, Dn newParent, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         MoveOperationContext moveContext = new MoveOperationContext( this, dn, newParent );
@@ -638,7 +638,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws LdapException
+    public void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn ) throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -647,7 +647,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newSuperiorDn, RDN newRdn, boolean deleteOldRdn, LogChange log )
+    public void moveAndRename( Dn dn, Dn newSuperiorDn, Rdn newRdn, boolean deleteOldRdn, LogChange log )
         throws LdapException
     {
         MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, dn,
@@ -663,7 +663,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral )
+    public void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral )
         throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
@@ -673,7 +673,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral,
+    public void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral,
         LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -690,7 +690,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
+    public void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -699,7 +699,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
+    public void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
     {
         RenameOperationContext renameContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
 
@@ -714,7 +714,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
+    public void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
     }
@@ -723,7 +723,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log )
+    public void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log )
         throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -739,7 +739,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter ) throws LdapException
+    public EntryFilteringCursor search( Dn dn, String filter ) throws LdapException
     {
         return search( dn, filter, true );
     }
@@ -748,7 +748,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws LdapException
+    public EntryFilteringCursor search( Dn dn, String filter, boolean ignoreReferrals ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         ExprNode filterNode = null;
@@ -772,9 +772,9 @@ public class DefaultCoreSession implemen
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
+     * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.Dn, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
-    public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
+    public EntryFilteringCursor search( Dn dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -787,9 +787,9 @@ public class DefaultCoreSession implemen
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
+     * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.Dn, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
-    public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
+    public EntryFilteringCursor search( Dn dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
@@ -865,7 +865,7 @@ public class DefaultCoreSession implemen
     }
 
 
-    public boolean exists( DN dn ) throws LdapException
+    public boolean exists( Dn dn ) throws LdapException
     {
         EntryOperationContext hasEntryContext = new EntryOperationContext( this, dn );
         OperationManager operationManager = directoryService.getOperationManager();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDNFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDNFactory.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDNFactory.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDNFactory.java Sun Jan 23 01:17:06 2011
@@ -25,14 +25,14 @@ import net.sf.ehcache.Cache;
 import net.sf.ehcache.Element;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * The default DN factory implementation.
+ * The default Dn factory implementation.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -55,7 +55,7 @@ public class DefaultDNFactory implements
 
 
     /**
-     * Instantiates a new default DN factory.
+     * Instantiates a new default Dn factory.
      *
      * @param directoryService the directory service
      */
@@ -69,7 +69,7 @@ public class DefaultDNFactory implements
     /**
      * {@inheritDoc}
      */
-    public DN create( String dn ) throws LdapInvalidDnException
+    public Dn create( String dn ) throws LdapInvalidDnException
     {
         if ( dn == null )
         {
@@ -78,10 +78,10 @@ public class DefaultDNFactory implements
 
         if ( dn.trim().length() == 0 )
         {
-            return DN.EMPTY_DN;
+            return Dn.EMPTY_DN;
         }
 
-        DN cachedDN = null;
+        Dn cachedDn = null;
 
         // read the explanation at the above DN_CACHE variable declaration
         // for the reason for performing this check
@@ -91,19 +91,19 @@ public class DefaultDNFactory implements
 
             if ( dnCacheEntry != null )
             {
-                cachedDN = ( DN ) dnCacheEntry.getValue();
+                cachedDn = (Dn) dnCacheEntry.getValue();
             }
         }
 
-        if ( cachedDN == null )
+        if ( cachedDn == null )
         {
-            LOG.debug( "DN {} not found in the cache, creating", dn );
+            LOG.debug( "Dn {} not found in the cache, creating", dn );
 
-            cachedDN = new DN( dn, schemaManager );
+            cachedDn = new Dn( dn, schemaManager );
 
             if ( dnCache != null )
             {
-                dnCache.put( new Element( dn, cachedDN ) );
+                dnCache.put( new Element( dn, cachedDn) );
             }
 
             if ( enableStats )
@@ -113,9 +113,9 @@ public class DefaultDNFactory implements
         }
         else
         {
-            if ( !cachedDN.isNormalized() && ( schemaManager != null ) )
+            if ( !cachedDn.isNormalized() && ( schemaManager != null ) )
             {
-                cachedDN.normalize( schemaManager );
+                cachedDn.normalize( schemaManager );
             }
 
             if ( enableStats )
@@ -124,23 +124,23 @@ public class DefaultDNFactory implements
             }
         }
 
-        LOG.debug( "DN {} found in the cache", dn );
+        LOG.debug( "Dn {} found in the cache", dn );
 
         if ( enableStats )
         {
-            //System.out.println( "DN '" + cachedDN + "' found in the cache and isNormalized " + cachedDN.isNormalized() );
-            System.out.println( "DN cache hit - " + hitCount + ", miss - " + missCount + " and is normalized = "
-                + cachedDN.isNormalized() );
+            //System.out.println( "Dn '" + cachedDn + "' found in the cache and isNormalized " + cachedDn.isNormalized() );
+            System.out.println( "Dn cache hit - " + hitCount + ", miss - " + missCount + " and is normalized = "
+                + cachedDn.isNormalized() );
         }
 
-        return cachedDN;
+        return cachedDn;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public DN create( String... upRdns ) throws LdapInvalidDnException
+    public Dn create( String... upRdns ) throws LdapInvalidDnException
     {
         StringBuilder sb = new StringBuilder();
         for ( String s : upRdns )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sun Jan 23 01:17:06 2011
@@ -80,6 +80,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -97,8 +98,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.ldif.ChangeType;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.util.DateUtils;
@@ -148,7 +148,7 @@ public class DefaultDirectoryService imp
     private OperationManager operationManager = new DefaultOperationManager( this );
 
     /** the distinguished name of the administrative user */
-    private DN adminDn;
+    private Dn adminDn;
 
     /** session used as admin for internal operations */
     private CoreSession adminSession;
@@ -267,7 +267,7 @@ public class DefaultDirectoryService imp
     /** the pwdPolicySubentry AT */
     private AttributeType pwdPolicySubentryAT;
 
-    /** The DN factory */
+    /** The Dn factory */
     private DNFactory dnFactory;
 
     /**
@@ -714,7 +714,7 @@ public class DefaultDirectoryService imp
     }
 
 
-    public CoreSession getSession( DN principalDn, byte[] credentials ) throws LdapException
+    public CoreSession getSession( Dn principalDn, byte[] credentials ) throws LdapException
     {
         if ( ! started )
         {
@@ -730,7 +730,7 @@ public class DefaultDirectoryService imp
     }
 
 
-    public CoreSession getSession( DN principalDn, byte[] credentials, String saslMechanism, String saslAuthId )
+    public CoreSession getSession( Dn principalDn, byte[] credentials, String saslMechanism, String saslAuthId )
         throws Exception
     {
         if ( ! started )
@@ -777,7 +777,7 @@ public class DefaultDirectoryService imp
     /**
      * We handle the ModDN/ModRDN operation for the revert here.
      */
-    private void moddn( DN oldDn, DN newDn, boolean delOldRdn ) throws LdapException
+    private void moddn( Dn oldDn, Dn newDn, boolean delOldRdn ) throws LdapException
     {
         if ( oldDn.size() == 0 )
         {
@@ -785,22 +785,22 @@ public class DefaultDirectoryService imp
         }
 
         // calculate parents
-        DN oldBase = oldDn;
+        Dn oldBase = oldDn;
         oldBase = oldBase.remove( oldDn.size() - 1 );
-        DN newBase = newDn;
+        Dn newBase = newDn;
         newBase = newBase.remove( newDn.size() - 1 );
 
-        // Compute the RDN for each of the DN
-        RDN newRdn = newDn.getRdn( newDn.size() - 1 );
-        RDN oldRdn = oldDn.getRdn( oldDn.size() - 1 );
+        // Compute the Rdn for each of the Dn
+        Rdn newRdn = newDn.getRdn( newDn.size() - 1 );
+        Rdn oldRdn = oldDn.getRdn( oldDn.size() - 1 );
 
         /*
          * We need to determine if this rename operation corresponds to a simple
-         * RDN name change or a move operation.  If the two names are the same
-         * except for the RDN then it is a simple modifyRdn operation.  If the
+         * Rdn name change or a move operation.  If the two names are the same
+         * except for the Rdn then it is a simple modifyRdn operation.  If the
          * names differ in size or have a different baseDN then the operation is
-         * a move operation.  Furthermore if the RDN in the move operation
-         * changes it is both an RDN change and a move operation.
+         * a move operation.  Furthermore if the Rdn in the move operation
+         * changes it is both an Rdn change and a move operation.
          */
         if ( ( oldDn.size() == newDn.size() ) && oldBase.equals( newBase ) )
         {
@@ -808,7 +808,7 @@ public class DefaultDirectoryService imp
         }
         else
         {
-            DN target = newDn;
+            Dn target = newDn;
             target = target.remove( newDn.size() - 1 );
 
             if ( newRdn.equals( oldRdn ) )
@@ -817,7 +817,7 @@ public class DefaultDirectoryService imp
             }
             else
             {
-                adminSession.moveAndRename( oldDn, target, new RDN( newRdn ), delOldRdn );
+                adminSession.moveAndRename( oldDn, target, new Rdn( newRdn ), delOldRdn );
             }
         }
     }
@@ -890,8 +890,8 @@ public class DefaultDirectoryService imp
                             // NO BREAK - both ModDN and ModRDN handling is the same
 
                         case ChangeType.MODRDN_ORDINAL :
-                            DN forwardDn = event.getForwardLdif().getDn();
-                            DN reverseDn = reverse.getDn();
+                            Dn forwardDn = event.getForwardLdif().getDn();
+                            Dn reverseDn = reverse.getDn();
 
                             moddn( reverseDn, forwardDn, reverse.isDeleteOldRdn() );
 
@@ -1153,7 +1153,7 @@ public class DefaultDirectoryService imp
     }
 
 
-    public Entry newEntry( DN dn )
+    public Entry newEntry( Dn dn )
     {
         return new DefaultEntry( schemaManager, dn );
     }
@@ -1209,7 +1209,7 @@ public class DefaultDirectoryService imp
         // create system users area
         // -------------------------------------------------------------------
 
-        DN userDn = getDNFactory().create( ServerDNConstants.USERS_SYSTEM_DN );
+        Dn userDn = getDNFactory().create( ServerDNConstants.USERS_SYSTEM_DN );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, userDn ) ) )
         {
@@ -1234,7 +1234,7 @@ public class DefaultDirectoryService imp
         // create system groups area
         // -------------------------------------------------------------------
 
-        DN groupDn = getDNFactory().create( ServerDNConstants.GROUPS_SYSTEM_DN );
+        Dn groupDn = getDNFactory().create( ServerDNConstants.GROUPS_SYSTEM_DN );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, groupDn ) ) )
         {
@@ -1259,7 +1259,7 @@ public class DefaultDirectoryService imp
         // create administrator group
         // -------------------------------------------------------------------
 
-        DN name = getDNFactory().create( ServerDNConstants.ADMINISTRATORS_GROUP_DN );
+        Dn name = getDNFactory().create( ServerDNConstants.ADMINISTRATORS_GROUP_DN );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, name ) ) )
         {
@@ -1285,7 +1285,7 @@ public class DefaultDirectoryService imp
         // create system configuration area
         // -------------------------------------------------------------------
 
-        DN configurationDn = getDNFactory().create( "ou=configuration,ou=system" );
+        Dn configurationDn = getDNFactory().create( "ou=configuration,ou=system" );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, configurationDn ) ) )
         {
@@ -1307,7 +1307,7 @@ public class DefaultDirectoryService imp
         // create system configuration area for partition information
         // -------------------------------------------------------------------
 
-        DN partitionsDn = getDNFactory().create( "ou=partitions,ou=configuration,ou=system" );
+        Dn partitionsDn = getDNFactory().create( "ou=partitions,ou=configuration,ou=system" );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, partitionsDn ) ) )
         {
@@ -1328,7 +1328,7 @@ public class DefaultDirectoryService imp
         // create system configuration area for services
         // -------------------------------------------------------------------
 
-        DN servicesDn = getDNFactory().create( "ou=services,ou=configuration,ou=system" );
+        Dn servicesDn = getDNFactory().create( "ou=services,ou=configuration,ou=system" );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, servicesDn ) ) )
         {
@@ -1350,7 +1350,7 @@ public class DefaultDirectoryService imp
         // create system configuration area for interceptors
         // -------------------------------------------------------------------
 
-        DN interceptorsDn = getDNFactory().create( "ou=interceptors,ou=configuration,ou=system" );
+        Dn interceptorsDn = getDNFactory().create( "ou=interceptors,ou=configuration,ou=system" );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, interceptorsDn ) ) )
         {
@@ -1372,7 +1372,7 @@ public class DefaultDirectoryService imp
         // create system preferences area
         // -------------------------------------------------------------------
 
-        DN sysPrefRootDn = getDNFactory().create( ServerDNConstants.SYSPREFROOT_SYSTEM_DN );
+        Dn sysPrefRootDn = getDNFactory().create( ServerDNConstants.SYSPREFROOT_SYSTEM_DN );
 
         if ( !partitionNexus.hasEntry( new EntryOperationContext( adminSession, sysPrefRootDn ) ) )
         {
@@ -1406,7 +1406,7 @@ public class DefaultDirectoryService imp
         // Warn if the default password is not changed.
         boolean needToChangeAdminPassword = false;
 
-        DN adminDn = getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
+        Dn adminDn = getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
 
         Entry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession, adminDn ) );
         Value<?> userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
@@ -1489,7 +1489,7 @@ public class DefaultDirectoryService imp
         adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), this );
 
         // @TODO - NOTE: Need to find a way to instantiate without dependency on DPN
-        partitionNexus = new DefaultPartitionNexus( new DefaultEntry( schemaManager, DN.EMPTY_DN ) );
+        partitionNexus = new DefaultPartitionNexus( new DefaultEntry( schemaManager, Dn.EMPTY_DN ) );
         partitionNexus.setDirectoryService( this );
         partitionNexus.initialize( );
 
@@ -1533,7 +1533,7 @@ public class DefaultDirectoryService imp
 
 
     /**
-     * Read an entry (without DN)
+     * Read an entry (without Dn)
      *
      * @param text The ldif format file
      * @return An entry.
@@ -1605,14 +1605,14 @@ public class DefaultDirectoryService imp
      * Create a new Entry
      *
      * @param ldif The String representing the attributes, as a LDIF file
-     * @param dn The DN for this new entry
+     * @param dn The Dn for this new entry
      */
     public Entry newEntry( String ldif, String dn )
     {
         try
         {
             Entry entry = readEntry( ldif );
-            DN newDn = getDNFactory().create( dn );
+            Dn newDn = getDNFactory().create( dn );
 
             entry.setDn( newDn );
 
@@ -1890,7 +1890,7 @@ public class DefaultDirectoryService imp
             
             if ( pwdPolicySubentry != null )
             {
-                DN configDn = getDNFactory().create( pwdPolicySubentry.getString() );
+                Dn configDn = getDNFactory().create( pwdPolicySubentry.getString() );
                 
                 return pwdPolicyContainer.getPolicyConfig( configDn );
             }



Mime
View raw message