directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r895401 [3/4] - in /directory: apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/part...
Date Sun, 03 Jan 2010 15:06:06 GMT
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java Sun Jan  3 15:04:50 2010
@@ -310,7 +310,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested Normalizer
-            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -321,7 +321,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -496,7 +496,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested Comparator
-            String msg = "Cannot add the Comparator " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the Comparator " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -507,7 +507,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the Comparator " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the Comparator " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -623,7 +623,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested Normalizer
-            String msg = "Cannot add the Normalizer " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the Normalizer " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -634,7 +634,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the Normalizer " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the Normalizer " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -708,7 +708,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested Syntax
-            String msg = "Cannot add the Syntax " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the Syntax " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -719,7 +719,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the SyntaxChecker " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -759,7 +759,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested MatchingRule
-            String msg = "Cannot add the MatchingRule " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the MatchingRule " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -770,7 +770,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the MatchingRule " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the MatchingRule " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -832,7 +832,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded. We can't create the requested ObjectClass
-            String msg = "Cannot add the ObjectClass " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the ObjectClass " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -843,7 +843,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the ObjectClass " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the ObjectClass " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );
@@ -907,7 +907,7 @@
         if ( !schemaManager.isSchemaLoaded( schemaName ) )
         {
             // The schema is not loaded, this is an error
-            String msg = "Cannot add the AttributeType " + entry.getDn().getUpName() + ", as the associated schema ("
+            String msg = "Cannot add the AttributeType " + entry.getDn().getName() + ", as the associated schema ("
                 + schemaName + " is not loaded";
             LOG.warn( msg );
             throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
@@ -918,7 +918,7 @@
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = "Cannot add the AttributeType " + entry.getDn().getUpName() + " into the registries, "
+            String msg = "Cannot add the AttributeType " + entry.getDn().getName() + " into the registries, "
                 + "as the associated schema (" + schemaName + ") is disabled";
             LOG.info( msg );
             schema = schemaManager.getLoadedSchema( schemaName );

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java Sun Jan  3 15:04:50 2010
@@ -269,7 +269,7 @@
         }
         else
         {
-            matchedDNBytes = StringTools.getBytesUtf8( StringTools.trimLeft( matchedDN.getUpName() ) );
+            matchedDNBytes = StringTools.getBytesUtf8( StringTools.trimLeft( matchedDN.getName() ) );
             ldapResultLength += 1 + TLV.getNbBytes( matchedDNBytes.length ) + matchedDNBytes.length;
         }
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java Sun Jan  3 15:04:50 2010
@@ -242,7 +242,7 @@
      */
     public int computeLength()
     {
-        objectNameBytes = StringTools.getBytesUtf8( entry.getDn().getUpName() );
+        objectNameBytes = StringTools.getBytesUtf8( entry.getDn().getName() );
 
         // The entry
         searchResultEntryLength = 1 + TLV.getNbBytes( objectNameBytes.length ) + objectNameBytes.length;

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlCodec.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlCodec.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlCodec.java Sun Jan  3 15:04:50 2010
@@ -125,7 +125,7 @@
 
         if ( previousDn != null )
         {
-            previousDnBytes = StringTools.getBytesUtf8( previousDn.getUpName() );
+            previousDnBytes = StringTools.getBytesUtf8( previousDn.getName() );
             previousDnLength = 1 + TLV.getNbBytes( previousDnBytes.length ) + previousDnBytes.length;
         }
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java Sun Jan  3 15:04:50 2010
@@ -1102,7 +1102,7 @@
         StringBuilder sb = new StringBuilder();
         
         sb.append( "ClientEntry\n" );
-        sb.append( "    dn: " ).append( dn.getUpName() ).append( '\n' );
+        sb.append( "    dn: " ).append( dn.getName() ).append( '\n' );
         
         // First dump the ObjectClass attribute
         if ( containsAttribute( "objectClass" ) )

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java Sun Jan  3 15:04:50 2010
@@ -356,7 +356,7 @@
     {
         if ( "dn".equalsIgnoreCase( attributeId ) )
         {
-            return new DefaultClientAttribute( "dn", entry.getDn().getUpName() );
+            return new DefaultClientAttribute( "dn", entry.getDn().getName() );
         }
 
         return entry.get( attributeId );

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java Sun Jan  3 15:04:50 2010
@@ -280,7 +280,7 @@
         entry.setChangeType( ChangeType.ModDn );
         entry.setDn( newDn );
         entry.setNewRdn( currentRdn.getUpName() );
-        entry.setNewSuperior( currentParent.getUpName() );
+        entry.setNewSuperior( currentParent.getName() );
         entry.setDeleteOldRdn( false );
         return entry;
     }
@@ -322,7 +322,7 @@
             LdapDN oldSuperior = ( LdapDN ) entry.getDn().clone();
 
             oldSuperior.remove( oldSuperior.size() - 1 );
-            reverted.setNewSuperior( oldSuperior.getUpName() );
+            reverted.setNewSuperior( oldSuperior.getName() );
         }
 
         return reverted;
@@ -388,7 +388,7 @@
             LdapDN oldSuperior = ( LdapDN ) newDn.clone();
 
             oldSuperior.remove( oldSuperior.size() - 1 );
-            reverted.setNewSuperior( oldSuperior.getUpName() );
+            reverted.setNewSuperior( oldSuperior.getName() );
         }
         
         // Delete the newRDN values

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Sun Jan  3 15:04:50 2010
@@ -239,13 +239,13 @@
         if ( entry.getDn() != null )
         {
             // First, dump the DN
-            if ( isLDIFSafe( entry.getDn().getUpName() ) )
+            if ( isLDIFSafe( entry.getDn().getName() ) )
             {
-                sb.append( stripLineToNChars( "dn: " + entry.getDn().getUpName(), length ) );
+                sb.append( stripLineToNChars( "dn: " + entry.getDn().getName(), length ) );
             }
             else
             {
-                sb.append( stripLineToNChars( "dn:: " + encodeBase64( entry.getDn().getUpName() ), length ) );
+                sb.append( stripLineToNChars( "dn:: " + encodeBase64( entry.getDn().getName() ), length ) );
             }
         
             sb.append( '\n' );
@@ -306,13 +306,13 @@
         StringBuilder sb = new StringBuilder();
         
         // First, dump the DN
-        if ( isLDIFSafe( entry.getDn().getUpName() ) )
+        if ( isLDIFSafe( entry.getDn().getName() ) )
         {
             sb.append( stripLineToNChars( "dn: " + entry.getDn(), length ) );
         }
         else
         {
-            sb.append( stripLineToNChars( "dn:: " + encodeBase64( entry.getDn().getUpName() ), length ) );
+            sb.append( stripLineToNChars( "dn:: " + encodeBase64( entry.getDn().getName() ), length ) );
         }
         
         sb.append( '\n' );

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Sun Jan  3 15:04:50 2010
@@ -426,7 +426,7 @@
      */
     public String toString()
     {
-        return normName == null ? "" : normName;
+        return getNormName();
     }
 
 
@@ -588,9 +588,21 @@
 
 
     /**
+     * Get the initial DN
+     *
+     * @return The DN as a String
+     */
+    public String getName()
+    {
+        return ( upName == null ? "" : upName );
+    }
+
+
+    /**
      * Get the initial DN (without normalization)
      *
      * @return The DN as a String
+     * @deprecated
      */
     public String getUpName()
     {
@@ -1165,7 +1177,7 @@
                 {
                     normName = dn.getNormName() + "," + normName;
                     bytes = StringTools.getBytesUtf8( normName );
-                    upName = dn.getUpName() + "," + upName;
+                    upName = dn.getName() + "," + upName;
                 }
             }
             else

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java Sun Jan  3 15:04:50 2010
@@ -57,7 +57,7 @@
      */
     public static void serialize( LdapDN dn, ObjectOutput out ) throws IOException
     {
-        if ( dn.getUpName() == null )
+        if ( dn.getName() == null )
         {
             String message = "Cannot serialize a NULL DN";
             LOG.error( message );
@@ -65,12 +65,12 @@
         }
         
         // Write the UPName
-        out.writeUTF( dn.getUpName() );
+        out.writeUTF( dn.getName() );
         
         // Write the NormName if different
         if ( dn.isNormalized() )
         {
-            if ( dn.getUpName().equals( dn.getNormName() ) )
+            if ( dn.getName().equals( dn.getNormName() ) )
             {
                 out.writeUTF( "" );
             }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java Sun Jan  3 15:04:50 2010
@@ -242,7 +242,7 @@
             buffer.append( "base" );
             buffer.append( ' ' );
             buffer.append( '"' );
-            buffer.append( base.getUpName() );
+            buffer.append( base.getName() );
             buffer.append( '"' );
             buffer.append( ',' );
         }
@@ -278,7 +278,7 @@
                 buffer.append( ':' );
                 buffer.append( ' ' );
                 buffer.append( '"' );
-                buffer.append( dn.getUpName() );
+                buffer.append( dn.getName() );
                 buffer.append( '"' );
 
                 if(it.hasNext())
@@ -302,7 +302,7 @@
                 buffer.append( ':' );
                 buffer.append( ' ' );
                 buffer.append( '"' );
-                buffer.append( dn.getUpName() );
+                buffer.append( dn.getName() );
                 buffer.append( '"' );
 
                 if(it.hasNext())

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java Sun Jan  3 15:04:50 2010
@@ -54,7 +54,7 @@
         
         public String toString()
         {
-            return name + " \"" + ctxName.getUpName() + "\"";
+            return name + " \"" + ctxName.getName() + "\"";
         }
     }
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java Sun Jan  3 15:04:50 2010
@@ -1351,7 +1351,7 @@
 
         if ( dn != null )
         {
-            sb.append( '/' ).append( urlEncode( dn.getUpName(), false ) );
+            sb.append( '/' ).append( urlEncode( dn.getName(), false ) );
 
             if ( attributes.size() != 0 || forceScopeRendering
                 || ( ( scope != SearchControls.OBJECT_SCOPE ) || ( filter != null ) || ( extensionList.size() != 0 ) ) )

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java Sun Jan  3 15:04:50 2010
@@ -194,7 +194,7 @@
 
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
@@ -254,7 +254,7 @@
 
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
@@ -302,7 +302,7 @@
 
         assertTrue( entry.isChangeModify() );
 
-        assertEquals( "dc=example,dc=com", entry.getDn().getUpName() );
+        assertEquals( "dc=example,dc=com", entry.getDn().getName() );
 
         List<Modification> mods = entry.getModificationItems( );
         assertTrue( mods.size() == 1 );
@@ -508,7 +508,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1" ) );
@@ -554,7 +554,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
@@ -600,7 +600,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
@@ -645,7 +645,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes( "UTF-8" ) ) );
@@ -691,7 +691,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getUpName() );
+        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny  ".getBytes( "UTF-8" ) ) );
@@ -746,7 +746,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -775,7 +775,7 @@
         assertTrue( entry.isChangeAdd() );
 
         attr = entry.get( "dn" );
-        assertEquals( "cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com", entry.getDn().getName() );
 
         attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -822,7 +822,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -881,7 +881,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -937,7 +937,7 @@
         LdifEntry entry = (LdifEntry) entries.get( 0 );
         assertTrue( entry.isChangeAdd() );
 
-        assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -1079,7 +1079,7 @@
             {
                 if ( "dn".equalsIgnoreCase( values[i][j][0] ) )
                 {
-                    assertEquals( values[i][j][1], entry.getDn().getUpName() );
+                    assertEquals( values[i][j][1], entry.getDn().getName() );
                 }
                 else
                 {
@@ -1143,7 +1143,7 @@
         {
             if ( "dn".equalsIgnoreCase( values[i][0] ) )
             {
-                assertEquals( values[i][1], entry.getDn().getUpName() );
+                assertEquals( values[i][1], entry.getDn().getName() );
             }
             else if ( "jpegphoto".equalsIgnoreCase( values[i][0] ) )
             {
@@ -1333,7 +1333,7 @@
         {
             if ( "dn".equalsIgnoreCase( values[0][i][0] ) )
             {
-                assertEquals( values[0][i][1], entry.getDn().getUpName() );
+                assertEquals( values[0][i][1], entry.getDn().getName() );
             }
             else if ( "jpegphoto".equalsIgnoreCase( values[0][i][0] ) )
             {
@@ -1358,19 +1358,19 @@
         // Second entry
         entry = (LdifEntry) entries.get( 1 );
         assertTrue( entry.isChangeDelete() );
-        assertEquals( values[1][0][1], entry.getDn().getUpName() );
+        assertEquals( values[1][0][1], entry.getDn().getName() );
 
         // Third entry
         entry = (LdifEntry) entries.get( 2 );
         assertTrue( entry.isChangeModRdn() );
-        assertEquals( values[2][0][1], entry.getDn().getUpName() );
+        assertEquals( values[2][0][1], entry.getDn().getName() );
         assertEquals( values[2][1][0], entry.getNewRdn() );
         assertTrue( entry.isDeleteOldRdn() );
 
         // Forth entry
         entry = (LdifEntry) entries.get( 3 );
         assertTrue( entry.isChangeModDn() );
-        assertEquals( values[3][0][1], entry.getDn().getUpName() );
+        assertEquals( values[3][0][1], entry.getDn().getName() );
         assertEquals( values[3][1][0], entry.getNewRdn() );
         assertFalse( entry.isDeleteOldRdn() );
         assertEquals( values[3][2][0], entry.getNewSuperior() );
@@ -1380,7 +1380,7 @@
         List<Modification> modifs = entry.getModificationItems();
 
         assertTrue( entry.isChangeModify() );
-        assertEquals( values[4][0][1], entry.getDn().getUpName() );
+        assertEquals( values[4][0][1], entry.getDn().getName() );
 
         // "add: postaladdress"
         // "postaladdress: 123 Anystreet $ Sunnyvale, CA $ 94086"
@@ -1417,7 +1417,7 @@
         modifs = entry.getModificationItems();
 
         assertTrue( entry.isChangeModify() );
-        assertEquals( values[5][0][1], entry.getDn().getUpName() );
+        assertEquals( values[5][0][1], entry.getDn().getName() );
 
         // "replace: postaladdress"
         item = (Modification) modifs.get( 0 );
@@ -1450,7 +1450,7 @@
 
         LdifEntry entry = (LdifEntry) entries.get( 0 );
 
-        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
         assertTrue( entry.isChangeDelete() );
 
         // Check the control
@@ -1480,7 +1480,7 @@
 
         LdifEntry entry = (LdifEntry) entries.get( 0 );
 
-        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
         assertTrue( entry.isChangeDelete() );
 
         // Check the control
@@ -1510,7 +1510,7 @@
 
         LdifEntry entry = (LdifEntry) entries.get( 0 );
 
-        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getUpName() );
+        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
         assertTrue( entry.isChangeDelete() );
 
         // Check the control
@@ -1626,7 +1626,7 @@
 
         LdifEntry entry = (LdifEntry) entries.get( 0 );
 
-        assertEquals( "ou=Users, dc=example, dc=com", entry.getDn().getUpName() );
+        assertEquals( "ou=Users, dc=example, dc=com", entry.getDn().getName() );
 
         EntryAttribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -1686,7 +1686,7 @@
 
         LdifEntry entry = (LdifEntry) entries.get( 0 );
 
-        assertEquals( "cn=browseRootAci,dc=example,dc=com", entry.getDn().getUpName() );
+        assertEquals( "cn=browseRootAci,dc=example,dc=com", entry.getDn().getName() );
         EntryAttribute attr = entry.get( "objectClass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( SchemaConstants.SUBENTRY_OC ) );

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifRevertorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifRevertorTest.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifRevertorTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifRevertorTest.java Sun Jan  3 15:04:50 2010
@@ -79,7 +79,7 @@
         LdifEntry reversed = LdifRevertor.reverseAdd( dn );
         
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Delete, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
     }
@@ -109,7 +109,7 @@
         LdifEntry reversed = LdifRevertor.reverseDel( dn, deletedEntry );
         
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Add, reversed.getChangeType() );
         assertNotNull( reversed.getEntry() );
         assertEquals( deletedEntry, reversed.getEntry() );
@@ -138,7 +138,7 @@
                 Collections.<Modification>singletonList( mod ), modifiedEntry );
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -183,7 +183,7 @@
 
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -226,7 +226,7 @@
 
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -275,7 +275,7 @@
 
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -317,7 +317,7 @@
                 Collections.<Modification>singletonList( mod ), modifiedEntry );
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -361,7 +361,7 @@
                 Collections.<Modification>singletonList( mod ), modifiedEntry );
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         
@@ -564,7 +564,7 @@
                 Collections.<Modification>singletonList( mod ), modifiedEntry );
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         List<Modification> mods = reversed.getModificationItems();
@@ -601,7 +601,7 @@
                 Collections.<Modification>singletonList( mod ), modifiedEntry );
 
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
         List<Modification> mods = reversed.getModificationItems();
@@ -632,7 +632,7 @@
         LdapDN dn = new LdapDN( "dc=Emmanuel L\u00c9charny" );
         LdifEntry reversed = LdifRevertor.reverseAdd( dn );
         assertNotNull( reversed );
-        assertEquals( dn.getUpName(), reversed.getDn().getUpName() );
+        assertEquals( dn.getName(), reversed.getDn().getName() );
         assertEquals( ChangeType.Delete, reversed.getChangeType() );
         assertNull( reversed.getEntry() );
     }
@@ -661,7 +661,7 @@
 
         assertNotNull( reversed );
         
-        assertEquals( "cn=john doe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=john doe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModDn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( rdn.getUpName(), reversed.getNewRdn() );
@@ -705,7 +705,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -749,7 +749,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -792,7 +792,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -836,7 +836,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -881,7 +881,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -927,7 +927,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -972,7 +972,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1018,7 +1018,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1062,7 +1062,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1106,7 +1106,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1151,7 +1151,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1196,7 +1196,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=small,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=small,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1204,7 +1204,7 @@
 
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1254,7 +1254,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1299,7 +1299,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=small,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=small,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1307,7 +1307,7 @@
         
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1357,7 +1357,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1404,7 +1404,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small+cn=test+cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test+cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1412,7 +1412,7 @@
 
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1462,7 +1462,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1507,7 +1507,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=small+cn=test+cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test+cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1515,7 +1515,7 @@
 
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1566,7 +1566,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1612,7 +1612,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1620,7 +1620,7 @@
 
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1671,7 +1671,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=plumber,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1717,7 +1717,7 @@
         assertEquals( 2, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=big,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=big,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1725,7 +1725,7 @@
 
         reversed = reverseds.get( 1 );
         
-        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=small+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.Modify, reversed.getChangeType() );
         Modification[] mods = reversed.getModificationItemsArray();
         
@@ -1776,7 +1776,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1822,7 +1822,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=big+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=big+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1868,7 +1868,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=joe+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=joe+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );
@@ -1914,7 +1914,7 @@
         assertEquals( 1, reverseds.size() );
         LdifEntry reversed = reverseds.get( 0 );
         
-        assertEquals( "cn=big+cn=test,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=big+cn=test,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( oldRdn.getUpName(), reversed.getNewRdn() );

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java Sun Jan  3 15:04:50 2010
@@ -415,7 +415,7 @@
         assertEquals( 1, reverseds.size() );
         
         LdifEntry reversed = reverseds.get( 0 );
-        assertEquals( "cn=jack doe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=jack doe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertFalse( reversed.isDeleteOldRdn() );
         assertEquals( "cn=john doe", reversed.getNewRdn() );
@@ -447,7 +447,7 @@
         assertEquals( 1, reverseds.size() );
         
         LdifEntry reversed = reverseds.get( 0 );
-        assertEquals( "cn=jack doe,ou=system", reversed.getDn().getUpName() );
+        assertEquals( "cn=jack doe,ou=system", reversed.getDn().getName() );
         assertEquals( ChangeType.ModRdn, reversed.getChangeType() );
         assertTrue( reversed.isDeleteOldRdn() );
         assertEquals( "cn=john doe", reversed.getNewRdn() );

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java?rev=895401&r1=895400&r2=895401&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java Sun Jan  3 15:04:50 2010
@@ -51,7 +51,7 @@
     public void testLdapDNEmpty() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
-        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getUpName() );
+        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getName() );
     }
 
 
@@ -158,7 +158,7 @@
     public void testLdapDNSimple() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
-        assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getUpName() );
+        assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getName() );
         assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
     }
 
@@ -172,7 +172,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = b, c = d" );
         assertEquals( "a=b,c=d", dn.toString() );
-        assertEquals( "a = b, c = d", dn.getUpName() );
+        assertEquals( "a = b, c = d", dn.getName() );
     }
 
 
@@ -185,7 +185,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
         assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
-        assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getUpName() );
+        assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
 
 
@@ -199,7 +199,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b;c=d,e=f" );
         assertEquals( "a=b,c=d,e=f", dn.toString() );
-        assertEquals( "a=b;c=d,e=f", dn.getUpName() );
+        assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
 
 
@@ -290,7 +290,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty" );
         assertEquals( "12.34.56=azerty", dn.toString() );
-        assertEquals( "12.34.56 = azerty", dn.getUpName() );
+        assertEquals( "12.34.56 = azerty", dn.getName() );
     }
 
 
@@ -304,7 +304,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
         assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
-        assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getUpName() );
+        assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
 
 
@@ -410,7 +410,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        assertEquals( dn, name.getUpName() );
+        assertEquals( dn, name.getName() );
         assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
     }
 
@@ -424,7 +424,7 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        assertEquals( dn, name.getUpName() );
+        assertEquals( dn, name.getName() );
         assertEquals( "c=E\u00e9c", name.toString() );
     }
 
@@ -511,7 +511,7 @@
 
         assertEquals( "RFC1779_1 : ",
             "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US",
-            ( ( LdapDN ) nameRFC1779_1 ).getUpName() );
+            ( ( LdapDN ) nameRFC1779_1 ).getName() );
         assertEquals( "RFC1779_1 : ", "cn=Marshall T. Rose,o=Dover Beach Consulting,l=Santa Clara,st=California,c=US",
             nameRFC1779_1.toString() );
     }
@@ -530,7 +530,7 @@
 
         Name nameRFC2253_1 = parser.parse( "CN=Steve Kille,O=Isode limited,C=GB" );
 
-        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( LdapDN ) nameRFC2253_1 ).getUpName() );
+        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( LdapDN ) nameRFC2253_1 ).getName() );
     }
 
 



Mime
View raw message