directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 55100 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap
Date Tue, 19 Oct 2004 21:23:34 GMT
Author: akarasulu
Date: Tue Oct 19 14:23:33 2004
New Revision: 55100

Modified:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxProducer.java
Log:
Finished off abstract bootstrap producer and retrofitted it to 
CoreSyntaxProducer.  Also made lots of minor fixes and name changes within.


Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
Tue Oct 19 14:23:33 2004
@@ -17,42 +17,57 @@
 package org.apache.eve.schema.bootstrap;
 
 
-import org.apache.ldap.common.schema.AbstractSyntax;
-import org.apache.ldap.common.schema.SyntaxChecker;
-import org.apache.eve.schema.SyntaxCheckerRegistry;
-
 import javax.naming.NamingException;
 
+import org.apache.ldap.common.schema.*;
+import org.apache.eve.schema.SyntaxRegistry;
+import org.apache.eve.schema.MatchingRuleRegistry;
+import org.apache.eve.schema.SyntaxCheckerRegistry;
+import org.apache.eve.schema.AttributeTypeRegistry;
+
 
 /**
- * Document me.
+ * An abstract producer implementation.
  *
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public abstract class AbstractBootstrapProducer implements BootstrapProducer
 {
+    /** the producer type */
     private final ProducerTypeEnum type;
 
 
-    public AbstractBootstrapProducer( ProducerTypeEnum type )
+    /**
+     * Creates a producer of a specific type.
+     *
+     * @param type the producer type
+     */
+    protected AbstractBootstrapProducer( ProducerTypeEnum type )
     {
         this.type = type;
     }
 
 
+    /**
+     * @see BootstrapProducer#getType()
+     */
     public ProducerTypeEnum getType()
     {
         return type;
     }
 
 
-    protected static class MutableSyntax extends AbstractSyntax
+    /**
+     * A mutable Syntax for the bootstrap phase that uses the
+     * syntaxCheckerRegistry to dynamically resolve syntax checkers.
+     */
+    protected static class BootstrapSyntax extends AbstractSyntax
     {
         final SyntaxCheckerRegistry registry;
 
 
-        protected MutableSyntax( String oid, SyntaxCheckerRegistry registry )
+        protected BootstrapSyntax( String oid, SyntaxCheckerRegistry registry )
         {
             super( oid );
             this.registry = registry;
@@ -86,6 +101,118 @@
         public boolean isObsolete()
         {
             return false;
+        }
+    }
+
+
+    /**
+     * A concrete mutable attributeType implementation for bootstrapping which
+     * uses registries for dynamically resolving dependent objects.
+     */
+    protected static class BootstrapAttributeType extends AbstractAttributeType
+    {
+        private final SyntaxRegistry syntaxRegistry;
+        private final MatchingRuleRegistry matchingRuleRegistry;
+        private final AttributeTypeRegistry attributeTypeRegistry;
+        private String superiorId;
+        private String equalityId;
+        private String substrId;
+        private String orderingId;
+        private String syntaxId;
+
+
+        public BootstrapAttributeType( String oid, BootstrapRegistries registries )
+        {
+            super( oid );
+
+            syntaxRegistry = registries.getSyntaxRegistry();
+            matchingRuleRegistry = registries.getMatchingRuleRegistry();
+            attributeTypeRegistry = registries.getAttributeTypeRegistry();
+        }
+
+        protected void setSuperiorId( String superiorId )
+        {
+            this.superiorId = superiorId;
+        }
+
+        public AttributeType getSuperior() throws NamingException
+        {
+            return this.attributeTypeRegistry.lookup( superiorId );
+        }
+
+        protected void setNames( String[] names )
+        {
+            super.setNames( names );
+        }
+
+        public MatchingRule getEquality() throws NamingException
+        {
+            return this.matchingRuleRegistry.lookup( equalityId );
+        }
+
+        protected void setEqualityId( String equalityId )
+        {
+            this.equalityId = equalityId;
+        }
+
+        public MatchingRule getSubstr() throws NamingException
+        {
+            return this.matchingRuleRegistry.lookup( substrId ) ;
+        }
+
+        protected void setSubstrId( String substrId )
+        {
+            this.substrId = substrId;
+        }
+
+        public MatchingRule getOrdering() throws NamingException
+        {
+            return this.matchingRuleRegistry.lookup( orderingId );
+        }
+
+        protected void setOrderingId( String orderingId )
+        {
+            this.orderingId = orderingId;
+        }
+
+        protected void setSyntaxId( String syntaxId )
+        {
+            this.syntaxId = syntaxId;
+        }
+
+        public Syntax getSyntax() throws NamingException
+        {
+            return this.syntaxRegistry.lookup( syntaxId );
+        }
+
+        protected void setSingleValue( boolean singleValue )
+        {
+            super.setSingleValue( singleValue );
+        }
+
+        protected void setCollective( boolean collective )
+        {
+            super.setCollective( collective );
+        }
+
+        protected void setCanUserModify( boolean canUserModify )
+        {
+            super.setCanUserModify( canUserModify );
+        }
+
+        protected void setObsolete( boolean obsolete )
+        {
+            super.setObsolete( obsolete );
+        }
+
+        protected void setUsage( UsageEnum usage )
+        {
+            super.setUsage( usage );
+        }
+
+        protected void setLength( int length )
+        {
+            super.setLength( length );
         }
     }
 }

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxProducer.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxProducer.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxProducer.java
Tue Oct 19 14:23:33 2004
@@ -17,12 +17,10 @@
 package org.apache.eve.schema.bootstrap;
 
 
-import org.apache.ldap.common.schema.AbstractSyntax;
-import org.apache.ldap.common.schema.SyntaxChecker;
-import org.apache.eve.schema.SyntaxCheckerRegistry;
-
 import javax.naming.NamingException;
 
+import org.apache.eve.schema.SyntaxCheckerRegistry;
+
 
 /**
  * A simple Syntax factory for the core LDAP schema in Section 4.3.2 of
@@ -96,24 +94,23 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class CoreSyntaxProducer implements BootstrapProducer
+public class CoreSyntaxProducer extends AbstractBootstrapProducer
 {
+    public CoreSyntaxProducer()
+    {
+        super( ProducerTypeEnum.SYNTAX_PRODUCER );
+    }
+
 
     // ------------------------------------------------------------------------
     // BootstrapProducer Methods
     // ------------------------------------------------------------------------
 
 
-    public ProducerTypeEnum getType()
-    {
-        return ProducerTypeEnum.SYNTAX_PRODUCER;
-    }
-
-
     public void produce( BootstrapRegistries registries, ProducerCallback cb )
         throws NamingException
     {
-        MutableSyntax syntax;
+        BootstrapSyntax syntax;
         SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
 
         /*
@@ -134,52 +131,52 @@
          * 8 Certificate List                N  1.3.6.1.4.1.1466.115.121.1.9
          * 9 Certificate Pair                N  1.3.6.1.4.1.1466.115.121.1.10
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.1", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.1", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "ACI Item" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.2", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.2", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Access Point" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.3", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.3", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Attribute Type Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.4", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.4", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Audio" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.5", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.5", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Binary" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.6", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.6", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Bit String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.7", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.7", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Boolean" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.8", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.8", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Certificate" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.9", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.9", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Certificate List" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.10", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.10", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Certificate Pair" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
@@ -198,52 +195,52 @@
          * 18 DSA Quality Syntax              Y  1.3.6.1.4.1.1466.115.121.1.19
          * 19 DSE Type                        Y  1.3.6.1.4.1.1466.115.121.1.20
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.11", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.11", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Country String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.12", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.12", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DN" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.13", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.13", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Data Quality Syntax" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.14", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.14", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Delivery Method" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.15", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.15", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Directory String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.16", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.16", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DIT Content Rule Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.17", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.17", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DIT Structure Rule Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.18", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.18", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DL Submit Permission" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.19", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.19", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DSA Quality Syntax" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.20", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.20", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "DSE Type" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
@@ -262,52 +259,52 @@
          * 28 Master And Shadow Access Points Y  1.3.6.1.4.1.1466.115.121.1.29
          * 29 Matching Rule Description       Y  1.3.6.1.4.1.1466.115.121.1.30
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.21", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.21", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Enhanced Guide" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.22", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.22", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Facsimile Telephone Number" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.23", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.23", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Fax" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.24", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.24", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Generalized Time" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.25", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.25", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Guide" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.26", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.26", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "IA5 String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.27", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.27", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "INTEGER" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.28", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.28", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "JPEG" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.29", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.29", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Master And Shadow Access Points" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.30", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.30", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Matching Rule Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
@@ -326,52 +323,52 @@
          * 38 Other Mailbox                   Y  1.3.6.1.4.1.1466.115.121.1.39
          * 39 Octet String                    Y  1.3.6.1.4.1.1466.115.121.1.40
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.31", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.31", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Matching Rule Use Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.32", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.32", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Mail Preference" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.33", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.33", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "MHS OR Address" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.34", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.34", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Name And Optional UID" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.35", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.35", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Name Form Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.36", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.36", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Numeric String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.37", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.37", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Object Class Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.38", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.38", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "OID" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.39", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.39", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Other Mailbox" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.40", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.40", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Octet String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
@@ -390,52 +387,52 @@
          * 48 Supported Algorithm             N  1.3.6.1.4.1.1466.115.121.1.49
          * 49 Telephone Number                Y  1.3.6.1.4.1.1466.115.121.1.50
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.41", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.41", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Postal Address" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.42", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.42", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Protocol Information" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.43", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.43", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Presentation Address" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.44", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.44", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Printable String" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.45", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.45", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Subtree Specification" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.46", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.46", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Supplier Information" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.47", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.47", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Supplier Or Consumer" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.48", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.48", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Supplier And Consumer" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.49", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.49", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Supported Algorithm" } );
         syntax.setHumanReadible( false );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.50", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.50", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Telephone Number" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
@@ -452,87 +449,44 @@
          * 56 LDAP BootstrapSchema 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
          */
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.51", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.51", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Teletex Terminal Identifier" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.52", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.52", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Telex Number" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.53", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.53", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "UTC Time" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.54", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.54", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "LDAP Syntax Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.55", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.55", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Modify Rights" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.56", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.56", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "LDAP BootstrapSchema Definition" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.57", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.57", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "LDAP BootstrapSchema Description" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
-        syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.58", syntaxCheckerRegistry
);
+        syntax = new BootstrapSyntax( "1.3.6.1.4.1.1466.115.121.1.58", syntaxCheckerRegistry
);
         syntax.setNames( new String[] { "Substring Assertion" } );
         syntax.setHumanReadible( true );
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
-    }
-
-
-    /**
-     * Used to access protected mutators of AbstractSyntax from within this class.
-     */
-    private static class MutableSyntax extends AbstractSyntax
-    {
-        final SyntaxCheckerRegistry registry;
-
-
-        protected MutableSyntax( String oid, SyntaxCheckerRegistry registry )
-        {
-            super( oid );
-
-            this.registry = registry;
-        }
-
-
-        protected void setHumanReadible( boolean isHumanReadible )
-        {
-            super.setHumanReadible( isHumanReadible );
-        }
-
-
-        protected void setNames( String[] names )
-        {
-            super.setNames( names );
-        }
-
-
-
-
-        public SyntaxChecker getSyntaxChecker( ) throws NamingException
-        {
-            return registry.lookup( getOid() );
-        }
-
-
-        public boolean isObsolete()
-        {
-            return false;
-        }
     }
 }

Mime
View raw message