public class MsOutlookAddrBookContactQuery extends AbstractAddrBookContactQuery<MsOutlookAddrBookContactSourceService>
Modifier and Type | Class and Description |
---|---|
class |
MsOutlookAddrBookContactQuery.PtrOutlookContactCallback
Callback to called by the native outlook part with a contact id as
argument.
|
Modifier and Type | Field and Description |
---|---|
static int[] |
CONTACT_DETAIL_PROP_INDEXES
The indexes in
MAPI_MAILUSER_PROP_IDS of the property IDs which
are to be represented in SourceContact as
ContactDetails. |
static int |
dispidEmail1EmailAddress |
static int |
dispidEmail2EmailAddress |
static int |
dispidEmail3EmailAddress |
static int |
dispidFax1EmailAddress
The index of the 1st fax telephone number (business fax).
|
static int |
dispidFax2EmailAddress
The index of the 2nd fax telephone number (home fax).
|
static int |
dispidFax3EmailAddress
The index of the 3rd fax telephone number (other fax).
|
static int |
dispidHomeAddress
The index of the display for the home postal address.
|
static int |
dispidInstMsg
The index of the instant messaging address.
|
static int |
dispidWorkAddress
The index of the display for the work postal address.
|
static long[] |
MAPI_MAILUSER_PROP_IDS
The IDs of the properties of MAPI_MAILUSER which are to be
queried by the MsOutlookAddrBookContactQuery instances.
|
static long |
MAPI_UNICODE
The flag which signals that MAPI strings should be returned in the
Unicode character set.
|
static long |
PR_ATTACHMENT_CONTACTPHOTO
The id of the PR_ATTACHMENT_CONTACTPHOTO MAPI property.
|
static int |
PR_BUSINESS_ADDRESS_CITY
The index of the business city of the postal address.
|
static int |
PR_BUSINESS_ADDRESS_COUNTRY
The index of the business country of the postal address.
|
static int |
PR_BUSINESS_ADDRESS_POSTAL_CODE
The index of the business postal code of the postal address.
|
static int |
PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE
The index of the business state or province of the postal address.
|
static int |
PR_BUSINESS_ADDRESS_STREET
The index of the business street of the postal address.
|
static int |
PR_BUSINESS_HOME_PAGE
The index of the business home page
|
static int |
PR_BUSINESS_TELEPHONE_NUMBER
The index of the id of the PR_BUSINESS_TELEPHONE_NUMBER property
in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_BUSINESS2_TELEPHONE_NUMBER
The index of the id of the PR_BUSINESS2_TELEPHONE_NUMBER
property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_COMPANY_NAME |
static int |
PR_DISPLAY_NAME
The index of the id of the PR_DISPLAY_NAME property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_DISPLAY_NAME_PREFIX
The index of the name prefix.
|
static int |
PR_EMAIL_ADDRESS
The index of the id of the PR_EMAIL_ADDRESS property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_GIVEN_NAME
The index of the id of the PR_GIVEN_NAME property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_HOME_ADDRESS_CITY
The index of the home city of the postal address.
|
static int |
PR_HOME_ADDRESS_COUNTRY
The index of the home country of the postal address.
|
static int |
PR_HOME_ADDRESS_POSTAL_CODE
The index of the home postal code of the postal address.
|
static int |
PR_HOME_ADDRESS_STATE_OR_PROVINCE
The index of the home state or province of the postal address.
|
static int |
PR_HOME_ADDRESS_STREET
The index of the home street of the postal address.
|
static int |
PR_HOME_TELEPHONE_NUMBER
The index of the id of the PR_HOME_TELEPHONE_NUMBER property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_HOME2_TELEPHONE_NUMBER
The index of the id of the PR_HOME2_TELEPHONE_NUMBER property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_MIDDLE_NAME
The index of the id of the PR_MIDDLE_NAME property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_MOBILE_TELEPHONE_NUMBER
The index of the id of the PR_MOBILE_TELEPHONE_NUMBER property
in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_NICKNAME
The index of the nickname.
|
static int |
PR_OBJECT_TYPE
The index of the id of the PR_OBJECT_TYPE property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_ORIGINAL_ENTRYID
The index of the id of the PR_ORIGINAL_ENTRYID property
in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_OTHER_TELEPHONE_NUMBER
The index of the id of the PR_OTHER_TELEPHONE_NUMBER property
in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_PERSONAL_HOME_PAGE
The index of the personnal home page
|
static int |
PR_SURNAME
The index of the id of the PR_SURNAME property in
MAPI_MAILUSER_PROP_IDS . |
static int |
PR_TITLE
The index of the job title.
|
sourceContacts
query
QUERY_CANCELED, QUERY_COMPLETED, QUERY_ERROR, QUERY_IN_PROGRESS
Constructor and Description |
---|
MsOutlookAddrBookContactQuery(MsOutlookAddrBookContactSourceService msoabcss,
java.util.regex.Pattern query)
Initializes a new MsOutlookAddrBookContactQuery instance to
be performed by a specific
MsOutlookAddrBookContactSourceService.
|
Modifier and Type | Method and Description |
---|---|
void |
addEmptyContact(java.lang.String id)
Adds a new empty contact, which will be filled in later.
|
static boolean |
compareEntryIds(java.lang.String id1,
java.lang.String id2)
Compares two identifiers to determine if they are part of the same
Outlook contact.
|
static java.lang.String |
createContact()
Creates an empty contact from the address book.
|
static boolean |
deleteContact(java.lang.String id)
Removes a contact from the address book.
|
void |
deleted(java.lang.String id)
Callback method when receiving notifications for deleted items.
|
protected SourceContact |
findSourceContactByID(java.lang.String id,
int maxLevel)
Searches for source contact with the specified id.
|
static void |
foreachMailUser(java.lang.String query,
MsOutlookAddrBookContactQuery.PtrOutlookContactCallback callback)
Calls back to a specific PtrCallback for each
MAPI_MAILUSER found in the Address Book of Microsoft Outlook
which matches a specific String query.
|
static ContactDetail.Category |
getCategory(int propIndex) |
static java.util.List<ContactDetail> |
getContactDetails(java.lang.Object[] values)
Gets the contactDetails to be set on a SourceContact
which is to represent an ABPerson.
|
static java.lang.String |
getDisplayName(java.lang.Object[] values)
Gets the displayName to be set on a SourceContact.
|
static java.lang.String |
getOrganization(java.lang.Object[] values)
Gets the organization name to be set on a SourceContact.
|
static long |
getProperty(ContactDetail.Category category,
java.util.Collection<ContactDetail.SubCategory> subCategories)
Find the outlook property tag from category and subcategories.
|
static ContactDetail.SubCategory[] |
getSubCategories(int propIndex)
Gets the set of ContactDetail labels to be assigned to a
property specified by its index in
MAPI_MAILUSER_PROP_IDS . |
static boolean |
IMAPIProp_DeleteProp(long propId,
java.lang.String entryId) |
static java.lang.Object[] |
IMAPIProp_GetProps(java.lang.String entryId,
long[] propIds,
long flags) |
static boolean |
IMAPIProp_SetPropString(long propId,
java.lang.String value,
java.lang.String entryId) |
void |
inserted(java.lang.String id)
Callback method when receiving notifications for inserted items.
|
void |
insertedOrUpdated(java.lang.String id,
int maxLevel)
Callback method when receiving notifications for updated items.
|
protected void |
run()
Performs this AsyncContactQuery in a background Thread.
|
void |
updated(java.lang.String id)
Callback method when receiving notifications for updated items.
|
clear, findSourceContactByID, fireContactReceived, fireContactRemoved
addQueryResult, addQueryResult, addQueryResults, getPhoneNumberQuery, getQueryResultCount, getQueryResults, getQueryString, phoneNumberMatches, removeQueryResult, start, stopped
addContactQueryListener, cancel, fireContactChanged, fireContactReceived, fireQueryStatusChanged, getContactSource, getStatus, removeContactQueryListener, setStatus
public static final int dispidEmail1EmailAddress
public static final int dispidEmail2EmailAddress
public static final int dispidEmail3EmailAddress
public static final long[] MAPI_MAILUSER_PROP_IDS
public static final long MAPI_UNICODE
public static final long PR_ATTACHMENT_CONTACTPHOTO
public static final int PR_BUSINESS_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_BUSINESS2_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_COMPANY_NAME
public static final int PR_DISPLAY_NAME
MAPI_MAILUSER_PROP_IDS
.public static final int PR_EMAIL_ADDRESS
MAPI_MAILUSER_PROP_IDS
.public static final int PR_GIVEN_NAME
MAPI_MAILUSER_PROP_IDS
.public static final int PR_HOME_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_HOME2_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_MIDDLE_NAME
MAPI_MAILUSER_PROP_IDS
.public static final int PR_MOBILE_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_OTHER_TELEPHONE_NUMBER
MAPI_MAILUSER_PROP_IDS
.public static final int PR_OBJECT_TYPE
MAPI_MAILUSER_PROP_IDS
.public static final int PR_SURNAME
MAPI_MAILUSER_PROP_IDS
.public static final int PR_ORIGINAL_ENTRYID
MAPI_MAILUSER_PROP_IDS
.public static final int dispidFax1EmailAddress
public static final int dispidFax2EmailAddress
public static final int dispidFax3EmailAddress
public static final int PR_NICKNAME
public static final int PR_DISPLAY_NAME_PREFIX
public static final int PR_PERSONAL_HOME_PAGE
public static final int PR_BUSINESS_HOME_PAGE
public static final int PR_TITLE
public static final int dispidInstMsg
public static final int PR_BUSINESS_ADDRESS_CITY
public static final int PR_BUSINESS_ADDRESS_COUNTRY
public static final int PR_BUSINESS_ADDRESS_POSTAL_CODE
public static final int PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE
public static final int PR_BUSINESS_ADDRESS_STREET
public static final int PR_HOME_ADDRESS_CITY
public static final int PR_HOME_ADDRESS_COUNTRY
public static final int PR_HOME_ADDRESS_POSTAL_CODE
public static final int PR_HOME_ADDRESS_STATE_OR_PROVINCE
public static final int PR_HOME_ADDRESS_STREET
public static final int dispidHomeAddress
public static final int dispidWorkAddress
public static final int[] CONTACT_DETAIL_PROP_INDEXES
MAPI_MAILUSER_PROP_IDS
of the property IDs which
are to be represented in SourceContact as
ContactDetails.public MsOutlookAddrBookContactQuery(MsOutlookAddrBookContactSourceService msoabcss, java.util.regex.Pattern query)
msoabcss
- the MsOutlookAddrBookContactSourceService
which is to perform the new ContactQueryquery
- the Pattern for which msoabcss is being
queriedpublic static void foreachMailUser(java.lang.String query, MsOutlookAddrBookContactQuery.PtrOutlookContactCallback callback)
query
- the String for which the Address Book of Microsoft
Outlook is to be queried. Warning: Ignored at the time of this
writing.callback
- the PtrOutlookContactCallback to be notified
about the matching MAPI_MAILUSERspublic static ContactDetail.Category getCategory(int propIndex)
public static ContactDetail.SubCategory[] getSubCategories(int propIndex)
MAPI_MAILUSER_PROP_IDS
.propIndex
- the index in MAPI_MAILUSER_PROP_IDS of the
property to get the ContactDetail labels ofpublic static long getProperty(ContactDetail.Category category, java.util.Collection<ContactDetail.SubCategory> subCategories)
category
- The category.subCategories
- The subcategories.public static java.lang.Object[] IMAPIProp_GetProps(java.lang.String entryId, long[] propIds, long flags) throws MsOutlookMAPIHResultException
MsOutlookMAPIHResultException
public static boolean IMAPIProp_SetPropString(long propId, java.lang.String value, java.lang.String entryId)
public static boolean IMAPIProp_DeleteProp(long propId, java.lang.String entryId)
public static boolean deleteContact(java.lang.String id)
id
- the person id.public static java.lang.String createContact()
public static boolean compareEntryIds(java.lang.String id1, java.lang.String id2)
id1
- The first identifier.id2
- The second identifier.public static java.util.List<ContactDetail> getContactDetails(java.lang.Object[] values)
values
- the values of the ABPERSON_PROPERTIES which
represent the ABPerson to get the contactDetails ofprotected void run()
run
in class AsyncContactQuery<MsOutlookAddrBookContactSourceService>
AsyncContactQuery.run()
public void inserted(java.lang.String id)
id
- The outlook contact identifier.public void updated(java.lang.String id)
id
- The outlook contact identifier.public void insertedOrUpdated(java.lang.String id, int maxLevel)
id
- The outlook contact identifier.maxLevel
- The maximum level for comparing ids: 0 cached ids only, 1
cached ids and outlook database ids.public void deleted(java.lang.String id)
id
- The outlook contact identifier.public void addEmptyContact(java.lang.String id)
id
- The ID of the contact to add.public static java.lang.String getDisplayName(java.lang.Object[] values)
values
- the values of the contact properties.public static java.lang.String getOrganization(java.lang.Object[] values)
values
- the values of the contact properties.protected SourceContact findSourceContactByID(java.lang.String id, int maxLevel)
id
- the id to search for.maxLevel
- The maximum level for comparing ids: 0 cached ids only, 1
cached ids and outlook database ids.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.