Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.ldap
Interface LdapDirectory

All Superinterfaces:
Comparable<LdapDirectory>, LdapConstants, LdapEventManager
All Known Implementing Classes:
LdapDirectoryImpl

public interface LdapDirectory
extends LdapConstants, LdapEventManager, Comparable<LdapDirectory>

LdapDirectory is the "core" object of the service, which should be used to perform LDAP queries. It is comparable in order to display LdapDirectory(s) in alphabetic order in the UI.

Author:
Sebastien Mazy

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.sip.communicator.service.ldap.LdapConstants
LdapConstants.Auth, LdapConstants.Encryption, LdapConstants.Scope
 
Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.ldap.LdapConstants
LDAP_CONNECT_TIMEOUT, LDAP_READ_TIMEOUT
 
Method Summary
 void addLdapListener(LdapListener listener)
          Adds listener to our list of listeners
 LdapDirectorySettings getSettings()
          Returns an LdapDirectorySettings object containing a copy of the settings of this server
 boolean isEnabled()
          Returns the state of the enabled marker
 void overrideAttributesSearch(String attribute, List<String> names)
          Overrides attributes name for searching for a specific type (i.e mail, homePhone, ...).
 Collection<String> searchChildren(String dn)
          search the children nodes of the given dn
 void searchPerson(LdapQuery query, LdapListener caller, LdapSearchSettings searchSettings)
          Searches a person in the directory, based on a search string.
 void setEnabled(boolean enabled)
          Sets the state of the enabled marker
 
Methods inherited from interface net.java.sip.communicator.service.ldap.event.LdapEventManager
fireLdapEvent, fireLdapEvent, removeLdapListener
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isEnabled

boolean isEnabled()
Returns the state of the enabled marker

Returns:
the state of the enabled marker

setEnabled

void setEnabled(boolean enabled)
Sets the state of the enabled marker

Parameters:
enabled - whether the server is marked as enabled

getSettings

LdapDirectorySettings getSettings()
Returns an LdapDirectorySettings object containing a copy of the settings of this server

Returns:
a copy of this server settings
See Also:
LdapDirectorySettings

searchPerson

void searchPerson(LdapQuery query,
                  LdapListener caller,
                  LdapSearchSettings searchSettings)
Searches a person in the directory, based on a search string. Since that method might take time to process, it should be implemented asynchronously and send the results (LdapPersonFound) with an LdapEvent to its listeners

Parameters:
query - assumed name (can be partial) of the person searched e.g. "john", "doe", "john doe"
caller - the LdapListener which called the method and will receive results.
searchSettings - custom settings for this search, null if you want to stick with the defaults
See Also:
searchPerson(net.java.sip.communicator.service.ldap.LdapQuery, net.java.sip.communicator.service.ldap.event.LdapListener, net.java.sip.communicator.service.ldap.LdapSearchSettings), LdapPersonFound, LdapEvent

searchChildren

Collection<String> searchChildren(String dn)
search the children nodes of the given dn

Parameters:
dn - the distinguished name of the node to search for children
Returns:
list of childrens
See Also:
searchChildren(java.lang.String)

addLdapListener

void addLdapListener(LdapListener listener)
Adds listener to our list of listeners

Specified by:
addLdapListener in interface LdapEventManager
Parameters:
listener - listener to be added

overrideAttributesSearch

void overrideAttributesSearch(String attribute,
                              List<String> names)
Overrides attributes name for searching for a specific type (i.e mail, homePhone, ...).

Parameters:
attribute - name
names - list of attributes name

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.