org.apache.directory.server.integ
Class ServerIntegrationUtils

java.lang.Object
  extended by org.apache.directory.server.core.integ.IntegrationUtils
      extended by org.apache.directory.server.integ.ServerIntegrationUtils

public class ServerIntegrationUtils
extends IntegrationUtils


Constructor Summary
ServerIntegrationUtils()
           
 
Method Summary
static org.apache.directory.ldap.client.api.LdapConnection getClientApiConnection(LdapServer ldapServer)
           
static netscape.ldap.LDAPConnection getWiredConnection(LdapServer ldapServer)
           
static netscape.ldap.LDAPConnection getWiredConnection(LdapServer ldapServer, java.lang.String principalDn, java.lang.String password)
           
static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer, org.apache.directory.shared.ldap.message.control.Control[] controls)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer, java.lang.String principalDn, java.lang.String password)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
static javax.naming.ldap.LdapContext getWiredContextFollowOnRefferal(LdapServer ldapServer)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
static javax.naming.ldap.LdapContext getWiredContextRefferalIgnore(LdapServer ldapServer)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
static javax.naming.ldap.LdapContext getWiredContextThrowOnRefferal(LdapServer ldapServer)
          Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider.
 
Methods inherited from class org.apache.directory.server.core.integ.IntegrationUtils
apply, closeConections, disableSchema, doDelete, enableSchema, getAdminConnection, getConnectionAs, getConnectionAs, getConnectionAs, getContext, getCoreSession, getRootContext, getSchemaContext, getSystemContext, getUserAddLdif, getUserAddLdif, injectEntries, isDisabled, isEnabled, isLoaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerIntegrationUtils

public ServerIntegrationUtils()
Method Detail

getWiredContext

public static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer)
                                                     throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredContext

public static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer,
                                                            java.lang.String principalDn,
                                                            java.lang.String password)
                                                     throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredContext

public static javax.naming.ldap.LdapContext getWiredContext(LdapServer ldapServer,
                                                            org.apache.directory.shared.ldap.message.control.Control[] controls)
                                                     throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredContextThrowOnRefferal

public static javax.naming.ldap.LdapContext getWiredContextThrowOnRefferal(LdapServer ldapServer)
                                                                    throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredContextRefferalIgnore

public static javax.naming.ldap.LdapContext getWiredContextRefferalIgnore(LdapServer ldapServer)
                                                                   throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredContextFollowOnRefferal

public static javax.naming.ldap.LdapContext getWiredContextFollowOnRefferal(LdapServer ldapServer)
                                                                     throws java.lang.Exception
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE.

Parameters:
ldapServer - the LDAP server to get the connection to
Returns:
an LdapContext as the administrative user to the RootDSE
Throws:
java.lang.Exception - if there are problems creating the context

getWiredConnection

public static netscape.ldap.LDAPConnection getWiredConnection(LdapServer ldapServer)
                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getWiredConnection

public static netscape.ldap.LDAPConnection getWiredConnection(LdapServer ldapServer,
                                                              java.lang.String principalDn,
                                                              java.lang.String password)
                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getClientApiConnection

public static org.apache.directory.ldap.client.api.LdapConnection getClientApiConnection(LdapServer ldapServer)
                                                                                  throws java.lang.Exception
Throws:
java.lang.Exception


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