directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1073838 - in /directory: apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/ apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/ shared/trunk/integ/src/test/java/org/apac...
Date Wed, 23 Feb 2011 17:24:58 GMT
Author: elecharny
Date: Wed Feb 23 17:24:58 2011
New Revision: 1073838

URL: http://svn.apache.org/viewvc?rev=1073838&view=rev
Log:
o Renaming the Rdn.getAVA() method to getAva()
o Some simplification in the code

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/RdnSerializer.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
Wed Feb 23 17:24:58 2011
@@ -548,7 +548,7 @@ public class OperationalAttributeInterce
             else if ( rdn.size() == 1 )
             {
                 String name = schemaManager.lookupAttributeTypeRegistry( rdn.getNormType()
).getName();
-                String value = rdn.getAVA().getNormValue().getString();
+                String value = rdn.getNormValue().getString();
                 newDn = newDn.add( new Rdn( name, name, value, value ) );
                 continue;
             }

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Wed Feb 23 17:24:58 2011
@@ -597,13 +597,13 @@ public class LdifPartition extends Abstr
         for ( Rdn rdn : dn.getRdns() )
         {
             // First, get the AT name, or OID
-            String normAT = rdn.getAVA().getNormType();
+            String normAT = rdn.getNormType();
             AttributeType at = schemaManager.lookupAttributeTypeRegistry( normAT );
 
             String atName = at.getName();
 
             // Now, get the normalized value
-            String normValue = rdn.getAVA().getNormValue().getString();
+            String normValue = rdn.getNormValue().getString();
 
             if ( isFirst )
             {

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
Wed Feb 23 17:24:58 2011
@@ -2641,14 +2641,14 @@ public class DnTest
         // antlr parser: string value with trailing spaces
         Dn dn1 = new Dn( " cn = Amos\\,Tori , ou=system " );
         assertEquals( " cn = Amos\\,Tori ", dn1.getRdn().getName() );
-        Ava atav1 = dn1.getRdn().getAVA();
+        Ava atav1 = dn1.getRdn().getAva();
         assertEquals( "cn", atav1.getUpType() );
         assertEquals( "Amos,Tori", atav1.getUpValue().getString() );
 
         // antlr parser: hexstring with trailing spaces
         Dn dn3 = new Dn( " cn = #414243 , ou=system " );
         assertEquals( " cn = #414243 ", dn3.getRdn().getName() );
-        Ava atav3 = dn3.getRdn().getAVA();
+        Ava atav3 = dn3.getRdn().getAva();
         assertEquals( "cn", atav3.getUpType() );
         assertEquals( "ABC", atav3.getUpValue().getString() );
         assertTrue( Arrays.equals( Strings.getBytesUtf8("ABC"), atav3.getNormValue().getBytes()
) );
@@ -2656,7 +2656,7 @@ public class DnTest
         // antlr parser:
         Dn dn4 = new Dn( " cn = \\41\\42\\43 , ou=system " );
         assertEquals( " cn = \\41\\42\\43 ", dn4.getRdn().getName() );
-        Ava atav4 = dn4.getRdn().getAVA();
+        Ava atav4 = dn4.getRdn().getAva();
         assertEquals( "cn", atav4.getUpType() );
         assertEquals( "ABC", atav4.getUpValue().getString() );
         assertEquals( "ABC", atav4.getNormValue().getString() );
@@ -2664,7 +2664,7 @@ public class DnTest
         // antlr parser: quotestring with trailing spaces
         Dn dn5 = new Dn( " cn = \"ABC\" , ou=system " );
         assertEquals( " cn = \"ABC\" ", dn5.getRdn().getName() );
-        Ava atav5 = dn5.getRdn().getAVA();
+        Ava atav5 = dn5.getRdn().getAva();
         assertEquals( "cn", atav5.getUpType() );
         assertEquals( "ABC", atav5.getUpValue().getString() );
         assertEquals( "ABC", atav5.getNormValue().getString() );
@@ -2672,7 +2672,7 @@ public class DnTest
         // fast parser: string value with trailing spaces
         Dn dn2 = new Dn( " cn = Amos Tori , ou=system " );
         assertEquals( " cn = Amos Tori ", dn2.getRdn().getName() );
-        Ava atav2 = dn2.getRdn().getAVA();
+        Ava atav2 = dn2.getRdn().getAva();
         assertEquals( "cn", atav2.getUpType() );
         assertEquals( "Amos Tori", atav2.getUpValue().getString() );
     }
@@ -2770,7 +2770,7 @@ public class DnTest
         assertEquals( "Example", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Example ", rdn.getName() );
 
-        Ava atav = rdn.getAVA();
+        Ava atav = rdn.getAva();
 
         assertEquals( "2.5.4.11=example", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -2801,7 +2801,7 @@ public class DnTest
         assertEquals( "  ou  =  Example + ou = TEST ", rdn.getName() );
 
         // The first ATAV
-        Ava atav = rdn.getAVA();
+        Ava atav = rdn.getAva();
 
         assertEquals( "2.5.4.11=example", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -2851,7 +2851,7 @@ public class DnTest
         assertEquals( "Ex+mple", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Ex\\+mple ", rdn.getName() );
 
-        Ava atav = rdn.getAVA();
+        Ava atav = rdn.getAva();
 
         assertEquals( "2.5.4.11=ex\\+mple", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -2886,7 +2886,7 @@ public class DnTest
         assertEquals( "Ex+mple", rdn.getNormValue().getString() );
 
         // The first ATAV
-        Ava atav = rdn.getAVA();
+        Ava atav = rdn.getAva();
 
         assertEquals( "  OU  =  Ex\\+mple ", atav.getUpName() );
         assertEquals( "ou=Ex\\+mple", atav.getNormName() );
@@ -2937,7 +2937,7 @@ public class DnTest
         assertEquals( "ex+mple", rdn.getNormValue().getString() );
 
         // The first ATAV
-        atav = rdn.getAVA();
+        atav = rdn.getAva();
 
         assertEquals( "  OU  =  Ex\\+mple ", atav.getUpName() );
         assertEquals( "2.5.4.11=ex\\+mple", atav.getNormName() );

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java
Wed Feb 23 17:24:58 2011
@@ -500,7 +500,7 @@ public final class LdifRevertor
                 // Is the new Rdn AVAs contained into the entry?
                 for ( Ava atav : newRdn )
                 {
-                    if ( atav.equals( oldRdn.getAVA() ) )
+                    if ( atav.equals( oldRdn.getAva() ) )
                     {
                         // They overlap
                         overlapping = true;

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Wed Feb 23 17:24:58 2011
@@ -880,7 +880,7 @@ public final class Rdn implements Clonea
      *
      * @return The first AttributeTypeAndValue of this Rdn
      */
-    public Ava getAVA()
+    public Ava getAva()
     {
         switch ( nbAtavs )
         {

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/RdnSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/RdnSerializer.java?rev=1073838&r1=1073837&r2=1073838&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/RdnSerializer.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/RdnSerializer.java
Wed Feb 23 17:24:58 2011
@@ -80,10 +80,6 @@ public final class RdnSerializer
             case 0 :
                 break;
 
-            case 1 :
-                AvaSerializer.serialize(rdn.getAVA(), out);
-                break;
-                
             default :
                 for ( Ava atav:rdn )
                 {



Mime
View raw message