directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r643064 - /directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
Date Mon, 31 Mar 2008 17:09:07 GMT
Author: kayyagari
Date: Mon Mar 31 10:08:42 2008
New Revision: 643064

URL: http://svn.apache.org/viewvc?rev=643064&view=rev
Log:
added aliases present in the doc

Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java?rev=643064&r1=643063&r2=643064&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
Mon Mar 31 10:08:42 2008
@@ -43,7 +43,6 @@
      * Structure and Organization</a>
      *
      * TODO might want to make this load an LDIF instead in the future
-     * TODO add alias entries
      * TODO correct size of spaces in user provided DN
      * 
      * @param store the store object to be initialized
@@ -83,12 +82,12 @@
         entry.add( "ou", "Engineering" );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
-        dn = new LdapDN( "cn=JOnny WAlkeR,ou=Sales,o=Good Times Co." );
+        dn = new LdapDN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
-        entry.add( "cn",  "JOnny WAlkeR");
+        entry.add( "cn",  "JOhnny WAlkeR");
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
         dn = new LdapDN( "cn=JIM BEAN,ou=Sales,o=Good Times Co." );
@@ -107,6 +106,23 @@
         entry.add( "cn",  "Jack Daniels");
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
 
-        // still need to add aliases
+        // aliases
+        dn = new LdapDN( "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co." );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+        entry = new DefaultServerEntry( registries, dn );
+        entry.add( "objectClass", "top", "alias", "extensibleObject" );
+        entry.add( "ou", "Board of Directors" );
+        entry.add( "commonName",  "Jim Bean");
+        entry.add( "aliasedObjectName", "cn=Jim Bean,ou=Sales,o=Good Times Co." );
+        store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
+
+        dn = new LdapDN( "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co." );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+        entry = new DefaultServerEntry( registries, dn );
+        entry.add( "objectClass", "top", "alias", "extensibleObject" );
+        entry.add( "ou", "Engineering" );
+        entry.add( "2.5.4.3",  "Johnny Walker");
+        entry.add( "aliasedObjectName", "cn=Johnny Walker,ou=Sales,o=Good Times Co." );
+        store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
     }
 }



Mime
View raw message