Search in sources :

Example 1 with LdapConfigResponse

use of com.sequenceiq.cloudbreak.api.model.ldap.LdapConfigResponse in project cloudbreak by hortonworks.

the class LdapConfigToLdapConfigResponseConverter method convert.

@Override
public LdapConfigResponse convert(LdapConfig config) {
    LdapConfigResponse json = new LdapConfigResponse();
    json.setName(config.getName());
    json.setDescription(config.getDescription());
    json.setId(config.getId());
    json.setPublicInAccount(config.isPublicInAccount());
    json.setBindDn(config.getBindDn());
    json.setServerHost(config.getServerHost());
    json.setServerPort(config.getServerPort());
    json.setProtocol(config.getProtocol());
    json.setGroupSearchBase(config.getGroupSearchBase());
    json.setUserSearchBase(config.getUserSearchBase());
    json.setUserNameAttribute(config.getUserNameAttribute());
    json.setDomain(config.getDomain());
    json.setDirectoryType(config.getDirectoryType());
    json.setUserObjectClass(config.getUserObjectClass());
    json.setGroupObjectClass(config.getGroupObjectClass());
    json.setGroupNameAttribute(config.getGroupNameAttribute());
    json.setGroupMemberAttribute(config.getGroupMemberAttribute());
    json.setAdminGroup(config.getAdminGroup());
    return json;
}
Also used : LdapConfigResponse(com.sequenceiq.cloudbreak.api.model.ldap.LdapConfigResponse)

Example 2 with LdapConfigResponse

use of com.sequenceiq.cloudbreak.api.model.ldap.LdapConfigResponse in project cloudbreak by hortonworks.

the class LdapConfigToLdapConfigResponseConverterTest method testConvert.

@Test
public void testConvert() {
    // GIVEN
    // WHEN
    LdapConfigResponse result = underTest.convert(getSource());
    // THEN
    assertAllFieldsNotNull(result, Collections.singletonList("id"));
}
Also used : LdapConfigResponse(com.sequenceiq.cloudbreak.api.model.ldap.LdapConfigResponse) Test(org.junit.Test)

Aggregations

LdapConfigResponse (com.sequenceiq.cloudbreak.api.model.ldap.LdapConfigResponse)2 Test (org.junit.Test)1