net.java.sip.communicator.plugin.addrbook.macosx
Class MacOSXAddrBookContactQuery
java.lang.Object
net.java.sip.communicator.service.contactsource.AbstractContactQuery<T>
net.java.sip.communicator.service.contactsource.AsyncContactQuery<MacOSXAddrBookContactSourceService>
net.java.sip.communicator.plugin.addrbook.macosx.MacOSXAddrBookContactQuery
- All Implemented Interfaces:
- ContactQuery
public class MacOSXAddrBookContactQuery
- extends AsyncContactQuery<MacOSXAddrBookContactSourceService>
Implements ContactQuery for the Address Book of Mac OS X.
- Author:
- Lyubomir Marinov
|
Method Summary |
protected String |
normalizePhoneNumber(String phoneNumber)
Normalizes a String phone number by converting alpha characters
to their respective digits on a keypad and then stripping non-digit
characters. |
protected boolean |
phoneNumberMatches(String phoneNumber)
Determines whether a specific String phone number matches the
AsyncContactQuery.query of this AsyncContactQuery. |
protected void |
run()
Performs this AsyncContactQuery in a background Thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MacOSXAddrBookContactQuery
public MacOSXAddrBookContactQuery(MacOSXAddrBookContactSourceService contactSource,
Pattern query)
- Initializes a new MacOSXAddrBookContactQuery which is to perform
a specific query in the Address Book of Mac OS X on behalf of a
specific MacOSXAddrBookContactSourceService.
- Parameters:
contactSource - the MacOSXAddrBookContactSourceService
which is to perform the new ContactQuery instancequery - the Pattern for which contactSource i.e.
the Address Book of Mac OS X is being queried
run
protected void run()
- Performs this AsyncContactQuery in a background Thread.
- Specified by:
run in class AsyncContactQuery<MacOSXAddrBookContactSourceService>
- See Also:
AsyncContactQuery.run()
normalizePhoneNumber
protected String normalizePhoneNumber(String phoneNumber)
- Normalizes a String phone number by converting alpha characters
to their respective digits on a keypad and then stripping non-digit
characters.
- Specified by:
normalizePhoneNumber in class AsyncContactQuery<MacOSXAddrBookContactSourceService>
- Parameters:
phoneNumber - a String which represents a phone number to
normalize
- Returns:
- a String which is a normalized form of the specified
phoneNumber
phoneNumberMatches
protected boolean phoneNumberMatches(String phoneNumber)
- Determines whether a specific String phone number matches the
AsyncContactQuery.query of this AsyncContactQuery.
- Specified by:
phoneNumberMatches in class AsyncContactQuery<MacOSXAddrBookContactSourceService>
- Parameters:
phoneNumber - the String which represents the phone number
to match to the query of this AsyncContactQuery
- Returns:
- true if the specified phoneNumber matches the
query of this AsyncContactQuery; otherwise,
false
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.