net.sf.ldaptemplate
Interface ContextSource

All Known Implementing Classes:
AbstractContextSource

public interface ContextSource

Interface used to retrieve and authenticate LDAP contexts.

Author:
Adam Skogman, Mattias Arthursson
See Also:
LdapTemplate

Method Summary
 javax.naming.directory.DirContext getReadOnlyContext()
          Gets a read only LDAP context.
 javax.naming.directory.DirContext getReadWriteContext()
          Gets a read-write LDAP context.
 

Method Detail

getReadOnlyContext

public javax.naming.directory.DirContext getReadOnlyContext()
                                                     throws org.springframework.dao.DataAccessException
Gets a read only LDAP context. You are only gaurrantied that you can read from the context, but it is not enforced.

Returns:
An DirContext, never null.
Throws:
org.springframework.dao.DataAccessException - if some error occurs creating an DirContext.

getReadWriteContext

public javax.naming.directory.DirContext getReadWriteContext()
                                                      throws org.springframework.dao.DataAccessException
Gets a read-write LDAP context.

Returns:
an DirContext, never null.
Throws:
org.springframework.dao.DataAccessException - if some error occurs creating an DirContext.


Copyright © 2006 Jayway AB. All Rights Reserved.