Search in sources :

Example 31 with ZLdapFilter

use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.

the class TestLdapZLdapFilter method domainByVirtualHostame.

@Test
public void domainByVirtualHostame() throws Exception {
    String VIRTUAL_HOST_NAME = getTestName();
    String filter = LegacyLdapFilter.domainByVirtualHostame(VIRTUAL_HOST_NAME);
    ZLdapFilter zLdapFilter = filterDactory.domainByVirtualHostame(VIRTUAL_HOST_NAME);
    verify(FilterId.DOMAIN_BY_VIRTUAL_HOSTNAME, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 32 with ZLdapFilter

use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.

the class TestLdapZLdapFilter method andWith.

@Test
public void andWith() throws Exception {
    String FILTER1 = "(foo=1)";
    String FILTER2 = "(bar=2)";
    String filter = LegacyLdapFilter.andWith(FILTER1, FILTER2);
    ZLdapFilter zLdapFilter = filterDactory.andWith(/* use ADMIN_SEARCH instead of UNITTEST to distinguish with filter id for FILER2,
                 * filter id of the first filter should be used in the result filter
                 */
    filterDactory.fromFilterString(FilterId.ADMIN_SEARCH, FILTER1), filterDactory.fromFilterString(FilterId.UNITTEST, FILTER2));
    verify(FilterId.ADMIN_SEARCH, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 33 with ZLdapFilter

use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.

the class TestLdapZLdapFilter method allCalendarResources.

@Test
public void allCalendarResources() throws Exception {
    String filter = LegacyLdapFilter.allCalendarResources();
    ZLdapFilter zLdapFilter = filterDactory.allCalendarResources();
    verify(FilterId.ALL_CALENDAR_RESOURCES, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 34 with ZLdapFilter

use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.

the class TestLdapZLdapFilter method accountByName.

@Test
public void accountByName() throws Exception {
    String NAME = getTestName();
    String filter = LegacyLdapFilter.accountByName(NAME);
    ZLdapFilter zLdapFilter = filterDactory.accountByName(NAME);
    verify(FilterId.ACCOUNT_BY_NAME, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 35 with ZLdapFilter

use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.

the class TestLdapZLdapFilter method allSignatures.

@Test
public void allSignatures() throws Exception {
    String filter = LegacyLdapFilter.allSignatures();
    ZLdapFilter zLdapFilter = filterDactory.allSignatures();
    verify(FilterId.ALL_SIGNATURES, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Aggregations

ZLdapFilter (com.zimbra.cs.ldap.ZLdapFilter)121 ZSearchResultEntry (com.zimbra.cs.ldap.ZSearchResultEntry)15 ZSearchResultEnumeration (com.zimbra.cs.ldap.ZSearchResultEnumeration)11 ZLdapContext (com.zimbra.cs.ldap.ZLdapContext)8 ZSearchControls (com.zimbra.cs.ldap.ZSearchControls)8 ArrayList (java.util.ArrayList)8 ServiceException (com.zimbra.common.service.ServiceException)7 Server (com.zimbra.cs.account.Server)7 LdapDIT (com.zimbra.cs.account.ldap.LdapDIT)7 Account (com.zimbra.cs.account.Account)6 AccountServiceException (com.zimbra.cs.account.AccountServiceException)6 AuthFailedServiceException (com.zimbra.cs.account.AccountServiceException.AuthFailedServiceException)6 LdapSizeLimitExceededException (com.zimbra.cs.ldap.LdapException.LdapSizeLimitExceededException)6 NamedEntry (com.zimbra.cs.account.NamedEntry)5 SearchAccountsOptions (com.zimbra.cs.account.SearchAccountsOptions)5 BySearchResultEntrySearcher (com.zimbra.cs.account.ldap.BySearchResultEntrySearcher)5 SearchLdapOptions (com.zimbra.cs.ldap.SearchLdapOptions)5 ProvTest (com.zimbra.qa.unittest.prov.ProvTest)5 LDAPException (com.unboundid.ldap.sdk.LDAPException)3 SearchRequest (com.unboundid.ldap.sdk.SearchRequest)3