Examples of AddRequestDecorator


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

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

        TLV tlv = container.getCurrentTLV();

        // Store the value. It can't be null
        Object value = null;

        if ( tlv.getLength() == 0 )
        {
            addRequest.addAttributeValue( "" );
        }
        else
        {
            if ( container.isBinary( addRequest.getCurrentAttributeType() ) )
            {
                value = tlv.getValue().getData();

                if ( IS_DEBUG )
                {
                    LOG.debug( "Adding value {}", Strings.dumpBytes((byte[]) value) );
                }

                addRequest.addAttributeValue( ( byte[] ) value );
            }
            else
            {
                value = Strings.utf8ToString(tlv.getValue().getData());

                if ( IS_DEBUG )
                {
                    LOG.debug( "Adding value {}" + value );
                }

                addRequest.addAttributeValue( ( String ) value );
            }

        }

        // We can have an END transition
View Full Code Here

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

     */
    public void action( LdapMessageContainer<AddRequestDecorator> container ) throws DecoderException
    {
        // Now, we can allocate the AddRequest Object
        int messageId = container.getMessageId();
        AddRequestDecorator addRequest = new AddRequestDecorator(
            container.getLdapCodecService(), new AddRequestImpl( messageId ) );
        container.setMessage( addRequest );

        // We will check that the request is not null
        TLV tlv = container.getCurrentTLV();
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.