use of com.zimbra.cs.account.SearchAccountsOptions in project zm-mailbox by Zimbra.
the class FixCalendarPriority method getAccountsOnServer.
private static List<NamedEntry> getAccountsOnServer() throws ServiceException {
Provisioning prov = Provisioning.getInstance();
Server server = prov.getLocalServer();
String serverName = server.getAttr(Provisioning.A_zimbraServiceHostname);
SearchAccountsOptions searchOpts = new SearchAccountsOptions(new String[] { Provisioning.A_zimbraId });
searchOpts.setSortOpt(SortOpt.SORT_DESCENDING);
List<NamedEntry> accts = prov.searchAccountsOnServer(server, searchOpts);
ZimbraLog.calendar.info("Found " + accts.size() + " accounts on server " + serverName);
return accts;
}
use of com.zimbra.cs.account.SearchAccountsOptions in project zm-mailbox by Zimbra.
the class FixCalendarEndTime method getAccountsOnServer.
private static List<NamedEntry> getAccountsOnServer() throws ServiceException {
Provisioning prov = Provisioning.getInstance();
Server server = prov.getLocalServer();
String serverName = server.getAttr(Provisioning.A_zimbraServiceHostname);
SearchAccountsOptions searchOpts = new SearchAccountsOptions(new String[] { Provisioning.A_zimbraId });
searchOpts.setSortOpt(SortOpt.SORT_DESCENDING);
List<NamedEntry> accts = prov.searchAccountsOnServer(server, searchOpts);
ZimbraLog.calendar.info("Found " + accts.size() + " accounts on server " + serverName);
return accts;
}
use of com.zimbra.cs.account.SearchAccountsOptions in project zm-mailbox by Zimbra.
the class LdapProvisioning method getAllCalendarResources.
@Override
public void getAllCalendarResources(Domain domain, Server server, NamedEntry.Visitor visitor) throws ServiceException {
if (server != null) {
SearchAccountsOptions searchOpts = new SearchAccountsOptions(domain);
searchOpts.setIncludeType(IncludeType.CALENDAR_RESOURCES_ONLY);
searchAccountsOnServerInternal(server, searchOpts, visitor);
} else {
getAllCalendarResources(domain, visitor);
}
}
use of com.zimbra.cs.account.SearchAccountsOptions in project zm-mailbox by Zimbra.
the class LdapProvisioning method getAllAdminAccounts.
@SuppressWarnings("unchecked")
@Override
public List<Account> getAllAdminAccounts() throws ServiceException {
SearchAccountsOptions opts = new SearchAccountsOptions();
opts.setFilter(filterFactory.allAdminAccounts());
opts.setIncludeType(IncludeType.ACCOUNTS_ONLY);
opts.setSortOpt(SortOpt.SORT_ASCENDING);
return (List<Account>) searchDirectoryInternal(opts);
}
use of com.zimbra.cs.account.SearchAccountsOptions in project zm-mailbox by Zimbra.
the class LdapProvisioning method getAllAccounts.
@Override
public List<?> getAllAccounts(Domain domain) throws ServiceException {
SearchAccountsOptions opts = new SearchAccountsOptions(domain);
opts.setFilter(filterFactory.allAccountsOnly());
opts.setIncludeType(IncludeType.ACCOUNTS_ONLY);
opts.setSortOpt(SortOpt.SORT_ASCENDING);
return searchDirectory(opts);
}
Aggregations