/** * 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); }
/** * * 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; }
LDAPConnection myCon = new LDAPConnection("192.168.1.1",389); myCon.delete("cn=Alan,ou=engineers,dc=fool,dc=com");
/** * 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; }
/** * 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; }
/** * 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; }
/** * * 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); } } }
/** * 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); } } }