use of com.zimbra.client.ZMailbox.ZSearchGalResult in project zm-mailbox by Zimbra.
the class ZMailboxUtil method doAutoCompleteGal.
private void doAutoCompleteGal(String[] args) throws ServiceException {
ZSearchGalResult result = mMbox.autoCompleteGal(args[0], GalEntryType.account, 20);
dumpContacts(result.getContacts());
}
use of com.zimbra.client.ZMailbox.ZSearchGalResult in project zm-mailbox by Zimbra.
the class TestZClient method testImapUIDForGalContact.
@Test
public void testImapUIDForGalContact() throws Exception {
ZMailbox mbox = TestUtil.getZMailbox(USER_NAME);
ZSearchGalResult zsgr = mbox.autoCompleteGal(USER_NAME, /* query */
GalEntryType.all, 20);
assertNotNull("ZSearchGalResult", zsgr);
List<ZContact> contacts = zsgr.getContacts();
assertNotNull("ZSearchGalResult.getContacts()", contacts);
assertTrue(String.format("Contacts size %s should be greater than 0", contacts.size()), contacts.size() > 0);
for (ZContact contact : contacts) {
assertEquals("IMAP UID should be zero for Gal contact", 0, contact.getImapUid());
assertEquals("ModifiedSequence should be zero for Gal contact", 0, contact.getModifiedSequence());
}
}
Aggregations