com.atlassian.user.impl.ldap.repository
Class DefaultLdapContextFactory

java.lang.Object
  extended bycom.atlassian.user.impl.ldap.repository.DefaultLdapContextFactory
All Implemented Interfaces:
LdapContextFactory

public class DefaultLdapContextFactory
extends java.lang.Object
implements LdapContextFactory


Field Summary
 
Fields inherited from interface com.atlassian.user.impl.ldap.repository.LdapContextFactory
BASE_GROUP_NAMESPACE, BASE_USER_NAMESPACE, BATCH_SIZE, EMAIL_ATTRIBUTE, FIRSTNAME_ATTRIBUTE, GROUP_SEARCH_ALL_DEPTHS, GROUP_SEARCH_FILTER, GROUPNAME_ATTRIBUTE, HOST, JNDI_INITIAL_CONTEXT_FACTORY, MEMBERSHIP_ATTRIBUTE, PASSWORD_ATTRIBUTE, PORT, PROVIDER_URL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIAL, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, SURNAME_ATTRIBUTE, TIME_TO_LIVE, USE_UNQUALIFIED_USER_NAME_FOR_MEMBERSHIP_COMPARISON, USER_SEARCH_ALL_DEPTHS, USER_SEARCH_FILTER, USERNAME_ATTRIBUTE
 
Constructor Summary
DefaultLdapContextFactory(LdapConnectionProperties connectionProperties)
           
 
Method Summary
 java.util.Hashtable getAuthenticationJndiEnvironment(java.lang.String userDn, java.lang.String password)
          Returns a JNDI environment suitable for passing to InitialDirContext#InitialContext(Hashtable).
 java.util.Hashtable getJNDIEnv()
          Returns a JNDI environment suitable for passing to InitialDirContext.InitialDirContext(Hashtable).
 javax.naming.directory.DirContext getLDAPContext()
          Opens a new connection to the LDAP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLdapContextFactory

public DefaultLdapContextFactory(LdapConnectionProperties connectionProperties)
Method Detail

getJNDIEnv

public java.util.Hashtable getJNDIEnv()
Description copied from interface: LdapContextFactory
Returns a JNDI environment suitable for passing to InitialDirContext.InitialDirContext(Hashtable). The environment is suitable for a connection using all the configuration specified in the other properties on this object.

Specified by:
getJNDIEnv in interface LdapContextFactory

getAuthenticationJndiEnvironment

public java.util.Hashtable getAuthenticationJndiEnvironment(java.lang.String userDn,
                                                            java.lang.String password)
Description copied from interface: LdapContextFactory
Returns a JNDI environment suitable for passing to InitialDirContext#InitialContext(Hashtable). The environment is suitable for a connection for authenticating the username and password provided.

Specified by:
getAuthenticationJndiEnvironment in interface LdapContextFactory

getLDAPContext

public javax.naming.directory.DirContext getLDAPContext()
                                                 throws RepositoryException
Description copied from interface: LdapContextFactory
Opens a new connection to the LDAP server.

Specified by:
getLDAPContext in interface LdapContextFactory
Returns:
an LDAP directory context suitable for interacting with the LDAP server
Throws:
RepositoryException - if there was a problem opening the connection


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.