1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 11:12:22 -05:00

LDAP: additional attributes for iPad

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1523 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-11-03 22:43:18 +00:00
parent 92c8802dc2
commit 8f183cdd2c
2 changed files with 15 additions and 0 deletions

View File

@ -208,11 +208,13 @@ public class LdapConnection extends AbstractConnection {
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("nsaimid", "im");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("nscpaimscreenname", "im");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("apple-imhandle", "im");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("imhandle", "im");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("xmozillasecondemail", "smtpemail2");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("notes", "description");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("pagerphone", "pager");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("pager", "pager");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("locality", "l");
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("homephone", "homePhone");
@ -255,6 +257,12 @@ public class LdapConnection extends AbstractConnection {
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("homedirectory", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("authauthority", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("applefloor", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("buildingname", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("destinationindicator", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("postaladdress", null);
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("homepostaladdress", null);
// iCal search attribute
LDAP_TO_CONTACT_ATTRIBUTE_MAP.put("apple-serviceslocator", "apple-serviceslocator");
}

View File

@ -144,5 +144,12 @@ public class TestLdap extends AbstractExchangeSessionTestCase {
searchControls.setReturningAttributes(new String[]{"givenName"});
NamingEnumeration<SearchResult> searchResults = ldapContext.search("ou=people", "(cn=*a*)", searchControls);
}
public void testSearchIPad() throws NamingException {
SearchControls searchControls = new SearchControls();
searchControls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
searchControls.setReturningAttributes(new String[]{"postalcode", "labeleduri", "street", "givenname", "telephonenumber", "facsimiletelephonenumber", "title", "imhandle", "homepostaladdress", "st", "homephone", "applefloor", "jpegphoto", "pager", "mail", "sn", "buildingname", "ou", "destinationindicator", "c", "o", "l", "co", "postaladdress", "cn", "mobile"});
NamingEnumeration<SearchResult> searchResults = ldapContext.search("ou=people", "(|(mail=Test*)(cn=Test*)(givenname=Test*)(sn=Test*))", searchControls);
}
}