Search in sources :

Example 46 with ZLdapFilter

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

the class TestLdapZLdapFilter method allDataSources.

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

Example 47 with ZLdapFilter

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

the class TestLdapZLdapFilter method accountsOnServerAndCosHasSubordinates.

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

Example 48 with ZLdapFilter

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

the class TestLdapZLdapFilter method fromFilterString.

@Test
public void fromFilterString() throws Exception {
    String FILTER_STR = "(blah=123)";
    ZLdapFilter zLdapFilter = filterDactory.fromFilterString(FilterId.AUTO_PROVISION_SEARCH, FILTER_STR);
    verify(FilterId.AUTO_PROVISION_SEARCH, FILTER_STR, zLdapFilter);
}
Also used : ZLdapFilter(com.zimbra.cs.ldap.ZLdapFilter)

Example 49 with ZLdapFilter

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

the class TestLdapZLdapFilter method allDomains.

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

Example 50 with ZLdapFilter

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

the class TestLdapZLdapFilter method homedOnServer.

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

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