directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 54769 - in incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve: jndi schema/config
Date Thu, 14 Oct 2004 06:27:21 GMT
Author: akarasulu
Date: Wed Oct 13 23:27:21 2004
New Revision: 54769

Added:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchemaGrouping.java
      - copied, changed from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchema.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreRuleFactory.java
      - copied, changed from rev 53940, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleConfig.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java
      - copied, changed from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java
      - copied, changed from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/Schema.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java
      - copied, changed from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxConfigSet.java
Removed:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchema.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AttributeTypeConfigSet.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ComparatorConfig.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleConfig.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/NormalizerConfig.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/Schema.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxCheckerConfig.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxConfigSet.java
Modified:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContext.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveDirContext.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/JavaLdap.java
Log:
Commit changes ...

 o removed all junk classes that used old config set concept
 o moving towards SchemaGrouping which uses schema object factories
 o renamed and modeled classes worth something to use this new scheme



Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContext.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContext.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContext.java
Wed Oct 13 23:27:21 2004
@@ -25,7 +25,7 @@
  * A non-federated abstract Context implementation.
  *
  */
-abstract class EveContext implements Context
+public abstract class EveContext implements Context
 {
     /** */
     public static final String DELETE_OLD_RDN_PROP = "java.naming.ldap.deleteRDN" ;
@@ -208,7 +208,7 @@
          * attributes before normalization.  The result should have ths same
          * affect as the following line within the interceptor.
          * 
-         * l_attributes.put( Schema.DN_ATTR, l_target.toString() ) ;
+         * l_attributes.put( SchemaGrouping.DN_ATTR, l_target.toString() ) ;
          */
         l_attributes.put( l_rdnAttribute, l_rdnValue ) ;
         l_attributes.put( JavaLdap.OBJECTCLASS_ATTR, 

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
Wed Oct 13 23:27:21 2004
@@ -12,7 +12,7 @@
 import org.apache.eve.schema.DefaultSyntaxRegistry;
 import org.apache.eve.schema.DefaultOidRegistry;
 
-import org.apache.eve.schema.config.CoreSyntaxes;
+import org.apache.eve.schema.config.CoreSyntaxFactory;
 
 
 /**
@@ -77,11 +77,11 @@
         EveJndiProvider provider = null;
         Syntax[] syntaxes;
         DefaultOidRegistry oidRegistry;
-        CoreSyntaxes coreSyntaxes;
+        CoreSyntaxFactory coreSyntaxes;
         DefaultSyntaxRegistry syntaxRegistry;
 
-        coreSyntaxes = new CoreSyntaxes();
-        syntaxes = coreSyntaxes.load( null );
+        coreSyntaxes = new CoreSyntaxFactory();
+        syntaxes = coreSyntaxes.getSyntaxes( null );
         oidRegistry = new DefaultOidRegistry();
         syntaxRegistry = new DefaultSyntaxRegistry( syntaxes, oidRegistry );
 

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveDirContext.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveDirContext.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveDirContext.java
Wed Oct 13 23:27:21 2004
@@ -32,7 +32,7 @@
  * The DirContext implementation for the Server Side JNDI LDAP provider.
  *
  */
-public class EveDirContext extends EveContext implements DirContext
+public abstract class EveDirContext extends EveContext implements DirContext
 {
     
     

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/JavaLdap.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/JavaLdap.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/JavaLdap.java
Wed Oct 13 23:27:21 2004
@@ -20,7 +20,7 @@
 public class JavaLdap
 {
     // ------------------------------------------------------------------------
-    // Attribute Id Constants Used By The Java LDAP Schema 
+    // Attribute Id Constants Used By The Java LDAP SchemaGrouping
     // ------------------------------------------------------------------------
 
     /** */

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchemaGrouping.java
(from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchema.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchema.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractSchemaGrouping.java
Wed Oct 13 23:27:21 2004
@@ -16,11 +16,9 @@
  */
 package org.apache.eve.schema.config;
 
+
 import org.apache.ldap.common.util.ArrayUtils;
-import org.apache.ldap.common.schema.*;
 
-import java.util.Map;
-import java.util.Collections;
 
 /**
  * Document me.
@@ -28,7 +26,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class AbstractSchema implements Schema
+public abstract class AbstractSchemaGrouping implements SchemaGrouping
 {
     private static final String DEFAULT_OWNER = "uid=admin,ou=system";
     private static final String DEFAULT_SCHEMA_NAME = "default";
@@ -43,7 +41,7 @@
     // ------------------------------------------------------------------------
 
 
-    public AbstractSchema( String owner, String schemaName, String[] dependencies )
+    public AbstractSchemaGrouping( String owner, String schemaName, String[] dependencies
)
     {
         if ( owner == null )
         {
@@ -88,49 +86,7 @@
 
     public String[] getDependencies()
     {
-        return new String[0];
-    }
-
-
-    public Map getComparators()
-    {
-        return Collections.EMPTY_MAP;
-    }
-
-
-    public Map getNormalizers()
-    {
-        return Collections.EMPTY_MAP;
-    }
-
-
-    public SyntaxChecker[] getSyntaxCheckers()
-    {
-        return new SyntaxChecker[0];
-    }
-
-
-    public Syntax[] getSyntaxes()
-    {
-        return new Syntax[0];
-    }
-
-
-    public MatchingRule[] getMatchingRules()
-    {
-        return new MatchingRule[0];
-    }
-
-
-    public AttributeType[] getAttributeTypes()
-    {
-        return new AttributeType[0];
-    }
-
-
-    public ObjectClass[] getObjectClasses()
-    {
-        return new ObjectClass[0];
+        return dependencies;
     }
 
 

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreRuleFactory.java
(from rev 53940, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleConfig.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleConfig.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreRuleFactory.java
Wed Oct 13 23:27:21 2004
@@ -37,7 +37,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class MatchingRuleConfig
+public class CoreMatchingRuleFactory
 {
     public MatchingRule[] loadMatchingRules( SyntaxRegistry registry,
                                              NormalizerRegistry normRegistry,

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java
(from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java
Wed Oct 13 23:27:21 2004
@@ -17,17 +17,16 @@
 package org.apache.eve.schema.config;
 
 
-import org.apache.ldap.common.schema.*;
+import org.apache.ldap.common.schema.Syntax;
+import org.apache.ldap.common.schema.BaseSyntax;
 import org.apache.eve.schema.SyntaxCheckerRegistry;
 
-import java.util.Map;
-
 
 /**
- * A Syntax schema object configuration set for the core LDAP schema in Section
- * 4.3.2 of <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252</a>.
- * The following table reproduced from RFC2252 shows the syntaxes inclu     ded
- * within this SyntaxConfigSet:
+ * A simple Syntax factory for the core LDAP schema in Section 4.3.2 of
+ * <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252</a>.
+ * The following table reproduced from RFC2252 shows the syntaxes included
+ * within this SyntaxFactory:
  * <pre>
  * Index   Value being represented   H-R     OBJECT IDENTIFIER
  * =====================================================================
@@ -95,45 +94,15 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class CoreSyntaxes implements SyntaxConfigSet
+public class CoreSyntaxFactory implements SyntaxFactory
 {
-    /** an empty string array */
-    private final static String[] EMPTY_ARRAY = new String[0];
-    /** the DN of the owner of the objects within this SyntaxConfigSet */
-    private static final String OWNER = "uid=admin,ou=system";
-    /** the logical schema the objects within this SyntaxConfigSet belong to */
-    private static final String SCHEMA = "core";
-
 
     // ------------------------------------------------------------------------
-    // Configuration Set Methods
+    // Syntax Factory Method
     // ------------------------------------------------------------------------
 
 
-    public String getOwner()
-    {
-        return OWNER;
-    }
-
-
-    public String getSchemaName()
-    {
-        return SCHEMA;
-    }
-
-
-    public String[] getDependencies()
-    {
-        return EMPTY_ARRAY;
-    }
-
-
-    // ------------------------------------------------------------------------
-    // Syntax Configuration Set Methods
-    // ------------------------------------------------------------------------
-
-
-    public Syntax[] load( SyntaxCheckerRegistry registry )
+    public Syntax[] getSyntaxes( SyntaxCheckerRegistry registry )
     {
         MutableSyntax[] syntaxes = new MutableSyntax[54];
 
@@ -419,8 +388,8 @@
          * 52 UTC Time                        Y  1.3.6.1.4.1.1466.115.121.1.53
          * 53 LDAP Syntax Description         Y  1.3.6.1.4.1.1466.115.121.1.54
          * 54 Modify Rights                   Y  1.3.6.1.4.1.1466.115.121.1.55
-         * 55 LDAP Schema Definition          Y  1.3.6.1.4.1.1466.115.121.1.56
-         * 56 LDAP Schema Description         Y  1.3.6.1.4.1.1466.115.121.1.57
+         * 55 LDAP SchemaGrouping Definition          Y  1.3.6.1.4.1.1466.115.121.1.56
+         * 56 LDAP SchemaGrouping Description         Y  1.3.6.1.4.1.1466.115.121.1.57
          * 57 Substring Assertion             Y  1.3.6.1.4.1.1466.115.121.1.58
          */
         syntaxes[50] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.51" );
@@ -444,11 +413,11 @@
         syntaxes[54].setHumanReadible( true );
 
         syntaxes[55] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.56" );
-        syntaxes[55].setName( "LDAP Schema Definition" );
+        syntaxes[55].setName( "LDAP SchemaGrouping Definition" );
         syntaxes[55].setHumanReadible( true );
 
         syntaxes[56] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.57" );
-        syntaxes[56].setName( "LDAP Schema Description" );
+        syntaxes[56].setName( "LDAP SchemaGrouping Description" );
         syntaxes[56].setHumanReadible( true );
 
         syntaxes[57] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.58" );
@@ -458,40 +427,6 @@
         return syntaxes;
     }
 
-    public Map getComparators()
-    {
-        return null;
-    }
-
-    public Map getNormalizers()
-    {
-        return null;
-    }
-
-    public SyntaxChecker[] getSyntaxCheckers()
-    {
-        return new SyntaxChecker[0];
-    }
-
-    public Syntax[] getSyntaxes()
-    {
-        return new Syntax[0];
-    }
-
-    public MatchingRule[] getMatchingRules()
-    {
-        return new MatchingRule[0];
-    }
-
-    public AttributeType[] getAttributeTypes()
-    {                                                               
-        return new AttributeType[0];
-    }
-
-    public ObjectClass[] getObjectClasses()
-    {
-        return new ObjectClass[0];
-    }
 
     /**
      * Used to access protected mutators of BaseSyntax from within this class.

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java
(from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/Schema.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/Schema.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java
Wed Oct 13 23:27:21 2004
@@ -22,24 +22,24 @@
 
 
 /**
- * A configuration of like Schema objects bundled together and identified as a
- * set.
+ * A configuration of related Schema objects bundled together and identified as
+ * a group.
  *
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface Schema
+public interface SchemaGrouping
 {
     /**
      * Gets the name of the owner of the schema objects within this
-     * Schema.
+     * SchemaGrouping.
      *
      * @return the identifier for the owner of this set's objects
      */
     String getOwner();
 
     /**
-     * Gets the name of the logical schema the objects of this Schema
+     * Gets the name of the logical schema the objects of this SchemaGrouping
      * belong to: e.g. krb5-kdc may be the logical LDAP schema name.
      *
      * @return the name of the logical schema
@@ -48,13 +48,18 @@
 
     /**
      * Gets the names of other schemas that this objects within this
-     * Schema depends upon.  These dependent schemas are those
+     * SchemaGrouping depends upon.  These dependent schemas are those
      * whose ConfigurationSets will be processed first.
      *
      * @return the String names of schema dependencies
      */
     String[] getDependencies();
 
+    /**
+     * Gets the set of comparators
+     *
+     * @return
+     */
     Map getComparators();
 
     Map getNormalizers();
@@ -68,4 +73,12 @@
     AttributeType[] getAttributeTypes();
 
     ObjectClass[] getObjectClasses();
+
+    DITContentRule[] getDITContentRules();
+
+    DITStructureRule[] getDITStructureRules();
+
+    NameForm[] getNameForms();
+
+    Map getMatchingRuleUses();
 }

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java
(from rev 54737, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxConfigSet.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxConfigSet.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java
Wed Oct 13 23:27:21 2004
@@ -27,7 +27,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface SyntaxConfigSet extends Schema
+public interface SyntaxFactory
 {
-    Syntax[] load( SyntaxCheckerRegistry registry );
+    Syntax[] getSyntaxes( SyntaxCheckerRegistry registry );
 }

Mime
View raw message