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

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


            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


            {
                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 void delete( Dn dn ) throws LdapException
    {
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( dn );

        DeleteResponse deleteResponse = delete( deleteRequest );

        processResponse( deleteResponse );
    }
View Full Code Here

        assertEquals( 1, delRequest.getMessageId() );
        assertEquals( "cn=testModify,ou=users,ou=system", delRequest.getName().toString() );

        // Check the length
        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
        internalDeleteRequest.setName( delRequest.getName() );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( internalDeleteRequest );
View Full Code Here

        @SuppressWarnings("unchecked")
        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
        assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
        assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );

        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
        internalDeleteRequest.setName( delRequest.getName() );
        internalDeleteRequest.addControl( control );

        // Check the encoding
        try
        {
            ByteBuffer bb = encoder.encodeMessage( internalDeleteRequest );
View Full Code Here

    /**
     * Creates a new getDecoratedMessage() of DelRequestDsml.
     */
    public DelRequestDsml( LdapApiService codec )
    {
        super( codec, new DeleteRequestImpl() );
    }
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

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

        DeleteResponse deleteResponse = delete( deleteRequest );

        try
        {
View Full Code Here

        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );

        // delete success
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
        deleteRequest.addControl( manageDSAIT );
        conn.delete( deleteRequest );

        assertNull( conn.lookup( "uid=akarasuluref,ou=users,ou=system", new Control[]
            { manageDSAIT } ) );
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.