com.novell.ldap.LDAPConnection.delete()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中com.novell.ldap.LDAPConnection.delete()方法的一些代码示例,展示了LDAPConnection.delete()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.delete()方法的具体详情如下:
包路径:com.novell.ldap.LDAPConnection
类名称:LDAPConnection
方法名:delete

LDAPConnection.delete介绍

[英]Synchronously deletes the entry with the specified distinguished name from the directory.

Note: A Delete operation will not remove an entry that contains subordinate entries, nor will it dereference alias entries.
[中]从目录中同步删除具有指定可分辨名称的条目。
注意:删除操作不会删除包含从属项的项,也不会取消对别名项的引用。

代码示例

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Asynchronously deletes the entry with the specified distinguished name
 * from the directory and returns the results to the specified queue.
 *
 * <p>Note: A Delete operation will not remove an entry that contains
 * subordinate entries, nor will it dereference alias entries. </p>
 *
 *  @param dn      The distinguished name of the entry to modify.
 *<br><br>
 *  @param queue     The queue for messages returned from a server in
 *                   response to this request. If it is null, a
 *                   queue object is created internally.
 *
 *  @exception LDAPException A general exception which includes an error
 *  message and an LDAP error code.
 *
 */
public LDAPResponseQueue delete(String dn, LDAPResponseQueue queue)
  throws LDAPException
{
  return delete(dn, queue, defSearchCons);
}

代码示例来源:origin: com.novell.ldap/jldap

/**
 *
 * Synchronously deletes the entry with the specified distinguished name
 * from the directory.
 *
 * <p>Note: A Delete operation will not remove an entry that contains
 * subordinate entries, nor will it dereference alias entries. </p>
 *
 *  @param dn      The distinguished name of the entry to delete.
 *
 *  @exception LDAPException A general exception which includes an error
 *  message and an LDAP error code.
 */
public void delete(String dn)
  throws LDAPException
{
  delete(dn, defSearchCons);
  return;
}

代码示例来源:origin: stackoverflow.com

LDAPConnection myCon = new LDAPConnection("192.168.1.1",389);
myCon.delete("cn=Alan,ou=engineers,dc=fool,dc=com");

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Synchronously deletes the entry with the specified distinguished name
 * from the directory.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#delete(java.lang.String)">
    com.novell.ldap.LDAPConnection.delete(String)</a>
 */
public void delete(String dn)
  throws LDAPException
{
  try {
    conn.delete( dn);
  } catch( com.novell.ldap.LDAPException ex) {
    if( ex instanceof com.novell.ldap.LDAPReferralException) {
      throw new LDAPReferralException(
          (com.novell.ldap.LDAPReferralException)ex);
    } else {
      throw new LDAPException( ex);
    }
  }
  return;
}

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Synchronously deletes the entry with the specified distinguished name
 * from the directory, using the specified constraints.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#delete(java.lang.String, com.novell.ldap.LDAPConstraints)">
    com.novell.ldap.LDAPConnection.delete(String, LDAPConstraints)</a>
 */
public void delete(String dn, LDAPConstraints cons)
  throws LDAPException
{
  try {
    conn.delete( dn, cons.getWrappedObject());
  } catch( com.novell.ldap.LDAPException ex) {
    if( ex instanceof com.novell.ldap.LDAPReferralException) {
      throw new LDAPReferralException(
          (com.novell.ldap.LDAPReferralException)ex);
    } else {
      throw new LDAPException( ex);
    }
  }
  return;
}

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Synchronously deletes the entry with the specified distinguished name
 * from the directory, using the specified constraints.
 *
 * <p>Note: A Delete operation will not remove an entry that contains
 * subordinate entries, nor will it dereference alias entries. </p>
 *
 *  @param dn      The distinguished name of the entry to delete.
 *<br><br>
 *  @param cons    Constraints specific to the operation.
 *
 *  @exception LDAPException A general exception which includes an error
 *                           message and an LDAP error code.
 */
public void delete(String dn, LDAPConstraints cons)
  throws LDAPException
{
  LDAPResponseQueue queue =
    delete(dn, null, cons);
  // Get a handle to the delete response
  LDAPResponse deleteResponse = (LDAPResponse)(queue.getResponse());
  // Set local copy of responseControls synchronously - if there were any
  synchronized (responseCtlSemaphore) {
    responseCtls = deleteResponse.getControls();
  }
  chkResultCode( queue, cons, deleteResponse);
  return;
}

代码示例来源:origin: com.novell.ldap/jldap

/**
 *
 * Asynchronously deletes the entry with the specified distinguished name
 * from the directory and returns the results to the specified queue.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#delete(java.lang.String, com.novell.ldap.LDAPResponseQueue)">
    com.novell.ldap.LDAPConnection.delete(String,
    LDAPResponseQueue)</a>
 */
public LDAPResponseQueue delete(String dn,
                LDAPResponseQueue queue)
  throws LDAPException
{
  try {
    return new LDAPResponseQueue(
     conn.delete( dn,
            queue.getWrappedObject()));
  } catch( com.novell.ldap.LDAPException ex) {
    if( ex instanceof com.novell.ldap.LDAPReferralException) {
      throw new LDAPReferralException(
          (com.novell.ldap.LDAPReferralException)ex);
    } else {
      throw new LDAPException( ex);
    }
  }
}

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Asynchronously deletes the entry with the specified distinguished name
 * from the directory, using the specified contraints and queue.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#delete(java.lang.String, com.novell.ldap.LDAPResponseQueue,
    com.novell.ldap.LDAPConstraints)">
    com.novell.ldap.LDAPConnection.delete(String, LDAPResponseQueue,
    LDAPConstraints)</a>
 */
public LDAPResponseQueue delete(String dn,
                LDAPResponseQueue queue,
                LDAPConstraints cons)
  throws LDAPException
{
  try {
    return new LDAPResponseQueue(
      conn.delete( dn,
             queue.getWrappedObject(),
             cons.getWrappedObject()));
  } catch( com.novell.ldap.LDAPException ex) {
    if( ex instanceof com.novell.ldap.LDAPReferralException) {
      throw new LDAPReferralException(
          (com.novell.ldap.LDAPReferralException)ex);
    } else {
      throw new LDAPException( ex);
    }
  }
}

相关文章