You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/12/05 09:14:46 UTC

svn commit: r109875 - in incubator/directory/eve/trunk: jndi-provider/src/java/org/apache/eve jndi-provider/src/java/org/apache/eve/db jndi-provider/src/java/org/apache/eve/jndi jndi-provider/src/java/org/apache/eve/jndi/ibs jndi-provider/src/java/org/apache/eve/schema jndi-provider/src/java/org/apache/eve/schema/bootstrap jndi-provider/src/test/org/apache/eve/jndi maven-eve-plugin/src/java/org/apache/eve/tools/schema

Author: akarasulu
Date: Sun Dec  5 00:14:45 2004
New Revision: 109875

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

Basically added schema publishing to the server to have schmea available now
to clients.  Fixes JIRA issue:

http://nagoya.apache.org/jira/browse/DIREVE-101



Modified:
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java
   incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java
   incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template
   incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/RootNexus.java	Sun Dec  5 00:14:45 2004
@@ -93,7 +93,6 @@
         rootDSE.put( attr );
 
         attr = new LockableAttributeImpl( NAMINGCTXS_ATTR );
-        attr.add( "" );
         rootDSE.put( attr );
 
         attr = new LockableAttributeImpl( VENDORNAME_ATTR );

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/ResultFilteringEnumeration.java	Sun Dec  5 00:14:45 2004
@@ -25,6 +25,7 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.ldap.LdapContext;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 
 /**
@@ -43,7 +44,7 @@
     private final NamingEnumeration decorated;
 
     /** the first accepted search result that is prefetched */
-    private DbSearchResult prefetched;
+    private SearchResult prefetched;
     /** flag storing closed state of this naming enumeration */
     private boolean isClosed = false;
     /** the controls associated with the search operation */
@@ -184,7 +185,7 @@
 
     public Object next() throws NamingException
     {
-        DbSearchResult retVal = this.prefetched;
+        SearchResult retVal = this.prefetched;
         prefetch();
         return retVal;
     }
@@ -203,7 +204,7 @@
 
     public Object nextElement()
     {
-        DbSearchResult retVal = this.prefetched;
+        SearchResult retVal = this.prefetched;
 
         try
         {
@@ -235,12 +236,12 @@
      */
     private void prefetch() throws NamingException
     {
-        DbSearchResult tmp = null;
+        SearchResult tmp = null;
 
         while( decorated.hasMore() )
         {
             boolean accepted = true;
-            tmp = ( DbSearchResult ) decorated.next();
+            tmp = ( SearchResult ) decorated.next();
 
             // don't waste using a for loop if we got 0 or 1 element
             if ( filters.isEmpty() )

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/db/SearchResultFilter.java	Sun Dec  5 00:14:45 2004
@@ -20,6 +20,7 @@
 import javax.naming.NamingException;
 import javax.naming.ldap.LdapContext;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 
 /**
@@ -43,6 +44,6 @@
      * @return true if the result is to be returned, false if it is to be
      * discarded from the result set
      */
-    boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls )
+    boolean accept( LdapContext ctx, SearchResult result, SearchControls controls )
         throws NamingException;
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/Invocation.java	Sun Dec  5 00:14:45 2004
@@ -177,7 +177,7 @@
      *
      * @param bypass whether or not the call on the proxied object is bypassed
      */
-    void setBypass( boolean bypass )
+    public void setBypass( boolean bypass )
     {
         this.bypass = bypass;
     }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java	Sun Dec  5 00:14:45 2004
@@ -23,10 +23,10 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 import org.apache.eve.SystemPartition;
 import org.apache.eve.db.SearchResultFilter;
-import org.apache.eve.db.DbSearchResult;
 import org.apache.ldap.common.exception.LdapNoPermissionException;
 import org.apache.eve.jndi.*;
 import org.apache.ldap.common.name.NameComponentNormalizer;
@@ -282,7 +282,7 @@
     
     private class AuthorizationFilter implements SearchResultFilter, LookupFilter
     {
-        public boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls )
+        public boolean accept( LdapContext ctx, SearchResult result, SearchControls controls )
                 throws NamingException
         {
             Name dn;

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/FilterServiceImpl.java	Sun Dec  5 00:14:45 2004
@@ -108,7 +108,7 @@
             retval = new ResultFilteringEnumeration( enum, LIST_CONTROLS, ctx,
                 new SearchResultFilter()
                 {
-                    public boolean accept( LdapContext ctx, DbSearchResult result,
+                    public boolean accept( LdapContext ctx, SearchResult result,
                                            SearchControls controls )
                             throws NamingException
                     {
@@ -186,7 +186,7 @@
             retval = new ResultFilteringEnumeration( enum, searchControls, ctx,
                 new SearchResultFilter()
                 {
-                    public boolean accept( LdapContext ctx, DbSearchResult result,
+                    public boolean accept( LdapContext ctx, SearchResult result,
                                            SearchControls controls )
                             throws NamingException
                     {
@@ -216,7 +216,7 @@
      * @throws NamingException if there are errors while applying the linear
      * composition of filters
      */
-    private boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls )
+    private boolean accept( LdapContext ctx, SearchResult result, SearchControls controls )
             throws NamingException
     {
         boolean isAccepted = true;

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/OperationalAttributeService.java	Sun Dec  5 00:14:45 2004
@@ -49,7 +49,7 @@
     /** the database search result filter to register with filter service */
     private final SearchResultFilter SEARCH_FILTER = new SearchResultFilter()
     {
-        public boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls )
+        public boolean accept( LdapContext ctx, SearchResult result, SearchControls controls )
             throws NamingException
         {
             if ( controls.getReturningAttributes() == null )

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/SchemaService.java	Sun Dec  5 00:14:45 2004
@@ -17,9 +17,7 @@
 package org.apache.eve.jndi.ibs;
 
 
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
+import java.util.*;
 import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.NamingEnumeration;
@@ -27,16 +25,24 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.Attribute;
+import javax.naming.directory.SearchResult;
 
 import org.apache.eve.jndi.BaseInterceptor;
+import org.apache.eve.jndi.Invocation;
+import org.apache.eve.jndi.InvocationStateEnum;
 import org.apache.eve.RootNexus;
 import org.apache.eve.db.SearchResultFilter;
-import org.apache.eve.db.DbSearchResult;
 import org.apache.eve.schema.GlobalRegistries;
 import org.apache.eve.schema.AttributeTypeRegistry;
 
-import org.apache.ldap.common.schema.AttributeType;
+import org.apache.ldap.common.schema.*;
 import org.apache.ldap.common.message.LockableAttributeImpl;
+import org.apache.ldap.common.message.LockableAttributesImpl;
+import org.apache.ldap.common.filter.ExprNode;
+import org.apache.ldap.common.filter.SimpleNode;
+import org.apache.ldap.common.filter.PresenceNode;
+import org.apache.ldap.common.util.SingletonEnumeration;
+import org.apache.ldap.common.name.LdapName;
 
 
 /**
@@ -55,6 +61,8 @@
     private final FilterService filterService;
     /** the global schema object registries */
     private final GlobalRegistries globalRegistries;
+    /** subschemaSubentry attribute's value from Root DSE */
+    private final String subentryDn;
 
 
     /**
@@ -65,7 +73,7 @@
      * @param filterService
      */
     public SchemaService( RootNexus nexus, GlobalRegistries globalRegistries,
-                          FilterService filterService )
+                          FilterService filterService ) throws NamingException
     {
         this.nexus = nexus;
         if ( this.nexus == null )
@@ -89,6 +97,10 @@
                 globalRegistries.getAttributeTypeRegistry() );
         filterService.addLookupFilter( binaryAttributeFilter );
         filterService.addSearchResultFilter( binaryAttributeFilter );
+
+        // stuff for dealing with subentries (garbage for now)
+        String subschemaSubentry = ( String ) nexus.getRootDSE().get( "subschemaSubentry" ).get();
+        subentryDn = new LdapName( subschemaSubentry ).toString().toLowerCase();
     }
 
 
@@ -187,10 +199,184 @@
         }
 
 
-        public boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls ) throws NamingException
+        public boolean accept( LdapContext ctx, SearchResult result, SearchControls controls ) throws NamingException
         {
             doFilter( ctx, result.getAttributes() );
             return true;
         }
+    }
+
+
+    protected void search( Name base, Map env, ExprNode filter,
+                           SearchControls searchControls ) throws NamingException
+    {
+        Invocation invocation = getInvocation();
+
+        // check to make sure the DN searched for is a subentry
+        if ( ! subentryDn.equals( base.toString() ) )
+        {
+            return;
+        }
+
+        if ( invocation.getState() == InvocationStateEnum.PREINVOCATION )
+        {
+            if ( searchControls.getSearchScope() == SearchControls.OBJECT_SCOPE &&
+                 filter instanceof SimpleNode )
+            {
+                SimpleNode node = ( SimpleNode ) filter;
+
+                if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) &&
+                     node.getValue().equalsIgnoreCase( "subschema" ) &&
+                     node.getAssertionType() == SimpleNode.EQUALITY
+                   )
+                {
+                    invocation.setBypass( true );
+                    Attributes attrs = getSubschemaEntry( searchControls.getReturningAttributes() );
+                    SearchResult result = new SearchResult( base.toString(), null, attrs );
+                    SingletonEnumeration enum = new SingletonEnumeration( result );
+                    invocation.setReturnValue( enum );
+                }
+            }
+            else if ( searchControls.getSearchScope() == SearchControls.OBJECT_SCOPE &&
+                     filter instanceof PresenceNode )
+            {
+                PresenceNode node = ( PresenceNode ) filter;
+
+                if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) )
+                {
+                    invocation.setBypass( true );
+                    Attributes attrs = getSubschemaEntry( searchControls.getReturningAttributes() );
+                    SearchResult result = new SearchResult( base.toString(), null, attrs );
+                    SingletonEnumeration enum = new SingletonEnumeration( result );
+                    invocation.setReturnValue( enum );
+                }
+            }
+        }
+    }
+
+
+    private Attributes getSubschemaEntry( String[] ids ) throws NamingException
+    {
+        if ( ids == null )
+        {
+            return new LockableAttributesImpl();
+        }
+
+        HashSet set = new HashSet( ids.length );
+        LockableAttributesImpl attrs = new LockableAttributesImpl();
+        LockableAttributeImpl attr = null;
+
+        for ( int ii = 0; ii < ids.length; ii++ )
+        {
+            set.add( ids[ii].toLowerCase() );
+        }
+
+
+        if ( set.contains( "objectclasses" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "objectClasses" );
+            Iterator list = globalRegistries.getObjectClassRegistry().list();
+            while ( list.hasNext() )
+            {
+                ObjectClass oc = ( ObjectClass ) list.next();
+                attr.add( SchemaUtils.render( oc ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "attributetypes" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "attributeTypes" );
+            Iterator list = globalRegistries.getAttributeTypeRegistry().list();
+            while ( list.hasNext() )
+            {
+                AttributeType at = ( AttributeType ) list.next();
+                attr.add( SchemaUtils.render( at ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "matchingrules" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "matchingRules" );
+            Iterator list = globalRegistries.getMatchingRuleRegistry().list();
+            while ( list.hasNext() )
+            {
+                MatchingRule mr = ( MatchingRule ) list.next();
+                attr.add( SchemaUtils.render( mr ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "matchingruleuse" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "matchingRuleUse" );
+            Iterator list = globalRegistries.getMatchingRuleUseRegistry().list();
+            while ( list.hasNext() )
+            {
+                MatchingRuleUse mru = ( MatchingRuleUse ) list.next();
+                attr.add( SchemaUtils.render( mru ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "ldapsyntaxes" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "ldapSyntaxes" );
+            Iterator list = globalRegistries.getSyntaxRegistry().list();
+            while ( list.hasNext() )
+            {
+                Syntax syntax = ( Syntax ) list.next();
+                attr.add( SchemaUtils.render( syntax ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "ditcontentrules" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "dITContentRules" );
+            Iterator list = globalRegistries.getDitContentRuleRegistry().list();
+            while ( list.hasNext() )
+            {
+                DITContentRule dcr = ( DITContentRule ) list.next();
+                attr.add( SchemaUtils.render( dcr ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "ditstructurerules" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "dITStructureRules" );
+            Iterator list = globalRegistries.getDitStructureRuleRegistry().list();
+            while ( list.hasNext() )
+            {
+                DITStructureRule dsr = ( DITStructureRule ) list.next();
+                attr.add( SchemaUtils.render( dsr ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        if ( set.contains( "nameforms" ) )
+        {
+            attr = new LockableAttributeImpl( attrs, "nameForms" );
+            Iterator list = globalRegistries.getNameFormRegistry().list();
+            while ( list.hasNext() )
+            {
+                NameForm nf = ( NameForm ) list.next();
+                attr.add( SchemaUtils.render( nf ).toString() );
+            }
+            attrs.put( attr );
+        }
+
+        // add the objectClass attribute
+        attr = new LockableAttributeImpl( attrs, "objectClass" );
+        attr.add( "top" );
+        attr.add( "subschema" );
+        attrs.put( attr );
+
+        // add the cn attribute as required for the RDN
+        attrs.put( "cn", "schema" );
+
+        return attrs;
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/AttributeTypeRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.AttributeType;
@@ -67,4 +68,11 @@
      * otherwise
      */
     boolean hasAttributeType( String id );
+
+    /**
+     * Gets an Iterator over the AttributeTypes within this registry.
+     *
+     * @return an iterator over all AttributeTypes in registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITContentRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.DITContentRule;
@@ -66,4 +67,11 @@
      * otherwise
      */
     boolean hasDITContentRule( String id );
+
+    /**
+     * Lists all the DITContentRules within this registry.
+     *
+     * @return Iterator over all the DITContentRules within this registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.DITStructureRule;
@@ -67,4 +68,11 @@
      * otherwise
      */
     boolean hasDITStructureRule( String id );
+
+    /**
+     * Lists all the DITStructureRules within this registry.
+     *
+     * @return an Iterator over all the DITStructureRules within this registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitContentRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -19,9 +19,11 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.DITContentRule;
+import org.apache.ldap.common.util.JoinIterator;
 
 import org.apache.eve.SystemPartition;
 import org.apache.eve.schema.bootstrap.BootstrapDitContentRuleRegistry;
@@ -173,5 +175,12 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return new JoinIterator( new Iterator[]
+            { byOid.values().iterator(),bootstrap.list() } );
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalDitStructureRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -19,9 +19,11 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.DITStructureRule;
+import org.apache.ldap.common.util.JoinIterator;
 
 import org.apache.eve.SystemPartition;
 import org.apache.eve.schema.bootstrap.BootstrapDitStructureRuleRegistry;
@@ -173,5 +175,12 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return new JoinIterator( new Iterator[]
+            { byOid.values().iterator(),bootstrap.list() } );
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalMatchingRuleUseRegistry.java	Sun Dec  5 00:14:45 2004
@@ -19,9 +19,11 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.MatchingRuleUse;
+import org.apache.ldap.common.util.JoinIterator;
 
 import org.apache.eve.SystemPartition;
 import org.apache.eve.schema.bootstrap.BootstrapMatchingRuleUseRegistry;
@@ -173,5 +175,12 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return new JoinIterator( new Iterator[]
+            { byOid.values().iterator(),bootstrap.list() } );
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalNameFormRegistry.java	Sun Dec  5 00:14:45 2004
@@ -19,9 +19,11 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.NameForm;
+import org.apache.ldap.common.util.JoinIterator;
 
 import org.apache.eve.SystemPartition;
 import org.apache.eve.schema.bootstrap.BootstrapNameFormRegistry;
@@ -173,5 +175,12 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return new JoinIterator( new Iterator[]
+            { byOid.values().iterator(),bootstrap.list() } );
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/GlobalObjectClassRegistry.java	Sun Dec  5 00:14:45 2004
@@ -181,6 +181,6 @@
     public Iterator list()
     {
         return new JoinIterator( new Iterator[]
-            { byOid.values().iterator(),bootstrap.list() } );
+            { byOid.values().iterator(), bootstrap.list() } );
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.MatchingRule;
@@ -68,4 +69,11 @@
      * otherwise
      */
     boolean hasMatchingRule( String oid );
+
+    /**
+     * Gets an Iterator over the MatchingRules within this registry.
+     *
+     * @return an iterator over all MatchingRules in registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.MatchingRuleUse;
@@ -68,4 +69,11 @@
      * otherwise
      */
     boolean hasMatchingRuleUse( String name );
+
+    /**
+     * Lists all the MatchingRuleUses within this registry.
+     *
+     * @return an Iterator over all the MatchingRuleUses within this registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/NameFormRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.NameForm;
@@ -66,4 +67,11 @@
      * otherwise
      */
     boolean hasNameForm( String id );
+
+    /**
+     * Lists all the NameForms within this registry.
+     *
+     * @return an Iterator over all the NameForms within this registry
+     */ 
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/ObjectClassRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.ObjectClass;
@@ -66,4 +67,11 @@
      * otherwise
      */
     boolean hasObjectClass( String id );
+
+    /**
+     * Gets an Iterator over the ObjectClasses within this ObjectClassRegistry.
+     *
+     * @return an iterator over all ObjectClasses in registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/SyntaxRegistry.java	Sun Dec  5 00:14:45 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema;
 
 
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.Syntax;
@@ -67,4 +68,11 @@
      * @return true if a Syntax definition exists for the id, false otherwise
      */
     boolean hasSyntax( String id );
+
+    /**
+     * Lists all the Syntaxes within this registry.
+     *
+     * @return an Iterator over all the Syntaxes within this registry
+     */
+    Iterator list();
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitContentRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -25,6 +25,7 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 
@@ -142,5 +143,11 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return byOid.values().iterator();
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapDitStructureRuleRegistry.java	Sun Dec  5 00:14:45 2004
@@ -25,6 +25,7 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 
@@ -142,5 +143,13 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+
+
+    public Iterator list()
+    {
+        return byOid.values().iterator();
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java	Sun Dec  5 00:14:45 2004
@@ -24,6 +24,7 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 
@@ -123,5 +124,11 @@
 
         throw new NamingException( "Name " + id + " not found in name to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return byName.values().iterator();
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapNameFormRegistry.java	Sun Dec  5 00:14:45 2004
@@ -25,6 +25,7 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Iterator;
 import javax.naming.NamingException;
 
 
@@ -142,5 +143,11 @@
 
         throw new NamingException( "OID " + id + " not found in oid to " +
             "schema name map!" );
+    }
+
+
+    public Iterator list()
+    {
+        return byOid.values().iterator();
     }
 }

Modified: incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/schema/bootstrap/BootstrapObjectClassRegistry.java	Sun Dec  5 00:14:45 2004
@@ -146,11 +146,6 @@
     }
 
 
-    /**
-     * Open up a back door for some tests.
-     *
-     * @return an iteration over the set of ObjectClasses within this registry.
-     */
     public Iterator list()
     {
         return byOid.values().iterator();

Modified: incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java?view=diff&rev=109875&p1=incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java&r1=109874&p2=incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java	(original)
+++ incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/RootDSETest.java	Sun Dec  5 00:14:45 2004
@@ -148,9 +148,8 @@
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
         Attributes attributes = ctx.getAttributes( "",
                 new String[]{ "namingContexts", "vendorName" });
-        assertEquals( 2, attributes.size() );
+        assertEquals( 3, attributes.size() );
         assertEquals( "Apache Software Foundation", attributes.get( "vendorName" ).get() );
-        assertTrue( attributes.get( "namingContexts" ).contains( "" ) );
         assertTrue( attributes.get( "namingContexts" ).contains( "ou=system" ) );
     }
 

Modified: incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template?view=diff&rev=109875&p1=incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template&r1=109874&p2=incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template	(original)
+++ incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/AttributeTypes.template	Sun Dec  5 00:14:45 2004
@@ -65,7 +65,7 @@
         // --------------------------------------------------------------------
 
         attributeType = newAttributeType( "$attrType.getOid()", registries );
-        attributeType.setDescription( "$attrType.getDescription()" );
+#if ( $attrType.getDescription() )        attributeType.setDescription( "$attrType.getDescription()" );#end
         attributeType.setCanUserModify( ! $attrType.isNoUserModification() );
         attributeType.setSingleValue( $attrType.isSingleValue() );
         attributeType.setCollective( $attrType.isCollective() );

Modified: incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template?view=diff&rev=109875&p1=incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template&r1=109874&p2=incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template&r2=109875
==============================================================================
--- incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template	(original)
+++ incubator/directory/eve/trunk/maven-eve-plugin/src/java/org/apache/eve/tools/schema/ObjectClasses.template	Sun Dec  5 00:14:45 2004
@@ -64,8 +64,7 @@
 
         objectClass = newObjectClass( "$objectClass.getOid()", registries );
         objectClass.setObsolete( $objectClass.isObsolete() );
-        objectClass.setDescription( "$objectClass.getDescription()" );
-
+        objectClass.setDescription( "$!objectClass.getDescription()" );
         #if ( $objectClass.getObjectClassType().getName() == "ABSTRACT" )
         objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
         #elseif ( $objectClass.getObjectClassType().getName() == "AUXILIARY" )