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/01/19 04:54:29 UTC
svn commit: rev 6225 - in incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker: . api api/src api/src/java api/src/java/org api/src/java/org/apache api/src/java/org/apache/eve api/src/java/org/apache/eve/schema
Author: akarasulu
Date: Sun Jan 18 19:54:29 2004
New Revision: 6225
Added:
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/ (props changed)
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.properties
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.xml
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistry.java
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitor.java
incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitorAdapter.java
Log:
added SyntaxChecker registry api
Added: incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.properties
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.properties Sun Jan 18 19:54:29 2004
@@ -0,0 +1,14 @@
+maven.javadoc.private=true
+maven.javadoc.overview=src/java/org/apache/eve/schema/overview.html
+maven.javadoc.customtags=tag1 tag2
+
+tag1.name=todo
+tag1.description=To Do:
+tag1.enabled=true
+tag1.scope=all
+
+tag2.name=task
+tag2.description=Task:
+tag2.enabled=false
+tag2.scope=all
+
Added: incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.xml
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/project.xml Sun Jan 18 19:54:29 2004
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+ <extend>${basedir}/../../../../project.xml</extend>
+ <groupId>directory</groupId>
+ <id>eve-backend-schema-syntax-checker-api</id>
+
+ <name>Eve Backend Schema's SyntaxChecker Registry API</name>
+ <package>org.apache.eve.schema</package>
+ <currentVersion>SNAPSHOT</currentVersion>
+ <inceptionYear>2002</inceptionYear>
+
+ <shortDescription>Eve Backend Schema's SyntaxChecker Registry API</shortDescription>
+
+ <description>
+ Eve's backend subsystem contains several components to manage schema
+ objects. One of those components is a name to SyntaxChecker registry.
+ The registry is responsible for looking up and adding SyntaxCheckers.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>directory</groupId>
+ <artifactId>eve-backend-schema-common-api</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://directory.apache.org/eve/backend/schema/common/api</url>
+ </dependency>
+ </dependencies>
+</project>
+
Added: incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistry.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistry.java Sun Jan 18 19:54:29 2004
@@ -0,0 +1,97 @@
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve"
+ and "Apache Software Foundation" must not be used to endorse or promote
+ products derived from this software without prior written
+ permission. For written permission, please contact apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * SyntaxChecker registry component's service interface.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $LastChangedBy$
+ * @version $LastChangedRevision$
+ */
+public interface SyntaxCheckerRegistry
+{
+ /** Avalon service role */
+ String ROLE = SyntaxCheckerRegistry.class.getName() ;
+
+ /**
+ * Registers a SyntaxChecker with this registry.
+ *
+ * @param a_syntaxChecker the SyntaxChecker to register
+ * @throws NamingException if the SyntaxChecker is already registered or the
+ * registration operation is not supported
+ */
+ void register( SyntaxChecker a_syntaxChecker, String a_oid )
+ throws NamingException ;
+
+ /**
+ * Looks up a SyntaxChecker by its unique Object Identifier.
+ *
+ * @param a_oid the object identifier
+ * @return the SyntaxChecker for the oid
+ * @throws NamingException if there is a backing store failure or the
+ * SyntaxChecker does not exist.
+ */
+ SyntaxChecker lookup( String a_oid ) throws NamingException ;
+
+ /**
+ * Checks to see if a SyntaxChecker exists. Backing store failures simply
+ * return false.
+ *
+ * @param a_oid the object identifier
+ * @return true if a SyntaxChecker definition exists for the oid, false
+ * otherwise
+ */
+ boolean hasSyntaxChecker( String a_oid ) ;
+}
Added: incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitor.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitor.java Sun Jan 18 19:54:29 2004
@@ -0,0 +1,95 @@
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve"
+ and "Apache Software Foundation" must not be used to endorse or promote
+ products derived from this software without prior written
+ permission. For written permission, please contact apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Monitor interface for a SyntaxCheckerRegistry.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Rev: 1463 $
+ */
+public interface SyntaxCheckerRegistryMonitor
+{
+ /**
+ * Monitors when a SyntaxChecker is registered successfully.
+ *
+ * @param a_syntaxChecker the SyntaxChecker registered
+ */
+ void registered( SyntaxChecker a_syntaxChecker ) ;
+
+ /**
+ * Monitors when a SyntaxChecker is successfully looked up.
+ *
+ * @param a_syntaxChecker the SyntaxChecker looked up
+ */
+ void lookedUp( SyntaxChecker a_syntaxChecker ) ;
+
+ /**
+ * Monitors when a lookup attempt fails.
+ *
+ * @param a_oid the OID for the SyntaxChecker to lookup
+ * @param a_fault the exception to be thrown for the fault
+ */
+ void lookupFailed( String a_oid, NamingException a_fault ) ;
+
+ /**
+ * Monitors when a registration attempt fails.
+ *
+ * @param a_syntaxChecker the SyntaxChecker which failed registration
+ * @param a_fault the exception to be thrown for the fault
+ */
+ void registerFailed( SyntaxChecker a_syntaxChecker,
+ NamingException a_fault ) ;
+}
Added: incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitorAdapter.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax-checker/api/src/java/org/apache/eve/schema/SyntaxCheckerRegistryMonitorAdapter.java Sun Jan 18 19:54:29 2004
@@ -0,0 +1,101 @@
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve"
+ and "Apache Software Foundation" must not be used to endorse or promote
+ products derived from this software without prior written
+ permission. For written permission, please contact apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * An adapter for the SyntaxCheckerRegistry's monitor.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Rev: 1463 $
+ */
+public class SyntaxCheckerRegistryMonitorAdapter
+ implements SyntaxCheckerRegistryMonitor
+{
+ /* (non-Javadoc)
+ * @see org.apache.eve.schema.SyntaxCheckerRegistryMonitor#registered(
+ * org.apache.eve.schema.SyntaxChecker)
+ */
+ public void registered( SyntaxChecker a_syntaxChecker)
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.schema.SyntaxCheckerRegistryMonitor#lookedUp(
+ * org.apache.eve.schema.SyntaxChecker)
+ */
+ public void lookedUp( SyntaxChecker a_syntaxChecker )
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.schema.SyntaxCheckerRegistryMonitor#lookupFailed(
+ * java.lang.String, javax.naming.NamingException)
+ */
+ public void lookupFailed( String a_oid, NamingException a_fault )
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.eve.schema.SyntaxCheckerRegistryMonitor#registerFailed(
+ * org.apache.eve.schema.SyntaxChecker, javax.naming.NamingException)
+ */
+ public void registerFailed( SyntaxChecker a_syntaxChecker,
+ NamingException a_fault )
+ {
+ }
+}