public class GoogleContactsSourceService extends java.lang.Object implements ExtendedContactSourceService, PrefixedContactSourceService
CONTACT_LIST_TYPE, DEFAULT_TYPE, HISTORY_TYPE, SEARCH_TYPE
Constructor and Description |
---|
GoogleContactsSourceService(GoogleContactsConnection cnx)
Constructor.
|
GoogleContactsSourceService(java.lang.String login)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ContactQuery |
createContactQuery(java.util.regex.Pattern queryPattern)
Creates query for the given searchPattern.
|
ContactQuery |
createContactQuery(java.util.regex.Pattern queryPattern,
int count)
Creates query for the given searchPattern.
|
ContactQuery |
createContactQuery(java.lang.String query)
Queries this search source for the given queryString.
|
ContactQuery |
createContactQuery(java.lang.String query,
int contactCount)
Creates query for the given queryString.
|
GoogleContactsConnectionImpl |
getConnection()
Returns the Google Contacts connection.
|
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.
|
java.lang.String |
getLogin()
Returns login.
|
java.lang.String |
getPhoneNumberPrefix()
Returns the phoneNumber prefix for all phone numbers.
|
int |
getType()
Returns SEARCH_TYPE to indicate that this contact source
|
boolean |
isGoogleTalk()
Returns whether or not the account has been created via GoogleTalk
wizard or via external Google Contacts.
|
void |
removeQuery(ContactQuery query)
Removes query from the list of queries.
|
void |
setGoogleTalk(boolean googleTalk)
Set whether or not the account has been created via GoogleTalk wizard or
external Google contacts.
|
void |
setPhoneNumberPrefix(java.lang.String phoneNumberprefix)
Sets the phone number prefix.
|
void |
stop()
Stops this ContactSourceService implementation and prepares it
for garbage collection.
|
(package private) void |
stopped(GoogleContactsQuery query)
Notifies this GoogleContactsSourceService that a specific
GoogleContactsQuery has stopped.
|
public GoogleContactsSourceService(java.lang.String login)
login
- loginpassword
- passwordpublic GoogleContactsSourceService(GoogleContactsConnection cnx)
cnx
- connectionpublic java.lang.String getLogin()
public void setGoogleTalk(boolean googleTalk)
googleTalk
- value to setpublic boolean isGoogleTalk()
public ContactQuery createContactQuery(java.util.regex.Pattern queryPattern)
createContactQuery
in interface ExtendedContactSourceService
queryPattern
- the pattern to search forpublic ContactQuery createContactQuery(java.util.regex.Pattern queryPattern, int count)
queryPattern
- the pattern to search forcount
- maximum number of contact returnedpublic void removeQuery(ContactQuery query)
query
- the query that will be removed.public GoogleContactsConnectionImpl getConnection()
public 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()
void stopped(GoogleContactsQuery query)
query
- the GoogleContactsQuery which has stoppedpublic java.lang.String getPhoneNumberPrefix()
getPhoneNumberPrefix
in interface PrefixedContactSourceService
public void setPhoneNumberPrefix(java.lang.String phoneNumberprefix)
phoneNumberprefix
- the phone number prefix to setpublic int getIndex()
getIndex
in interface ContactSourceService
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.