org.apache.directory.server.core.sp
Class StoredProcExecutionManager

java.lang.Object
  extended by org.apache.directory.server.core.sp.StoredProcExecutionManager

public class StoredProcExecutionManager
extends java.lang.Object

A Factory type class which holds a registry of supported StoredProcEngineConfigs. A container reference as the base for Stored Procedure storage on the DIT is also handled by this class.

Version:
$Rev$ $Date$
Author:
Apache Directory Project

Constructor Summary
StoredProcExecutionManager(java.lang.String storedProcContainer, java.util.List<StoredProcEngineConfig> storedProcEngineConfigs)
          Creates a StoredProcExecutionManager instance.
 
Method Summary
 ClonedServerEntry findStoredProcUnit(CoreSession session, java.lang.String fullSPName)
          Finds and returns a stored procedure unit entry whose identifier name is extracted from fullSPName.
 StoredProcEngine getStoredProcEngineInstance(ClonedServerEntry spUnitEntry)
          Initializes and returns a StoredProcEngine instance which can operate on spUnitEntry considering its specific stored procedure language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoredProcExecutionManager

public StoredProcExecutionManager(java.lang.String storedProcContainer,
                                  java.util.List<StoredProcEngineConfig> storedProcEngineConfigs)
Creates a StoredProcExecutionManager instance.

Parameters:
storedProcContainer - The base of the DIT subtree used for storing stored procedure units.
storedProcEngineConfigs - A list of StoredProcEngineConfigs to register different StoredProcEngines with this manager.
Method Detail

findStoredProcUnit

public ClonedServerEntry findStoredProcUnit(CoreSession session,
                                            java.lang.String fullSPName)
                                     throws java.lang.Exception
Finds and returns a stored procedure unit entry whose identifier name is extracted from fullSPName.

Parameters:
rootDSE - A handle on the root DSE to be used for searching the SP Unit over.
fullSPName - Full name of the Stored Procedure including the unit name.
Returns:
The entry associated with the SP Unit.
Throws:
javax.naming.NamingException - If the unit cannot be located or any other error occurs.
java.lang.Exception

getStoredProcEngineInstance

public StoredProcEngine getStoredProcEngineInstance(ClonedServerEntry spUnitEntry)
                                             throws javax.naming.NamingException
Initializes and returns a StoredProcEngine instance which can operate on spUnitEntry considering its specific stored procedure language.

Parameters:
spUnitEntry - The entry which a StoredProcEngine type will be mathched with respect to the language identifier.
Returns:
A StoredProcEngine associated with spUnitEntry.
Throws:
javax.naming.NamingException - If no StoredProcEngine that can be associated with the language identifier in spUnitEntry can be found.


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