public class LdapDirectoryImpl extends DefaultLdapEventManager implements LdapDirectory, LdapListener, LdapConstants
Modifier and Type | Class and Description |
---|---|
class |
LdapDirectoryImpl.LdapQueryCancelledException
A custom exception used internally by LdapDirectoryImpl
to indicate that a query was cancelled
|
LdapConstants.Auth, LdapConstants.Encryption, LdapConstants.Scope
ldapListeners
LDAP_CONNECT_TIMEOUT, LDAP_READ_TIMEOUT
Constructor and Description |
---|
LdapDirectoryImpl(LdapDirectorySettings settings)
The contructor for this class.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LdapDirectory server)
An LdapDirectory is comparable in order to display LdapDirectory(s)
in alphabetic order in the UI.
|
boolean |
equals(java.lang.Object anObject)
Two LdapDirectory(s) with the same displayed name
should not exist in the same LdapDirectorySet,
thus this function
|
(package private) byte[] |
fetchPhotoForPerson(java.lang.String dn)
Tries to fetch the photo of the person with
the given distinguished name in the directory
|
LdapDirectorySettings |
getSettings()
Returns an LdapDirectorySettings object containing
a copy of the settings of this server
|
int |
hashCode()
We override the equals method so we also do for
hashCode to keep consistent behavior
|
boolean |
isEnabled()
Returns the state of the enabled marker.
|
void |
ldapEventReceived(LdapEvent event)
Required by LdapListener.
|
void |
overrideAttributesSearch(java.lang.String attribute,
java.util.List<java.lang.String> names)
Overrides attributes name for searching for a specific type (i.e mail,
homePhone, ...).
|
java.util.Collection<java.lang.String> |
searchChildren(java.lang.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
Required by LdapDirectory interface.
|
java.lang.String |
toString()
Turns LdapDirectoryImpl into a printable object
Used for debugging purposes
|
addLdapListener, fireLdapEvent, fireLdapEvent, removeLdapListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addLdapListener
fireLdapEvent, fireLdapEvent, removeLdapListener
public LdapDirectoryImpl(LdapDirectorySettings settings)
settings
- settings for this new serverLdapDirectorySettings
public boolean isEnabled()
isEnabled
in interface LdapDirectory
LdapDirectory.isEnabled()
public void setEnabled(boolean enabled)
setEnabled
in interface LdapDirectory
enabled
- whether the server is marked as enabledLdapDirectory.setEnabled(boolean)
public LdapDirectorySettings getSettings()
getSettings
in interface LdapDirectory
LdapDirectorySettings
,
LdapDirectory.getSettings()
public void searchPerson(LdapQuery query, LdapListener caller, LdapSearchSettings searchSettings)
searchPerson
in interface LdapDirectory
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 defaultsLdapDirectory.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
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(LdapDirectory server)
compareTo
in interface java.lang.Comparable<LdapDirectory>
Comparable
public boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Collection<java.lang.String> searchChildren(java.lang.String dn)
searchChildren
in interface LdapDirectory
dn
- the distinguished name of the node to search for childrenLdapDirectory.searchChildren(java.lang.String)
byte[] fetchPhotoForPerson(java.lang.String dn)
dn
- distinguished name of the person to fetch the photopublic void ldapEventReceived(LdapEvent event)
ldapEventReceived
in interface LdapListener
event
- An LdapEvent probably sent by an LdapDirectorypublic void overrideAttributesSearch(java.lang.String attribute, java.util.List<java.lang.String> names)
overrideAttributesSearch
in interface LdapDirectory
attribute
- namenames
- list of attributes name
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.