scriptella.driver.ldap
Class LdapConnection

java.lang.Object
  extended by scriptella.spi.AbstractConnection
      extended by scriptella.driver.ldap.LdapConnection
All Implemented Interfaces:
scriptella.spi.Connection

public class LdapConnection
extends scriptella.spi.AbstractConnection

Represents a connection to a directory context.

For configuration details and examples see overview page.

Version:
1.0
Author:
Fyodor Kupolov

Nested Class Summary
 
Nested classes/interfaces inherited from class scriptella.spi.AbstractConnection
scriptella.spi.AbstractConnection.StatementCounter
 
Field Summary
static java.lang.String FILE_MAXLENGTH_KEY
          Names of the Max File Length connection property.
static java.lang.String SEARCH_BASEDN_KEY
          Name of the Search base DN connection property.
static java.lang.String SEARCH_COUNTLIMIT_KEY
          Name of the Count Limit(maximum number of entries to be returned) connection property.
static java.lang.String SEARCH_SCOPE_KEY
          Name of the Search scope connection property.
static java.lang.String SEARCH_TIMELIMIT_KEY
          Name of the Time Limit connection property.
 
Fields inherited from class scriptella.spi.AbstractConnection
counter
 
Constructor Summary
LdapConnection()
           
LdapConnection(scriptella.spi.ConnectionParameters parameters)
          Creates a connnection to a directory.
 
Method Summary
 void close()
           
 void executeQuery(scriptella.spi.Resource queryContent, scriptella.spi.ParametersCallback parametersCallback, scriptella.spi.QueryCallback queryCallback)
           
 void executeScript(scriptella.spi.Resource scriptContent, scriptella.spi.ParametersCallback parametersCallback)
           
protected  void initializeContext(java.util.Hashtable<java.lang.String,java.lang.Object> env)
          Creates a directory context.
 
Methods inherited from class scriptella.spi.AbstractConnection
commit, getDialectIdentifier, getExecutedStatementsCount, isReadonly, rollback, setDialectIdentifier, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEARCH_SCOPE_KEY

public static final java.lang.String SEARCH_SCOPE_KEY
Name of the Search scope connection property.

The value must be one of the: object, onelevel, subtree

See Also:
SearchControls.setSearchScope(int), Constant Field Values

SEARCH_BASEDN_KEY

public static final java.lang.String SEARCH_BASEDN_KEY
Name of the Search base DN connection property.

See Also:
DirContext.search(String,javax.naming.directory.Attributes), Constant Field Values

SEARCH_TIMELIMIT_KEY

public static final java.lang.String SEARCH_TIMELIMIT_KEY
Name of the Time Limit connection property.

The value must be integer.

See Also:
SearchControls.setTimeLimit(int), Constant Field Values

SEARCH_COUNTLIMIT_KEY

public static final java.lang.String SEARCH_COUNTLIMIT_KEY
Name of the Count Limit(maximum number of entries to be returned) connection property.

The value must be integer.

See Also:
SearchControls.setCountLimit(long), Constant Field Values

FILE_MAXLENGTH_KEY

public static final java.lang.String FILE_MAXLENGTH_KEY
Names of the Max File Length connection property.

This property specifies the maximum size in Kb of the external files referenced from LDIFs. The default value is 10000 (10MB)

See Also:
Constant Field Values
Constructor Detail

LdapConnection

public LdapConnection()

LdapConnection

public LdapConnection(scriptella.spi.ConnectionParameters parameters)
Creates a connnection to a directory.

Parameters:
parameters - parameters to establish connection.
Method Detail

initializeContext

protected void initializeContext(java.util.Hashtable<java.lang.String,java.lang.Object> env)
Creates a directory context.

Parameters:
env - environment to create initial context.

executeScript

public void executeScript(scriptella.spi.Resource scriptContent,
                          scriptella.spi.ParametersCallback parametersCallback)
                   throws scriptella.spi.ProviderException
Throws:
scriptella.spi.ProviderException

executeQuery

public void executeQuery(scriptella.spi.Resource queryContent,
                         scriptella.spi.ParametersCallback parametersCallback,
                         scriptella.spi.QueryCallback queryCallback)
                  throws scriptella.spi.ProviderException
Throws:
scriptella.spi.ProviderException

close

public void close()
           throws scriptella.spi.ProviderException
Throws:
scriptella.spi.ProviderException


Copyright © Copyright 2006-2009 The Scriptella Project Team.