Search in sources :

Example 56 with ZLdapFilter

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

the class TestLdapZLdapFilter method calendarResourceByForeignPrincipal.

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

Example 57 with ZLdapFilter

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

the class TestLdapZLdapFilter method calendarResourcesHomedOnServer.

@Test
public void calendarResourcesHomedOnServer() throws Exception {
    Server SERVER = prov.getLocalServer();
    String filter = LegacyLdapFilter.calendarResourcesHomedOnServer(SERVER.getServiceHostname());
    ZLdapFilter zLdapFilter = filterDactory.calendarResourcesHomedOnServer(SERVER.getServiceHostname());
    verify(FilterId.CALENDAR_RESOURCES_HOMED_ON_SERVER, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter) Server(com.zimbra.cs.account.Server)

Example 58 with ZLdapFilter

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

the class TestLdapZLdapFilter method addrsExist.

@Test
public void addrsExist() throws Exception {
    String[] ADDRS = new String[] { "addr1@test.com", "addr2@test.com", "addr2@test.com" };
    String filter = LegacyLdapFilter.addrsExist(ADDRS);
    ZLdapFilter zLdapFilter = filterDactory.addrsExist(ADDRS);
    verify(FilterId.ADDRS_EXIST, filter, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 59 with ZLdapFilter

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

the class TestLdapZLdapFilter method serverByService.

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

Example 60 with ZLdapFilter

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

the class TestLdapZLdapFilter method allAccountsOnly.

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

Aggregations

ZLdapFilter (com.zimbra.cs.ldap.ZLdapFilter)123 ZSearchResultEntry (com.zimbra.cs.ldap.ZSearchResultEntry)15 ZSearchResultEnumeration (com.zimbra.cs.ldap.ZSearchResultEnumeration)13 ZLdapContext (com.zimbra.cs.ldap.ZLdapContext)10 ZSearchControls (com.zimbra.cs.ldap.ZSearchControls)10 ServiceException (com.zimbra.common.service.ServiceException)9 AccountServiceException (com.zimbra.cs.account.AccountServiceException)8 AuthFailedServiceException (com.zimbra.cs.account.AccountServiceException.AuthFailedServiceException)8 ArrayList (java.util.ArrayList)8 Server (com.zimbra.cs.account.Server)7 LdapDIT (com.zimbra.cs.account.ldap.LdapDIT)7 Account (com.zimbra.cs.account.Account)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