01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.ldap;
07:
08: import javax.naming.NamingException;
09: import javax.naming.directory.DirContext;
10:
11: /**
12: * The <code>ILdapServer</code> interface defines a set of methods
13: * to be used to create a connection to an LDAP server, release the
14: * connection and get information about the connection.
15: *
16: * @author Eric Dalquist <a href="mailto:edalquist@unicon.net">edalquist@unicon.net</a>
17: * @version $Revision: 35070 $
18: */
19: public interface ILdapServer {
20:
21: /**
22: * Gets an LDAP directory context.
23: *
24: * @return an LDAP directory context object.
25: * @throws NamingException If there is a problem connecting to the ldap server.
26: */
27: public DirContext getConnection() throws NamingException;
28:
29: /**
30: * Gets the base DN used to search the LDAP directory context.
31: *
32: * @return a DN to use as reference point or context for queries
33: */
34: public String getBaseDN();
35:
36: /**
37: * Gets the uid attribute used to search the LDAP directory context.
38: *
39: * @return a DN to use as reference point or context for queries
40: */
41: public String getUidAttribute();
42:
43: /**
44: * Releases an LDAP directory context.
45: *
46: * @param conn an LDAP directory context object
47: */
48: public void releaseConnection(DirContext conn);
49:
50: }
|