directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r631998 - in /directory: apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/ shared/branches/bigbang/ldap/src/test/java...
Date Thu, 28 Feb 2008 15:21:04 GMT
Author: elecharny
Date: Thu Feb 28 07:21:01 2008
New Revision: 631998

URL: http://svn.apache.org/viewvc?rev=631998&view=rev
Log:
Added a LdapDNSrializer, some tests for this class, and used it in core.

Added:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java
      - copied, changed from r628104, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnSerializer.java
Modified:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java?rev=631998&r1=631997&r2=631998&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
(original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
Thu Feb 28 07:21:01 2008
@@ -26,7 +26,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.shared.ldap.name.DnSerializer;
+import org.apache.directory.shared.ldap.name.LdapDNSerializer;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
@@ -82,12 +82,12 @@
         if ( entry.getDn() == null )
         {
             // Write an empty DN
-            DnSerializer.serialize( LdapDN.EMPTY_LDAPDN, out );
+            LdapDNSerializer.serialize( LdapDN.EMPTY_LDAPDN, out );
         }
         else
         {
             // Write the DN
-            DnSerializer.serialize( entry.getDn(), out );
+            LdapDNSerializer.serialize( entry.getDn(), out );
         }
         
         // Then the attributes.
@@ -288,7 +288,7 @@
     public ServerEntry deserialize( ObjectInput in  ) throws IOException, NamingException,
ClassNotFoundException
     {
         // First, read the DN
-        LdapDN dn = DnSerializer.deserialize( in );
+        LdapDN dn = LdapDNSerializer.deserialize( in );
         
         // Read the number of attributes
         int nbAttrs = in.readInt();

Copied: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java
(from r628104, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnSerializer.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java?p2=directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java&p1=directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnSerializer.java&r1=628104&r2=631998&rev=631998&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnSerializer.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java
Thu Feb 28 07:21:01 2008
@@ -33,10 +33,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class DnSerializer
+public class LdapDNSerializer
 {
     /** The LoggerFactory used by this class */
-    protected static final Logger LOG = LoggerFactory.getLogger( DnSerializer.class );
+    protected static final Logger LOG = LoggerFactory.getLogger( LdapDNSerializer.class );
 
     /**
      * Serialize a DN
@@ -44,7 +44,7 @@
      * We have to store a DN data efficiently. Here is the structure :
      * 
      * <li>upName</li> The User provided DN<p>
-     * <li>normName</li> May be null if the normName is equaivalent to 
+     * <li>normName</li> May be null if the normName is equivalent to 
      * the upName<p>
      * <li>rdns</li> The rdn's List.<p>
      * 
@@ -102,7 +102,7 @@
      * Deserialize a DN
      * 
      * We read back the data to create a new LdapDN. The structure 
-     * read is exposed in the {@link DnSerializer#serialize(LdapDN, ObjectOutput)} 
+     * read is exposed in the {@link LdapDNSerializer#serialize(LdapDN, ObjectOutput)} 
      * method<p>
      */
     public static LdapDN deserialize( ObjectInput in ) throws IOException, ClassNotFoundException

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=631998&r1=631997&r2=631998&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Thu Feb 28 07:21:01 2008
@@ -2853,12 +2853,12 @@
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        DnSerializer.serialize( dn, out );
+        LdapDNSerializer.serialize( dn, out );
         
         byte[] data = baos.toByteArray();
         ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        assertEquals( dn, DnSerializer.deserialize( in ) );
+        assertEquals( dn, LdapDNSerializer.deserialize( in ) );
     }
 
 
@@ -2918,12 +2918,12 @@
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        DnSerializer.serialize( dn, out );
+        LdapDNSerializer.serialize( dn, out );
         
         byte[] data = baos.toByteArray();
         ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        assertEquals( dn, DnSerializer.deserialize( in ) );
+        assertEquals( dn, LdapDNSerializer.deserialize( in ) );
         assertEquals( dn, deserializeDN( serializeDN( dn ) ) );
     }
 }



Mime
View raw message