org.apache.directory.shared.ldap.sp
Class JavaStoredProcUtils

java.lang.Object
  extended by org.apache.directory.shared.ldap.sp.JavaStoredProcUtils

public class JavaStoredProcUtils
extends java.lang.Object

A utility class for working with Java Stored Procedures at the base level.

Version:
$Rev:$
Author:
Apache Directory Project

Constructor Summary
JavaStoredProcUtils()
           
 
Method Summary
static java.lang.Object callStoredProcedure(javax.naming.ldap.LdapContext ctx, java.lang.String procedureName, java.lang.Object[] arguments)
           
static byte[] getClassFileAsStream(java.lang.Class<?> clazz)
          Returns the stream data of a Java class.
static void loadStoredProcedureClass(javax.naming.ldap.LdapContext ctx, java.lang.Class<?> clazz)
          Loads a Java class's stream data as a subcontext of an LdapContext given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaStoredProcUtils

public JavaStoredProcUtils()
Method Detail

getClassFileAsStream

public static byte[] getClassFileAsStream(java.lang.Class<?> clazz)
                                   throws javax.naming.NamingException
Returns the stream data of a Java class.

Parameters:
clazz - The class whose stream data will be retrieved.
Returns:
Stream data of the class file as a byte array.
Throws:
javax.naming.NamingException - If an IO error occurs during reading the class file.

loadStoredProcedureClass

public static void loadStoredProcedureClass(javax.naming.ldap.LdapContext ctx,
                                            java.lang.Class<?> clazz)
                                     throws javax.naming.NamingException
Loads a Java class's stream data as a subcontext of an LdapContext given.

Parameters:
ctx - The parent context of the Java class entry to be loaded.
clazz - Class to be loaded.
Throws:
javax.naming.NamingException - If an error occurs during creating the subcontext.

callStoredProcedure

public static java.lang.Object callStoredProcedure(javax.naming.ldap.LdapContext ctx,
                                                   java.lang.String procedureName,
                                                   java.lang.Object[] arguments)
                                            throws javax.naming.NamingException
Throws:
javax.naming.NamingException


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.