Search in sources :

Example 6 with LdapUser

use of com.cloud.ldap.LdapUser in project cosmic by MissionCriticalCloud.

the class LdapListUsersCmd method createLdapUserResponse.

private List<LdapUserResponse> createLdapUserResponse(final List<LdapUser> users) {
    final List<LdapUserResponse> ldapResponses = new ArrayList<>();
    for (final LdapUser user : users) {
        if (getListType().equals("all") || !isACloudstackUser(user)) {
            final LdapUserResponse ldapResponse = _ldapManager.createLdapUserResponse(user);
            ldapResponse.setObjectName("LdapUser");
            ldapResponses.add(ldapResponse);
        }
    }
    return ldapResponses;
}
Also used : LdapUser(com.cloud.ldap.LdapUser) ArrayList(java.util.ArrayList) LdapUserResponse(com.cloud.api.response.LdapUserResponse)

Aggregations

LdapUser (com.cloud.ldap.LdapUser)6 LdapUserResponse (com.cloud.api.response.LdapUserResponse)4 ArrayList (java.util.ArrayList)4 NoLdapUserMatchingQueryException (com.cloud.ldap.NoLdapUserMatchingQueryException)3 ServerApiException (com.cloud.api.ServerApiException)2 UserAccount (com.cloud.user.UserAccount)2 InvalidParameterValueException (com.cloud.utils.exception.InvalidParameterValueException)2 AccountResponse (com.cloud.api.response.AccountResponse)1 LinkDomainToLdapResponse (com.cloud.api.response.LinkDomainToLdapResponse)1 ListResponse (com.cloud.api.response.ListResponse)1 CallContext (com.cloud.context.CallContext)1 Domain (com.cloud.domain.Domain)1 Account (com.cloud.user.Account)1