Package org.apache.directory.ldap.client.api.message

Examples of org.apache.directory.ldap.client.api.message.DeleteRequest


     */
    public DeleteResponse delete( String dn ) throws LdapException
    {
        try
        {
            DeleteRequest deleteRequest = new DeleteRequest( new DN( dn ) );

            return delete( deleteRequest );
        }
        catch ( InvalidNameException e )
        {
View Full Code Here


     * @param dn the target entry's DN
     * @throws LdapException If the DN is not valid or if the deletion failed
     */
    public DeleteResponse delete( DN dn ) throws LdapException
    {
        DeleteRequest deleteRequest = new DeleteRequest( dn );

        return delete( deleteRequest );
    }
View Full Code Here

    {
        String treeDeleteOid = "1.2.840.113556.1.4.805";

        if ( isControlSupported( treeDeleteOid ) )
        {
            DeleteRequest delRequest = new DeleteRequest( dn );
            delRequest.add( new ControlImpl( treeDeleteOid ) );
            return delete( delRequest );
        }
        else
        {
            String msg = "The subtreeDelete control (1.2.840.113556.1.4.805) is not supported by the server\n" +
View Full Code Here

            String treeDeleteOid = "1.2.840.113556.1.4.805";
            DN newDn = new DN( dn );

            if ( isControlSupported( treeDeleteOid ) )
            {
                DeleteRequest delRequest = new DeleteRequest( newDn );
                delRequest.add( new ControlImpl( treeDeleteOid ) );
                return delete( delRequest );
            }
            else
            {
                String msg = "The subtreeDelete control (1.2.840.113556.1.4.805) is not supported by the server\n" +
View Full Code Here

            if ( !cursor.next() ) // if this is a leaf entry's DN
            {
                LOG.debug( "deleting {}", dn.getName() );
                cursorMap.remove( dn );
                cursor.close();
                delResponse = delete( new DeleteRequest( dn ) );
            }
            else
            {
                do
                {
                    SearchResponse searchResp = cursor.get();

                    if ( searchResp instanceof SearchResultEntry )
                    {
                        SearchResultEntry searchResult = ( SearchResultEntry ) searchResp;
                        deleteRecursive( searchResult.getEntry().getDn(), cursorMap, listener );
                    }
                }
                while ( cursor.next() );

                cursorMap.remove( dn );
                cursor.close();
                LOG.debug( "deleting {}", dn.getName() );
                delResponse = delete( new DeleteRequest( dn ) );
            }
        }
        catch ( Exception e )
        {
            String msg = "Failed to delete child entries under the DN " + dn.getName();
View Full Code Here

    {
        DN dn = new DN( "cn=grand_child12,cn=child1,cn=parent,ou=system" );
       
        assertTrue( session.exists( dn ) );
       
        DeleteFuture deleteFuture = connection.deleteAsync( new DeleteRequest( dn ));
       
        try
        {
            DeleteResponse deleteResponse = deleteFuture.get( 1000, TimeUnit.MILLISECONDS );
           
View Full Code Here

TOP

Related Classes of org.apache.directory.ldap.client.api.message.DeleteRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.