Examples of ModifyRequestCodec


Examples of org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec

     * @param msgId message id number
     */
    private int changeModifyEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
        InvalidNameException, NamingException, EncoderException
    {
        ModifyRequestCodec modifyRequest = new ModifyRequestCodec();

        String dn = entry.getDn().getName();

        if ( isDebugEnabled() )
        {
            System.out.println( "Modify of entry " + dn );
        }

        modifyRequest.setObject( new DN( dn ) );
        modifyRequest.initModifications();

        for ( Modification modification: entry.getModificationItems() )
        {
            modifyRequest.setCurrentOperation( modification.getOperation() );
            modifyRequest.addAttributeTypeAndValues( modification.getAttribute().getId() );

            for ( Value<?> value:modification.getAttribute() )
            {
                modifyRequest.addAttributeValue( value );
            }
        }

        modifyRequest.setMessageId( messageId );

        // Encode and send the delete request
        ByteBuffer bb = modifyRequest.encode();
        bb.flip();

        sendMessage( bb );

        bb.clear();
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec

     */
    public ModifyFuture modifyAsync( ModifyRequest modRequest ) throws LdapException
    {
        checkSession();

        ModifyRequestCodec modReqCodec = new ModifyRequestCodec();

        int newId = messageId.incrementAndGet();
        modRequest.setMessageId( newId );
        modReqCodec.setMessageId( newId );

        modReqCodec.setModifications( modRequest.getMods() );
        modReqCodec.setObject( modRequest.getDn() );

        setControls( modRequest.getControls(), modReqCodec );
       
        ModifyFuture modifyFuture = new ModifyFuture( this, newId );
        addToFutureMap( newId, modifyFuture );
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec

     * @param msgId message id number
     */
    private int changeModifyEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
         LdapInvalidDnException, EncoderException
    {
        ModifyRequestCodec modifyRequest = new ModifyRequestCodec();

        String dn = entry.getDn().getName();

        if ( isDebugEnabled() )
        {
            System.out.println( "Modify of entry " + dn );
        }

        modifyRequest.setObject( new DN( dn ) );
        modifyRequest.initModifications();

        for ( Modification modification: entry.getModificationItems() )
        {
            modifyRequest.setCurrentOperation( modification.getOperation() );
            modifyRequest.addAttributeTypeAndValues( modification.getAttribute().getId() );

            for ( Value<?> value:modification.getAttribute() )
            {
                modifyRequest.addAttributeValue( value );
            }
        }

        modifyRequest.setMessageId( messageId );

        // Encode and send the delete request
        ByteBuffer bb = modifyRequest.encode();
        bb.flip();

        sendMessage( bb );

        bb.clear();
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.