Author: akarasulu
Date: Thu Dec  9 13:15:54 2004
New Revision: 111433

URL: http://svn.apache.org/viewcvs?view=rev&rev=111433
Log:
Changes ...

 o took out some schemas that were loaded by default 
 o fixed test case expecting krb5 schema
 o removed some schemas that are really not default schemas like
   krb5, scheduleworld and corba


Modified:
   
incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java
   
incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java
   incubator/directory/eve/trunk/main/eve.properties

Modified: 
incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java?view=diff&rev=111433&p1=incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java&r1=111432&p2=incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java&r2=111433
==============================================================================
--- 
incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java
       (original)
+++ 
incubator/directory/eve/trunk/dib/src/java/org/apache/eve/jndi/EveContextFactory.java
       Thu Dec  9 13:15:54 2004
@@ -38,6 +38,7 @@
 import org.apache.ldap.common.message.ResultCodeEnum;
 import org.apache.ldap.common.util.DateUtils;
 import org.apache.ldap.common.util.PropertiesUtils;
+import org.apache.ldap.common.util.StringTools;
 import org.apache.ldap.common.ldif.LdifIterator;
 import org.apache.ldap.common.ldif.LdifParser;
 import org.apache.ldap.common.ldif.LdifParserImpl;
@@ -95,16 +96,11 @@
     /** default schema classes for the SCHEMAS_ENV property if not set */
     private static final String[] DEFAULT_SCHEMAS = new String[]
     {
-        "org.apache.eve.schema.bootstrap.AutofsSchema",
-        "org.apache.eve.schema.bootstrap.CorbaSchema",
         "org.apache.eve.schema.bootstrap.CoreSchema",
         "org.apache.eve.schema.bootstrap.CosineSchema",
         "org.apache.eve.schema.bootstrap.EveSchema",
         "org.apache.eve.schema.bootstrap.InetorgpersonSchema",
         "org.apache.eve.schema.bootstrap.JavaSchema",
-        "org.apache.eve.schema.bootstrap.Krb5kdcSchema",
-        "org.apache.eve.schema.bootstrap.NisSchema",
-        "org.apache.eve.schema.bootstrap.ScheduleworldSchema",
         "org.apache.eve.schema.bootstrap.SystemSchema"
     };
 
@@ -385,7 +381,9 @@
         String[] schemas = DEFAULT_SCHEMAS;
         if ( initialEnv.containsKey( EnvKeys.SCHEMAS ) )
         {
-            schemas = ( ( String ) initialEnv.get( EnvKeys.SCHEMAS ) ).split( 
"," );
+            String schemaList = ( String ) initialEnv.get( EnvKeys.SCHEMAS );
+            schemaList = StringTools.deepTrim( schemaList );
+            schemas = ( ( String ) schemaList ).split( " " );
             for ( int ii = 0; ii < schemas.length; ii++ )
             {
                 schemas[ii] = schemas[ii].trim();

Modified: 
incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java?view=diff&rev=111433&p1=incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java&r1=111432&p2=incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java&r2=111433
==============================================================================
--- 
incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java
   (original)
+++ 
incubator/directory/eve/trunk/dib/src/test/org/apache/eve/jndi/ibs/BinaryAttributeFilterTest.java
   Thu Dec  9 13:15:54 2004
@@ -63,27 +63,27 @@
 
         // try krb5Key which should be binary automatically - use ou as control
         byte[] keyValue = new byte[] { 0x45, 0x23, 0x7d, 0x7f };
-        attributes.put( "krb5Key", keyValue );
+        attributes.put( "jpegPhoto", keyValue );
         sysRoot.createSubcontext( "ou=anothertest", attributes );
         ctx = ( DirContext ) sysRoot.lookup( "ou=anothertest" ) ;
         ou = ctx.getAttributes( "" ).get( "ou" );
         value = ou.get();
         assertTrue( value instanceof byte[] );
-        Attribute krb5Key = ctx.getAttributes( "" ).get( "krb5Key" );
-        value = krb5Key.get();
+        Attribute jpegPhoto = ctx.getAttributes( "" ).get( "jpegPhoto" );
+        value = jpegPhoto.get();
         assertTrue( value instanceof byte[] );
 
-        // try krb5Key which should be binary automatically but use String to
+        // try jpegPhoto which should be binary automatically but use String to
         // create so we should still get back a byte[] - use ou as control
-        attributes.remove( "krb5Key" );
-        attributes.put( "krb5Key", "testing a string" );
+        attributes.remove( "jpegPhoto" );
+        attributes.put( "jpegPhoto", "testing a string" );
         sysRoot.createSubcontext( "ou=yetanothertest", attributes );
         ctx = ( DirContext ) sysRoot.lookup( "ou=yetanothertest" ) ;
         ou = ctx.getAttributes( "" ).get( "ou" );
         value = ou.get();
         assertTrue( value instanceof byte[] );
-        krb5Key = ctx.getAttributes( "" ).get( "krb5Key" );
-        value = krb5Key.get();
+        jpegPhoto = ctx.getAttributes( "" ).get( "jpegPhoto" );
+        value = jpegPhoto.get();
         assertTrue( value instanceof byte[] );
     }
 }

Modified: incubator/directory/eve/trunk/main/eve.properties
Url: 
http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/main/eve.properties?view=diff&rev=111433&p1=incubator/directory/eve/trunk/main/eve.properties&r1=111432&p2=incubator/directory/eve/trunk/main/eve.properties&r2=111433
==============================================================================
--- incubator/directory/eve/trunk/main/eve.properties   (original)
+++ incubator/directory/eve/trunk/main/eve.properties   Thu Dec  9 13:15:54 2004
@@ -31,3 +31,7 @@
 eve.db.partition.attributes.apache.objectClass=top domain extensibleObject
 eve.db.partition.attributes.apache.dc=apache
 
+# set up all the schemas used 
+
+eve.schemas=org.apache.eve.schema.bootstrap.AutofsSchema 
org.apache.eve.schema.bootstrap.CorbaSchema 
org.apache.eve.schema.bootstrap.CoreSchema 
org.apache.eve.schema.bootstrap.CosineSchema 
org.apache.eve.schema.bootstrap.EveSchema 
org.apache.eve.schema.bootstrap.InetorgpersonSchema 
org.apache.eve.schema.bootstrap.JavaSchema 
org.apache.eve.schema.bootstrap.Krb5kdcSchema 
org.apache.eve.schema.bootstrap.NisSchema 
org.apache.eve.schema.bootstrap.ScheduleworldSchema 
org.apache.eve.schema.bootstrap.SystemSchema
+

Reply via email to