本文整理了Java中com.unboundid.ldap.sdk.LDAPConnection.delete()
方法的一些代码示例,展示了LDAPConnection.delete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.delete()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.LDAPConnection
类名称:LDAPConnection
方法名:delete
[英]Processes the provided delete request.
[中]处理提供的删除请求。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Processes the provided delete request.
*
* @param deleteRequest The delete request to be processed. It must not be
* {@code null}.
*
* @return The result of processing the delete operation.
*
* @throws LDAPException If the server rejects the delete request, or if a
* problem is encountered while sending the request or
* reading the response.
*/
public LDAPResult delete(final ReadOnlyDeleteRequest deleteRequest)
throws LDAPException
{
return delete((DeleteRequest) deleteRequest);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Processes the provided delete request.
*
* @param deleteRequest The delete request to be processed. It must not be
* {@code null}.
*
* @return The result of processing the delete operation.
*
* @throws LDAPException If the server rejects the delete request, or if a
* problem is encountered while sending the request or
* reading the response.
*/
public LDAPResult delete(final ReadOnlyDeleteRequest deleteRequest)
throws LDAPException
{
return delete((DeleteRequest) deleteRequest);
}
代码示例来源:origin: com.redhat.lightblue.ldap/lightblue-ldap-hystrix
@Override
protected LDAPResult run() throws Exception {
return getConnection().delete(deleteRequest);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Deletes the entry with the specified DN.
*
* @param dn The DN of the entry to delete. It must not be {@code null}.
*
* @return The result of processing the delete operation.
*
* @throws LDAPException If the server rejects the delete request, or if a
* problem is encountered while sending the request or
* reading the response.
*/
public LDAPResult delete(final String dn)
throws LDAPException
{
return delete(new DeleteRequest(dn));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Deletes the entry with the specified DN.
*
* @param dn The DN of the entry to delete. It must not be {@code null}.
*
* @return The result of processing the delete operation.
*
* @throws LDAPException If the server rejects the delete request, or if a
* problem is encountered while sending the request or
* reading the response.
*/
public LDAPResult delete(final String dn)
throws LDAPException
{
return delete(new DeleteRequest(dn));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Attempts to delete the task with the specified task ID.
*
* @param taskID The task ID of the task to be deleted.
* @param connection The connection to the Directory Server in which to
* perform the operation.
*
* @throws LDAPException If a problem occurs while communicating with the
* Directory Server.
*/
public static void deleteTask(final String taskID,
final LDAPConnection connection)
throws LDAPException
{
connection.delete(getTaskDN(taskID));
}
代码示例来源:origin: hlavki/g-suite-identity-sync
@Override
public void removeGroup(String groupName) throws LdapSystemException {
try (LDAPConnection conn = ldapPool.getConnection()) {
String groupDN = getGroupDN(groupName);
SearchResultEntry entry = conn.getEntry(groupDN, GROUP_NAME_ATTR);
if (entry != null) {
conn.delete(groupDN);
}
} catch (LDAPException e) {
throw new LdapSystemException(e);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final LDAPResult result = conn.delete(deleteRequest);
releaseConnection(conn);
return result;
final LDAPResult result = newConn.delete(deleteRequest);
releaseConnection(newConn);
return result;
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
final LDAPResult result = conn.delete(deleteRequest);
releaseConnection(conn);
return result;
final LDAPResult result = newConn.delete(deleteRequest);
releaseConnection(newConn);
return result;
代码示例来源:origin: hlavki/g-suite-identity-sync
@Override
public void removeGroupMember(String accountDN, String groupName) throws LdapSystemException {
try (LDAPConnection conn = ldapPool.getConnection()) {
LdapGroup group = getGroup(groupName, conn);
if (group == null || !group.getMembersDn().contains(accountDN)) {
log.info("Nothing to do. Account {} is not member of group {}", accountDN, groupName);
} else {
Modification mod = new Modification(DELETE, config.getLdapGroupsMemberAttr(), accountDN);
conn.modify(new ModifyRequest(group.getDn(), mod));
log.info("Remove membership {} from {}", accountDN, group.getName());
if (group.getMembersDn().size() == 1) {
log.info("Removing group {}", group.getName());
conn.delete(group.getDn());
}
}
} catch (LDAPException e) {
throw new LdapSystemException(e);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Removes an entry from the directory.
*
* @param dn The DN of the entry to delete.
* @param constraints The constraints to use for the delete operation.
*
* @throws LDAPException If a problem occurs while processing the delete.
*/
public void delete(final String dn, final LDAPConstraints constraints)
throws LDAPException
{
final DeleteRequest deleteRequest = new DeleteRequest(dn);
update(deleteRequest, constraints);
try
{
final LDAPResult result = conn.delete(deleteRequest);
setResponseControls(result);
}
catch (com.unboundid.ldap.sdk.LDAPException le)
{
debugException(le);
setResponseControls(le);
throw new LDAPException(le);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
try
deleteResult = ldapConnection.delete(deleteRequest);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
try
deleteResult = connection.delete(new DeleteRequest(dn, deleteControls));
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
try
deleteResult = sourceConnection.delete(
new DeleteRequest(dn, deleteControls));
内容来源于网络,如有侵权,请联系作者删除!