directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1097180 - in /directory: apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/ apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ apacheds/trunk/server-integ/src/t...
Date Wed, 27 Apr 2011 16:59:09 GMT
Author: elecharny
Date: Wed Apr 27 16:59:08 2011
New Revision: 1097180

URL: http://svn.apache.org/viewvc?rev=1097180&view=rev
Log:
o Done some methods renaming in LdifUtils

Modified:
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
    directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
    directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java

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=1097180&r1=1097179&r2=1097180&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 Apr 27 16:59:08 2011
@@ -215,7 +215,7 @@ public class LdifPartition extends Abstr
             }
 
             FileWriter fw = new FileWriter( contextEntryFile );
-            fw.write( LdifUtils.convertEntryToLdif( contextEntry ) );
+            fw.write( LdifUtils.convertToLdif( contextEntry ) );
             fw.close();
 
             // And add this entry to the underlying partition
@@ -301,7 +301,7 @@ public class LdifPartition extends Abstr
         try
         {
             FileWriter fw = new FileWriter( getFile( dn, DELETE ) );
-            fw.write( LdifUtils.convertEntryToLdif(modifiedEntry, true) );
+            fw.write( LdifUtils.convertToLdif(modifiedEntry, true) );
             fw.close();
         }
         catch ( IOException ioe )
@@ -709,7 +709,7 @@ public class LdifPartition extends Abstr
         try
         {
             FileWriter fw = new FileWriter( getFile( entry.getDn(), CREATE ) );
-            fw.write( LdifUtils.convertEntryToLdif( entry ) );
+            fw.write( LdifUtils.convertToLdif( entry ) );
             fw.close();
         }
         catch ( IOException ioe )

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Wed Apr 27 16:59:08 2011
@@ -386,7 +386,7 @@ public class SingleFileLdifPartition ext
     {
         synchronized ( lock )
         {
-            String ldif = LdifUtils.convertEntryToLdif( entry );
+            String ldif = LdifUtils.convertToLdif( entry );
             ldifFile.write( Strings.getBytesUtf8(ldif + "\n") );
         }
     }

Modified: directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
Wed Apr 27 16:59:08 2011
@@ -180,7 +180,7 @@ public class SingleFileLdifPartitionTest
     private long getEntryLdifLen( Entry entry ) throws LdapException
     {
         // while writing to the file 1 extra newline char will be added
-        String ldif = LdifUtils.convertEntryToLdif(entry) + 1;
+        String ldif = LdifUtils.convertToLdif(entry) + 1;
         byte[] data = Strings.getBytesUtf8(ldif);
 
         return data.length;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Wed Apr 27 16:59:08 2011
@@ -198,7 +198,7 @@ public class AddIT extends AbstractLdapT
         DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // modify object classes, add two more
-        Attributes attributes = LdifUtils.createAttributes( "objectClass: organizationalPerson",
+        Attributes attributes = LdifUtils.createJndiAttributes( "objectClass: organizationalPerson",
                 "objectClass: inetOrgPerson" );
 
         DirContext person = ( DirContext ) ctx.lookup( RDN );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
Wed Apr 27 16:59:08 2011
@@ -103,7 +103,7 @@ public class ModifyAddIT  extends Abstra
      */
     protected Attributes getPersonAttributes( String sn, String cn ) throws LdapException
     {
-        Attributes attributes = LdifUtils.createAttributes(
+        Attributes attributes = LdifUtils.createJndiAttributes(
             "objectClass: top",
             "objectClass: person",
             "objectClass: organizationalperson",

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
Wed Apr 27 16:59:08 2011
@@ -70,7 +70,7 @@ public class ModifyRdnIT extends Abstrac
      */
     private Attributes getPersonAttributes( String sn, String cn ) throws Exception
     {
-        Attributes attributes = LdifUtils.createAttributes( 
+        Attributes attributes = LdifUtils.createJndiAttributes( 
             "objectClass: top",
             "objectClass: person",
             "cn", cn,
@@ -86,7 +86,7 @@ public class ModifyRdnIT extends Abstrac
      */
     private Attributes getOrganizationalUnitAttributes( String ou ) throws Exception
     {
-        Attributes attributes = LdifUtils.createAttributes(
+        Attributes attributes = LdifUtils.createJndiAttributes(
                 "objectClass: top",
                 "objectClass: organizationalUnit",
                 "ou", ou,
@@ -1022,7 +1022,7 @@ public class ModifyRdnIT extends Abstrac
     {
         DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         
-        Attributes attributes = LdifUtils.createAttributes( 
+        Attributes attributes = LdifUtils.createJndiAttributes( 
             "objectClass: top",
             "objectClass: person",
             "cn: Tori Amos",

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
Wed Apr 27 16:59:08 2011
@@ -104,7 +104,7 @@ public class PersistentSearchIT extends 
      */
     private Attributes getPersonAttributes( String sn, String cn ) throws LdapException
     {
-        Attributes attributes = LdifUtils.createAttributes( 
+        Attributes attributes = LdifUtils.createJndiAttributes( 
             "objectClass: top",
             "objectClass: person",
             "cn", cn,

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
Wed Apr 27 16:59:08 2011
@@ -113,7 +113,7 @@ public class LdapsIT extends AbstractLda
     public void testLdaps() throws Exception
     {
         // Create a person
-        Attributes attributes = LdifUtils.createAttributes(
+        Attributes attributes = LdifUtils.createJndiAttributes(
                 "objectClass: top",
                 "objectClass: person",
                 "cn: The Person",

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java
Wed Apr 27 16:59:08 2011
@@ -193,7 +193,7 @@ public final class LdifUtils
      */
     public static String convertToLdif( Attributes attrs, Dn dn, int length ) throws LdapException
     {
-        return convertEntryToLdif( AttributeUtils.toEntry( attrs, dn ), length );
+        return convertToLdif( AttributeUtils.toEntry( attrs, dn ), length );
     }
 
 
@@ -207,7 +207,7 @@ public final class LdifUtils
      */
     public static String convertToLdif( Attributes attrs, Dn dn ) throws LdapException
     {
-        return convertEntryToLdif( AttributeUtils.toEntry( attrs, dn ), DEFAULT_LINE_LENGTH
);
+        return convertToLdif( AttributeUtils.toEntry( attrs, dn ), DEFAULT_LINE_LENGTH );
     }
 
 
@@ -218,9 +218,9 @@ public final class LdifUtils
      * @return the corresponding LDIF code as a String
      * @throws LdapException If a naming exception is encountered.
      */
-    public static String convertEntryToLdif( Entry entry ) throws LdapException
+    public static String convertToLdif( Entry entry ) throws LdapException
     {
-        return convertEntryToLdif( entry, DEFAULT_LINE_LENGTH );
+        return convertToLdif( entry, DEFAULT_LINE_LENGTH );
     }
 
 
@@ -232,9 +232,9 @@ public final class LdifUtils
      * @return the corresponding LDIF code as a String
      * @throws org.apache.directory.shared.ldap.model.exception.LdapException If a naming
exception is encountered.
      */
-    public static String convertEntryToLdif( Entry entry, boolean includeVersionInfo ) throws
LdapException
+    public static String convertToLdif( Entry entry, boolean includeVersionInfo ) throws
LdapException
     {
-        String ldif = convertEntryToLdif( entry, DEFAULT_LINE_LENGTH );
+        String ldif = convertToLdif( entry, DEFAULT_LINE_LENGTH );
 
         if ( includeVersionInfo )
         {
@@ -259,13 +259,13 @@ public final class LdifUtils
 
 
     /**
-     * Convert a LDIF String to an attributes.
+     * Convert a LDIF String to a JNDI attributes.
      *
      * @param ldif The LDIF string containing an attribute value
      * @return An Attributes instance
      * @exception LdapLdifException If the LDIF String cannot be converted to an Attributes
      */
-    public static Attributes convertAttributesFromLdif( String ldif ) throws LdapLdifException
+    public static Attributes getJndiAttributesFromLdif( String ldif ) throws LdapLdifException
     {
         LdifAttributesReader reader = new LdifAttributesReader();
 
@@ -281,7 +281,7 @@ public final class LdifUtils
      * @return the corresponding LDIF code as a String
      * @throws LdapException If a naming exception is encountered.
      */
-    public static String convertEntryToLdif( Entry entry, int length ) throws LdapException
+    public static String convertToLdif( Entry entry, int length ) throws LdapException
     {
         StringBuilder sb = new StringBuilder();
 
@@ -669,7 +669,7 @@ public final class LdifUtils
      * @return An Attributes instance
      * @throws LdapException If the data are invalid
      */
-    public static Attributes createAttributes( Object... avas ) throws LdapException
+    public static Attributes createJndiAttributes( Object... avas ) throws LdapException
     {
         StringBuilder sb = new StringBuilder();
         int pos = 0;

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
Wed Apr 27 16:59:08 2011
@@ -377,7 +377,7 @@ public class LdifUtilsTest
         attributes.put( "sn", "test" );
 
         String ldif = LdifUtils.convertToLdif( attributes, (Dn)null, 15 );
-        Attributes result = LdifUtils.convertAttributesFromLdif( ldif );
+        Attributes result = LdifUtils.getJndiAttributesFromLdif( ldif );
         assertEquals( attributes, result );
     }
 
@@ -454,7 +454,7 @@ public class LdifUtilsTest
         String mOid = "m-oid: 1.2.3.4";
         String description = "description";
         
-        Attributes attrs = LdifUtils.createAttributes( 
+        Attributes attrs = LdifUtils.createJndiAttributes( 
             "objectClass: top",
             "objectClass: metaTop",
             "objectClass: metaSyntax",
@@ -469,7 +469,7 @@ public class LdifUtilsTest
 
         try
         {
-            LdifUtils.createAttributes( 
+            LdifUtils.createJndiAttributes( 
                 "objectClass", "top",
                 "objectClass" );
             fail();

Modified: directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
(original)
+++ directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
Wed Apr 27 16:59:08 2011
@@ -406,7 +406,7 @@ public class AttributeTypeHolder extends
 
         // First dump the Dn only
         Entry entry = new DefaultEntry( dn );
-        sb.append( LdifUtils.convertEntryToLdif(entry) );
+        sb.append( LdifUtils.convertToLdif(entry) );
 
         return sb.toString();
     }

Modified: directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java?rev=1097180&r1=1097179&r2=1097180&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
(original)
+++ directory/shared/trunk/ldap/schema/converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
Wed Apr 27 16:59:08 2011
@@ -221,7 +221,7 @@ public class ObjectClassHolder extends S
 
         // First dump the Dn only
         Entry entry = new DefaultEntry( dn );
-        sb.append( LdifUtils.convertEntryToLdif(entry) );
+        sb.append( LdifUtils.convertToLdif(entry) );
 
         return sb.toString();
     }



Mime
View raw message