public class ThunderbirdContactSourceService extends java.lang.Object implements ExtendedContactSourceService, PrefixedContactSourceService
Modifier and Type | Field and Description |
---|---|
(package private) org.jitsi.service.configuration.ConfigurationService |
config
Reference to the configuration service
|
(package private) java.util.Map<java.lang.String,java.util.Map<java.lang.String,mork.Row>> |
database
The parsed Thunderbird database.
|
(package private) java.lang.String |
defaultScope
Name of the default namespace in the Thunderbird database.
|
(package private) long |
lastDatabaseFileChange
Date/time when the Thunderbird database file was last changed.
|
static java.lang.String |
PNAME_BASE_THUNDERBIRD_CONFIG
Name of the base-property for a Thunderbird address book configuration.
|
static java.lang.String |
PNAME_DISPLAYNAME
Property-name, appended to
PNAME_BASE_THUNDERBIRD_CONFIG ,
that indicates the display-name shown as the contact group. |
static java.lang.String |
PNAME_FILENAME
Property-name, appended to
PNAME_BASE_THUNDERBIRD_CONFIG ,
that indicates the address-book database filename. |
static java.lang.String |
PNAME_INDEX
Property-name, appended to
PNAME_BASE_THUNDERBIRD_CONFIG ,
that indicates the priority in the search results. |
static java.lang.String |
PNAME_PREFIX
Property-name, appended to
PNAME_BASE_THUNDERBIRD_CONFIG ,
that indicates the telephone-number prefix. |
CONTACT_LIST_TYPE, DEFAULT_TYPE, HISTORY_TYPE, SEARCH_TYPE
Constructor and Description |
---|
ThunderbirdContactSourceService(java.lang.String baseConfigProperty)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
ContactQuery |
createContactQuery(java.util.regex.Pattern queryPattern)
Creates query for the given searchPattern.
|
ContactQuery |
createContactQuery(java.lang.String queryString)
Creates and returns new ContactQuery instance.
|
ContactQuery |
createContactQuery(java.lang.String queryString,
int contactCount)
Creates and returns new ContactQuery instance.
|
(package private) java.lang.String |
getBaseConfigProperty()
Gets the base property name to which the other PNAME_ will be appended.
|
java.lang.String |
getDisplayName()
Returns a user-friendly string that identifies this contact source.
|
(package private) java.lang.String |
getFilename()
Gets the filename to the address book database processed by this
ContactSource.
|
int |
getIndex()
Returns the index of the contact source in the result list.
|
java.lang.String |
getPhoneNumberPrefix()
Returns the global phone number prefix to be used when calling contacts
from this contact source.
|
int |
getType()
Returns the type of this contact source.
|
(package private) void |
setFilename(java.lang.String filename)
Sets a new database file name to use from now on.
|
(package private) void |
setPhoneNumberPrefix(java.lang.String prefix)
Sets a new phone number prefix to use from now on.
|
public static final java.lang.String PNAME_BASE_THUNDERBIRD_CONFIG
public static final java.lang.String PNAME_FILENAME
PNAME_BASE_THUNDERBIRD_CONFIG
,
that indicates the address-book database filename.public static final java.lang.String PNAME_DISPLAYNAME
PNAME_BASE_THUNDERBIRD_CONFIG
,
that indicates the display-name shown as the contact group.public static final java.lang.String PNAME_INDEX
PNAME_BASE_THUNDERBIRD_CONFIG
,
that indicates the priority in the search results.public static final java.lang.String PNAME_PREFIX
PNAME_BASE_THUNDERBIRD_CONFIG
,
that indicates the telephone-number prefix.org.jitsi.service.configuration.ConfigurationService config
long lastDatabaseFileChange
java.util.Map<java.lang.String,java.util.Map<java.lang.String,mork.Row>> database
lastDatabaseFileChange
java.lang.String defaultScope
public ThunderbirdContactSourceService(java.lang.String baseConfigProperty)
baseConfigProperty
- The base property name of the config for this
instancejava.lang.String getBaseConfigProperty()
public int getType()
ContactSourceService
getType
in interface ContactSourceService
public java.lang.String getDisplayName()
ContactSourceService
getDisplayName
in interface ContactSourceService
public ContactQuery createContactQuery(java.lang.String queryString)
ContactSourceService
createContactQuery
in interface ContactSourceService
queryString
- the string to search forpublic ContactQuery createContactQuery(java.lang.String queryString, int contactCount)
ContactSourceService
createContactQuery
in interface ContactSourceService
queryString
- the string to search forcontactCount
- the maximum count of result contactspublic ContactQuery createContactQuery(java.util.regex.Pattern queryPattern)
ExtendedContactSourceService
createContactQuery
in interface ExtendedContactSourceService
queryPattern
- the pattern to search forpublic int getIndex()
ContactSourceService
getIndex
in interface ContactSourceService
public java.lang.String getPhoneNumberPrefix()
PrefixedContactSourceService
getPhoneNumberPrefix
in interface PrefixedContactSourceService
void setPhoneNumberPrefix(java.lang.String prefix)
prefix
- the new prefix.java.lang.String getFilename()
void setFilename(java.lang.String filename)
filename
- the new file name.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.