01: package org.esupportail.cas.server.handlers.ldap;
02:
03: import org.dom4j.Element;
04: import org.esupportail.cas.server.util.RedundantHandler;
05:
06: /**
07: * This abstract class implements an LDAP handler class, inherited by
08: * FastBindLdapHandler and BindLdapHandler.
09: *
10: * @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
11: */
12: abstract class LdapHandler extends RedundantHandler {
13: /**
14: * The filter for the usernames provided by the users.
15: */
16: private String filter;
17:
18: /**
19: * Constructor.
20: *
21: * @param handlerElement the XML element that declares the handler
22: * in the configuration file
23: * @param configDebug debugging mode of the global configuration
24: * @throws Exception Exception
25: */
26: protected LdapHandler(final Element handlerElement,
27: final Boolean configDebug) throws Exception {
28: super (handlerElement, configDebug);
29: traceBegin();
30:
31: // check that a config element is present
32: checkConfigElement(true);
33:
34: filter = getConfigSubElementContent("filter", true/*needed*/);
35: trace("filter = " + filter);
36:
37: traceEnd();
38: }
39:
40: /**
41: * Retrieve the filter of the usernames.
42: *
43: * @return a String Object.
44: */
45: final String getFilter() {
46: return filter;
47: }
48:
49: }
|