Package org.apache.directory.api.ldap.codec.decorators

Examples of org.apache.directory.api.ldap.codec.decorators.DeleteRequestDecorator


            case COMPARE_RESPONSE:
                decorator = new CompareResponseDecorator( codec, ( CompareResponse ) decoratedMessage );
                break;

            case DEL_REQUEST:
                decorator = new DeleteRequestDecorator( codec, ( DeleteRequest ) decoratedMessage );
                break;

            case DEL_RESPONSE:
                decorator = new DeleteResponseDecorator( codec, ( DeleteResponse ) decoratedMessage );
                break;
View Full Code Here


            case COMPARE_RESPONSE:
                decorator = new CompareResponseDecorator( codec, ( CompareResponse ) decoratedMessage );
                break;

            case DEL_REQUEST:
                decorator = new DeleteRequestDecorator( codec, ( DeleteRequest ) decoratedMessage );
                break;

            case DEL_RESPONSE:
                decorator = new DeleteResponseDecorator( codec, ( DeleteResponse ) decoratedMessage );
                break;
View Full Code Here

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

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

        // We have to handle the special case of a 0 length matched
        // Dn
        Dn entry = null;

        if ( tlv.getLength() == 0 )
        {
            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04073 ) );
        }
        else
        {
            byte[] dnBytes = tlv.getValue().getData();
            String dnStr = Strings.utf8ToString( dnBytes );

            try
            {
                entry = new Dn( dnStr );
            }
            catch ( LdapInvalidDnException ine )
            {
                String msg = I18n.err( I18n.ERR_04074, dnStr, Strings.dumpBytes( dnBytes ), ine
                    .getLocalizedMessage() );
                LOG.error( msg );

                DeleteResponseImpl response = new DeleteResponseImpl( delRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }

            delRequest.setName( entry );
        }

        // We can have an END transition
        container.setGrammarEndAllowed( true );
View Full Code Here

            case COMPARE_RESPONSE:
                decorator = new CompareResponseDecorator( codec, ( CompareResponse ) decoratedMessage );
                break;

            case DEL_REQUEST:
                decorator = new DeleteRequestDecorator( codec, ( DeleteRequest ) decoratedMessage );
                break;

            case DEL_RESPONSE:
                decorator = new DeleteResponseDecorator( codec, ( DeleteResponse ) decoratedMessage );
                break;
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.codec.decorators.DeleteRequestDecorator

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.