directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r351693 - in /directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs: JavaStoredProcedureExtendedOperationHandler.java LanguageSpecificStoredProceureExtendedOperationHandler.java
Date Fri, 02 Dec 2005 11:57:39 GMT
Author: ersiner
Date: Fri Dec  2 03:57:28 2005
New Revision: 351693

URL: http://svn.apache.org/viewcvs?rev=351693&view=rev
Log:
Added an interface for language specific stored procedure extended operation handlers. (We
also have an interface for language specific stored procedure implementations in the core.)
Made the Java stored procedure extended operation handler implement this interface.

TODO: We need to figure out if we're really designing this system generic enough.

Added:
    directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LanguageSpecificStoredProceureExtendedOperationHandler.java
Modified:
    directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/JavaStoredProcedureExtendedOperationHandler.java

Modified: directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/JavaStoredProcedureExtendedOperationHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/JavaStoredProcedureExtendedOperationHandler.java?rev=351693&r1=351692&r2=351693&view=diff
==============================================================================
--- directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/JavaStoredProcedureExtendedOperationHandler.java
(original)
+++ directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/JavaStoredProcedureExtendedOperationHandler.java
Fri Dec  2 03:57:28 2005
@@ -34,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$ $Date$
  */
-public class JavaStoredProcedureExtendedOperationHandler
+public class JavaStoredProcedureExtendedOperationHandler implements LanguageSpecificStoredProceureExtendedOperationHandler
 {
     public JavaStoredProcedureExtendedOperationHandler()
     {
@@ -42,7 +42,7 @@
     }
     
     // TODO this method could be defined by an interface
-    public void handleStoredProcedureExtendedOperation( ServerLdapContext serverLdapContext,
StoredProcedurePojo pojo ) throws ClassNotFoundException, NamingException
+    public void handleStoredProcedureExtendedOperation( ServerLdapContext ctx, StoredProcedurePojo
pojo ) throws ClassNotFoundException, NamingException
     {
         List types = new ArrayList( pojo.getParameters().size() );
         List values = new ArrayList( pojo.getParameters().size() );
@@ -56,7 +56,7 @@
         }
         
         // TODO determine what to do with the exception
-        serverLdapContext.executeProcedure( 
+        ctx.executeProcedure( 
                 StringUtils.toUtf8( pojo.getProcedure() ), 
                 ( Class[] ) types.toArray(),
                 values.toArray()

Added: directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LanguageSpecificStoredProceureExtendedOperationHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LanguageSpecificStoredProceureExtendedOperationHandler.java?rev=351693&view=auto
==============================================================================
--- directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LanguageSpecificStoredProceureExtendedOperationHandler.java
(added)
+++ directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LanguageSpecificStoredProceureExtendedOperationHandler.java
Fri Dec  2 03:57:28 2005
@@ -0,0 +1,43 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed 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.ldap.server.storedprocs;
+
+import org.apache.ldap.server.jndi.ServerLdapContext;
+
+
+/**
+ * An extension (hook) point that enables an implementor to provide his or her
+ * own Stored Procedure Extended Operation handler.  
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$ $Date$
+ *
+ */
+public interface LanguageSpecificStoredProceureExtendedOperationHandler
+{
+    /**
+     * Handles the specified extended operation.
+     * 
+     * @param session the MINA session object related with current connection
+     * @param req the LDAP Extended operation request
+     * 
+     * @throws Exception if failed to handle the operation
+     */
+    void handleStoredProcedureExtendedOperation( ServerLdapContext ctx, StoredProcedurePojo
pojo ) throws Exception;
+}



Mime
View raw message