Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.ldap
Class LdapServices

    java.lang.Object
      org.jasig.portal.ldap.LdapServices

    public final class LdapServices

extends java.lang.Object

Provides LDAP access in a way similar to a relational DBMS. This class was modified for the 2.4 release to function more like `RDBMServices`. The class should be used via the static `getDefaultLdapServer()` and `getLdapServer(String name)` methods.

Version:
  $Revision: 1.12 $
Author:
  Eric Dalquist edalquist@unicon.net

Field Summary
`static java.lang.String` | `DEFAULT_LDAP_SERVER` The special name which can be used by clients to request the ILdapServer representing that configured in the .properties file rather (as opposed to the named servers configured in the XML configuration file.)
`private static ILdapServer` | `defaultConn`
`private static java.lang.String` | `LDAP_PROPERTIES_FILE`
`private static java.lang.String` | `LDAP_XML_CONNECTION_XPATH`
`private static java.lang.String` | `LDAP_XML_FILE`
`private static java.util.Map` | `ldapConnections` Map from server names to ILdapServer objects.
`private static org.apache.commons.logging.Log` | `log`
`private static java.lang.String` | `PROPERTIES_PATH`

Constructor Summary
`private` | `LdapServices()` This class only provides static methods.

Method Summary
`static ILdapServer` | `getDefaultLdapServer()` Get the default `ILdapServer`.
`static ILdapServer` | `getLdapServer(java.lang.String name)` Get a named `ILdapServer`.
`static java.util.Map` | `getLdapServerMap()` Get a `Map` of `ILdapServer` instances.
`private static void` | `loadLdapProperties()` Load LDAP server from ldap.properties.
`private static void` | `loadLdapXml()` Load LDAP servers from the XML configuration file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final org.apache.commons.logging.Log log

### DEFAULT_LDAP_SERVER

    public static final java.lang.String DEFAULT_LDAP_SERVER

  The special name which can be used by clients to request the ILdapServer representing that configured in the .properties file rather (as opposed to the named servers configured in the XML configuration file.)

  See Also:
    Constant Field Values

### PROPERTIES_PATH

    private static final java.lang.String PROPERTIES_PATH

See Also:
  Constant Field Values

### LDAP_PROPERTIES_FILE

    private static final java.lang.String LDAP_PROPERTIES_FILE

See Also:
  Constant Field Values

### LDAP_XML_FILE

    private static final java.lang.String LDAP_XML_FILE

See Also:
  Constant Field Values

### LDAP_XML_CONNECTION_XPATH

    private static final java.lang.String LDAP_XML_CONNECTION_XPATH

See Also:
  Constant Field Values

### ldapConnections

    private static final java.util.Map ldapConnections

  Map from server names to ILdapServer objects.

### defaultConn

    private static ILdapServer defaultConn

Constructor Detail

### LdapServices

    private LdapServices()

  This class only provides static methods.

Method Detail

### loadLdapXml

    private static void loadLdapXml()

  Load LDAP servers from the XML configuration file.

### loadLdapProperties

    private static void loadLdapProperties()

  Load LDAP server from ldap.properties.

### getDefaultLdapServer

    public static ILdapServer getDefaultLdapServer()

  Get the default `ILdapServer`.

  Returns:
    The default `ILdapServer`.

### getLdapServer

    public static ILdapServer getLdapServer(java.lang.String name)

  Get a named `ILdapServer`. Using the special name 'DEFAULT_LDAP_SERVER' causes this method to return the default Ldap server.

  Parameters:
    `name` - The name of the ILdapServer to return.
  Returns:
    An `ILdapServer` with the specified name, `null` if there is no connection with the specified name.

### getLdapServerMap

    public static java.util.Map getLdapServerMap()

  Get a `Map` of `ILdapServer` instances. If a server is configured in ldap.properties it will not be available in the `Map`. They key is the server name, value is the `ILdapServer` instance

  Returns:
    A `Map` of `ILdapServer` instances.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD