Java源码示例:org.ldaptive.DeleteRequest

示例1
/**
 * 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);
        }
    }
}
 
示例2
public Response<Void> delete(DeleteRequest request) throws LdapException {
    return delegate.delete(request);
}