Adds organization name in Outlook search results.

cusax-fix
Vincent Lucas 14 years ago
parent 4b9b23ca05
commit eaef208f0b

@ -846,6 +846,7 @@ private boolean onMailUser(String id)
getContactSource(),
(String) props[PR_ORIGINAL_ENTRYID],
displayName,
getOrganization(props),
contactDetails);
if (MAPI_MESSAGE == objType)
@ -1062,6 +1063,7 @@ public void addEmptyContact(String id)
getContactSource(),
id,
null,
null,
new LinkedList<ContactDetail>());
addQueryResult(sourceContact);
}
@ -1074,7 +1076,7 @@ public void addEmptyContact(String id)
*
* @return the <tt>displayName</tt> to be set on a <tt>SourceContact</tt>.
*/
static String getDisplayName(Object[] values)
public static String getDisplayName(Object[] values)
{
String displayName = (String) values[PR_NICKNAME];
@ -1113,4 +1115,15 @@ static String getDisplayName(Object[] values)
return displayName;
}
/**
* Gets the organization name to be set on a <tt>SourceContact</tt>.
*
* @param values the values of the contact properties.
*
* @return the organization name to be set on a <tt>SourceContact</tt>.
*/
public static String getOrganization(Object[] values)
{
return (String) values[PR_COMPANY_NAME];
}
}

@ -43,17 +43,20 @@ public class MsOutlookAddrBookSourceContact
* instance.
* @param id The outlook entry identifier for contacts.
* @param displayName The display name of the new instance.
* @param organization The organization name of the new instance.
* @param contactDetails The ContactDetails of the new instance.
*/
public MsOutlookAddrBookSourceContact(
ContactSourceService contactSource,
String id,
String displayName,
String organization,
List<ContactDetail> contactDetails)
{
super(contactSource, displayName, contactDetails);
this.setData(SourceContact.DATA_ID, id);
this.setDisplayDetails(organization);
}
/**
@ -271,6 +274,9 @@ public void updated()
String displayName
= MsOutlookAddrBookContactQuery.getDisplayName(props);
this.setDisplayName(displayName);
String organization
= MsOutlookAddrBookContactQuery.getOrganization(props);
this.setDisplayDetails(organization);
}
}

Loading…
Cancel
Save