Examples of ModifyRequestDecorator


Examples of org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator

    /**
     * {@inheritDoc}
     */
    public void action( LdapMessageContainer<ModifyRequestDecorator> container )
    {
        ModifyRequestDecorator modifyRequestDecorator = container.getMessage();

        TLV tlv = container.getCurrentTLV();

        // Store the value. It can't be null
        byte[] value = StringConstants.EMPTY_BYTES;

        try
        {
            if ( tlv.getLength() == 0 )
            {
                modifyRequestDecorator.addAttributeValue( "" );
            }
            else
            {
                value = tlv.getValue().getData();

                if ( container.isBinary( modifyRequestDecorator.getCurrentAttributeType() ) )
                {
                    modifyRequestDecorator.addAttributeValue( value );
                }
                else
                {
                    modifyRequestDecorator.addAttributeValue( Strings.utf8ToString( ( byte[] ) value ) );
                }
            }
        }
        catch ( LdapException le )
        {
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator

            case INTERMEDIATE_RESPONSE:
                decorator = new IntermediateResponseDecorator( codec, ( IntermediateResponse ) decoratedMessage );
                break;

            case MODIFY_REQUEST:
                decorator = new ModifyRequestDecorator( codec, ( ModifyRequest ) decoratedMessage );
                break;

            case MODIFY_RESPONSE:
                decorator = new ModifyResponseDecorator( codec, ( ModifyResponse ) decoratedMessage );
                break;
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator

     */
    public void action( LdapMessageContainer<ModifyRequestDecorator> container )
    {
        // Now, we can allocate the ModifyRequest Object
        ModifyRequest modifyRequest = new ModifyRequestImpl( container.getMessageId() );
        ModifyRequestDecorator modifyRequestDecorator = new ModifyRequestDecorator(
            container.getLdapCodecService(), modifyRequest );
        container.setMessage( modifyRequestDecorator );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator

    /**
     * {@inheritDoc}
     */
    public void action( LdapMessageContainer<ModifyRequestDecorator> container )
    {
        ModifyRequestDecorator modifyRequestDecorator = container.getMessage();

        TLV tlv = container.getCurrentTLV();

        // Store the value. It can't be null
        byte[] value = StringConstants.EMPTY_BYTES;

        if ( tlv.getLength() == 0 )
        {
            modifyRequestDecorator.addAttributeValue( "" );
        }
        else
        {
            value = tlv.getValue().getData();

            if ( container.isBinary( modifyRequestDecorator.getCurrentAttributeType() ) )
            {
                modifyRequestDecorator.addAttributeValue( value );
            }
            else
            {
                modifyRequestDecorator.addAttributeValue( Strings.utf8ToString((byte[]) value) );
            }
        }

        // We can have an END transition
        container.setGrammarEndAllowed( true );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.