directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r558465 - in /directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap: ApacheSyntaxCheckerProducer.java ApacheSyntaxProducer.java
Date Sun, 22 Jul 2007 07:31:31 GMT
Author: akarasulu
Date: Sun Jul 22 00:31:29 2007
New Revision: 558465

URL: http://svn.apache.org/viewvc?view=rev&rev=558465
Log:
adding some more syntax checkers and syntaxes to the apache schema producers

Added:
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java
  (with props)
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java
  (with props)

Added: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java?view=auto&rev=558465
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java
(added)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java
Sun Jul 22 00:31:29 2007
@@ -0,0 +1,71 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.server.schema.bootstrap;
+
+
+import javax.naming.NamingException;
+import org.apache.directory.server.schema.registries.*;
+import org.apache.directory.shared.ldap.schema.syntax.JavaByteSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.JavaIntegerSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.JavaShortSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
+
+
+
+/**
+ * A producer of SyntaxChecker objects for the apache schema.  
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ApacheSyntaxCheckerProducer extends AbstractBootstrapProducer
+{
+    public ApacheSyntaxCheckerProducer()
+    {
+        super( ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER );
+    }
+
+
+    // ------------------------------------------------------------------------
+    // BootstrapProducer Methods
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * @see BootstrapProducer#produce(Registries, ProducerCallback)
+     */
+    public void produce( Registries registries, ProducerCallback cb )
+        throws NamingException
+    {
+        SyntaxChecker checker = null;
+        
+        checker = new JavaByteSyntaxChecker();
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
+        
+        checker = new JavaShortSyntaxChecker();
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
+        
+        checker = new JavaIntegerSyntaxChecker();
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
+        
+        checker = new JavaIntegerSyntaxChecker();
+        cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
+    }
+}

Propchange: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxCheckerProducer.java
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java?view=auto&rev=558465
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java
(added)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java
Sun Jul 22 00:31:29 2007
@@ -0,0 +1,111 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.server.schema.bootstrap;
+
+
+import javax.naming.NamingException;
+import org.apache.directory.server.schema.registries.*;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.schema.AbstractSyntax;
+import org.apache.directory.shared.ldap.schema.Syntax;
+import org.apache.directory.shared.ldap.schema.syntax.JavaByteSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.JavaIntegerSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.JavaLongSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.JavaShortSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
+
+
+
+/**
+ * A producer of Syntax objects for the apache schema.  This code has been
+ * automatically generated using schema files in the OpenLDAP format along with
+ * the directory plugin for maven.  This has been done to facilitate
+ * OpenLDAP schema interoperability.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ApacheSyntaxProducer extends AbstractBootstrapProducer
+{
+    private final static JavaByteSyntaxChecker JAVA_BYTE_SYNTAX_CHECKER = new JavaByteSyntaxChecker();
+    private final static JavaShortSyntaxChecker JAVA_SHORT_SYNTAX_CHECKER = new JavaShortSyntaxChecker();
+    private final static JavaIntegerSyntaxChecker JAVA_INT_SYNTAX_CHECKER = new JavaIntegerSyntaxChecker();
+    private final static JavaLongSyntaxChecker JAVA_LONG_SYNTAX_CHECKER = new JavaLongSyntaxChecker();
+
+    public ApacheSyntaxProducer()
+    {
+        super( ProducerTypeEnum.SYNTAX_PRODUCER );
+    }
+
+
+    // ------------------------------------------------------------------------
+    // BootstrapProducer Methods
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * @see BootstrapProducer#produce(Registries, ProducerCallback)
+     */
+    public void produce( Registries registries, ProducerCallback cb )
+        throws NamingException
+    {
+        Syntax syntax = null;
+        
+        syntax = new AbstractSyntax( SchemaConstants.JAVA_BYTE_SYNTAX )
+        {
+            private static final long serialVersionUID = 1L;
+            public SyntaxChecker getSyntaxChecker() throws NamingException
+            {
+                return JAVA_BYTE_SYNTAX_CHECKER;
+            }
+        };
+        cb.schemaObjectProduced( this, syntax.getOid(), syntax );
+
+        syntax = new AbstractSyntax( SchemaConstants.JAVA_SHORT_SYNTAX )
+        {
+            private static final long serialVersionUID = 1L;
+            public SyntaxChecker getSyntaxChecker() throws NamingException
+            {
+                return JAVA_SHORT_SYNTAX_CHECKER;
+            }
+        };
+        cb.schemaObjectProduced( this, syntax.getOid(), syntax );
+
+        syntax = new AbstractSyntax( SchemaConstants.JAVA_INT_SYNTAX )
+        {
+            private static final long serialVersionUID = 1L;
+            public SyntaxChecker getSyntaxChecker() throws NamingException
+            {
+                return JAVA_INT_SYNTAX_CHECKER;
+            }
+        };
+        cb.schemaObjectProduced( this, syntax.getOid(), syntax );
+
+        syntax = new AbstractSyntax( SchemaConstants.JAVA_LONG_SYNTAX )
+        {
+            private static final long serialVersionUID = 1L;
+            public SyntaxChecker getSyntaxChecker() throws NamingException
+            {
+                return JAVA_LONG_SYNTAX_CHECKER;
+            }
+        };
+        cb.schemaObjectProduced( this, syntax.getOid(), syntax );
+    }
+}

Propchange: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheSyntaxProducer.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message