public class LdapContactSourceService extends java.lang.Object implements ContactSourceService, PrefixedContactSourceService
In contrast to other contact source implementations like AddressBook and Outlook the LDAP contact source implementation is explicitly moved to the "impl.ldap" package in order to allow us to create LDAP contact sources for ldap directories through the LdapService.
CONTACT_LIST_TYPE, DEFAULT_TYPE, HISTORY_TYPE, SEARCH_TYPE
Constructor and Description |
---|
LdapContactSourceService(LdapDirectory ldapDirectory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ContactQuery |
createContactQuery(java.lang.String query)
Creates query for the given query.
|
ContactQuery |
createContactQuery(java.lang.String query,
int contactCount)
Creates query for the given query.
|
java.lang.String |
getDisplayName()
Returns a user-friendly string that identifies this contact source.
|
int |
getIndex()
Returns the index of the contact source in the result list.
|
LdapDirectory |
getLdapDirectory()
Get LDAP directory.
|
java.lang.String |
getPhoneNumberPrefix()
Returns the phoneNumber prefix for all phone numbers.
|
int |
getType()
Returns the identifier of this contact source.
|
void |
removeQuery(ContactQuery query)
Removes a query from the list.
|
void |
stop()
Stops this ContactSourceService implementation and prepares it
for garbage collection.
|
(package private) void |
stopped(LdapContactQuery query)
Notifies this LdapContactSourceService that a specific
LdapContactQuery has stopped.
|
public LdapContactSourceService(LdapDirectory ldapDirectory)
ldapDirectory
- LDAP directorypublic void removeQuery(ContactQuery query)
query
- the querypublic java.lang.String getDisplayName()
getDisplayName
in interface ContactSourceService
public int getType()
getType
in interface ContactSourceService
public ContactQuery createContactQuery(java.lang.String query)
createContactQuery
in interface ContactSourceService
query
- the string to search forpublic ContactQuery createContactQuery(java.lang.String query, int contactCount)
createContactQuery
in interface ContactSourceService
query
- the string to search forcontactCount
- the maximum count of result contactspublic void stop()
AsyncContactSourceService.stop()
public LdapDirectory getLdapDirectory()
public java.lang.String getPhoneNumberPrefix()
getPhoneNumberPrefix
in interface PrefixedContactSourceService
void stopped(LdapContactQuery query)
query
- the LdapContactQuery which has stoppedpublic int getIndex()
getIndex
in interface ContactSourceService
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.