e);
}
}
private LdapServerListEntryDTO toListEntry(Request request, CLdapServerConfiguration ldapServer) {
LdapServerListEntryDTO listEntry = new LdapServerListEntryDTO();
listEntry.setId(ldapServer.getId());
listEntry.setName(ldapServer.getName());
listEntry.setUrl(this.createChildReference(request, ldapServer.getId()).toString());
try {
listEntry.setLdapUrl(new LdapURL(ldapServer.getConnectionInfo().getProtocol(), ldapServer
.getConnectionInfo().getHost(), ldapServer.getConnectionInfo().getPort(), ldapServer
.getConnectionInfo().getSearchBase()).toString());
}
catch (MalformedURLException e) {
this.getLogger().warn("Ldap Server has invalid URL", e);
listEntry.setLdapUrl("FIX: Invalid LDAP URL");
}
return listEntry;
}