Package org.apache.directory.shared.ldap.model.message

Examples of org.apache.directory.shared.ldap.model.message.DeleteRequestImpl


        }
        return result;
    }

    private void deleteLeaf(Dn dn) {
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName(dn);
        LdapResult result;
        try {
            result = connection.delete(deleteRequest).getLdapResult();
        } catch (LdapException e) {
            throw new LdapDaoException(e);
View Full Code Here


    @Test
    public void testDeleteAsync() throws Exception
    {
        assertTrue( session.exists( "cn=grand_child12,cn=child1,cn=parent,ou=system" ) );

        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( new Dn( "cn=grand_child12,cn=child1,cn=parent,ou=system" ) );

        DeleteFuture deleteFuture = connection.deleteAsync( deleteRequest );

        DeleteResponse deleteResponse = deleteFuture.get( 1000, TimeUnit.MILLISECONDS );
View Full Code Here

    {
        assertTrue( session.exists( "cn=parent,ou=system" ) );

        if ( connection.isControlSupported( "1.2.840.113556.1.4.805" ) )
        {
            DeleteRequest deleteRequest = new DeleteRequestImpl();
            deleteRequest.setName( new Dn( "cn=parent,ou=system" ) );
            Control deleteTreeControl = new OpaqueControl( "1.2.840.113556.1.4.805" );
            deleteRequest.addControl( deleteTreeControl );
   
            DeleteResponse deleteResponse = connection.delete( deleteRequest );
   
            assertNotNull( deleteResponse );
            assertEquals( ResultCodeEnum.SUCCESS, deleteResponse.getLdapResult().getResultCode() );
View Full Code Here

     */
    public void action( LdapMessageContainer<DeleteRequestDecorator> container ) throws DecoderException
    {
        // Create the DeleteRequest LdapMessage instance and store it in the container
        DeleteRequestDecorator delRequest = new DeleteRequestDecorator(
            container.getLdapCodecService(), new DeleteRequestImpl( container.getMessageId() ) );
        container.setMessage( delRequest );

        // And store the Dn into it
        // Get the Value and store it in the DelRequest
        TLV tlv = container.getCurrentTLV();
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public DeleteResponse delete( Dn dn ) throws LdapException
    {
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( dn );

        return delete( deleteRequest );
    }
View Full Code Here

    {
        String treeDeleteOid = "1.2.840.113556.1.4.805";

        if ( isControlSupported( treeDeleteOid ) )
        {
            DeleteRequest deleteRequest = new DeleteRequestImpl();
            deleteRequest.setName( dn );
            deleteRequest.addControl( new OpaqueControl( treeDeleteOid ) );
            return delete( deleteRequest );
        }
        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 deleteRequest = new DeleteRequestImpl();
                deleteRequest.setName( newDn );
                deleteRequest.addControl( new OpaqueControl( treeDeleteOid ) );
                return delete( deleteRequest );
            }
            else
            {
                String msg = "The subtreeDelete control (1.2.840.113556.1.4.805) is not supported by the server\n"
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void delete( Dn dn ) throws LdapException
    {
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( dn );

        DeleteResponse deleteResponse = delete( deleteRequest );

        processResponse( deleteResponse );
    }
View Full Code Here

    {
        String treeDeleteOid = "1.2.840.113556.1.4.805";

        if ( isControlSupported( treeDeleteOid ) )
        {
            DeleteRequest deleteRequest = new DeleteRequestImpl();
            deleteRequest.setName( dn );
            deleteRequest.addControl( new OpaqueControl( treeDeleteOid ) );
            DeleteResponse deleteResponse = delete( deleteRequest );

            processResponse( deleteResponse );
        }
        else
View Full Code Here

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

            if ( isControlSupported( treeDeleteOid ) )
            {
                DeleteRequest deleteRequest = new DeleteRequestImpl();
                deleteRequest.setName( newDn );
                deleteRequest.addControl( new OpaqueControl( treeDeleteOid ) );
                DeleteResponse deleteResponse = delete( deleteRequest );

                processResponse( deleteResponse );
            }
            else
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.message.DeleteRequestImpl

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.