/**
* Removes the given LDAP entries.
*
* @param connection Open LDAP connection used to connect to directory.
* @param entries Collection of LDAP entries.
*/
public static void removeLdapEntries(final Connection connection, final Collection<LdapEntry> entries) {
for (final LdapEntry entry : entries) {
try {
new DeleteOperation(connection).execute(new DeleteRequest(entry.getDn()));
} catch (final LdapException e) {
LOGGER.warn("LDAP error removing entry {}", entry, e);
}
}
}
public Response<Void> delete(DeleteRequest request) throws LdapException {
return delegate.delete(request);
}