Package org.apache.directory.api.ldap.extras.controls.syncrepl.syncState

Examples of org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValue


                'c',
                'd' //     cookie syncCookie OPTIONAL,
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
            .decode( bb.array() );

        assertEquals( SyncStateTypeEnum.PRESENT, syncStateValue.getSyncStateType() );
        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
        assertEquals( "xkcd", Strings.utf8ToString( syncStateValue.getCookie() ) );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
View Full Code Here


                'b',
                'c' //     entryUUID syncUUID OPTIONAL
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
            .decode( bb.array() );

        assertEquals( SyncStateTypeEnum.ADD, syncStateValue.getSyncStateType() );
        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
        assertNull( syncStateValue.getCookie() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
View Full Code Here

                0x04,
                0x00 //     cookie syncCookie OPTIONAL,
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
            .decode( bb.array() );

        assertEquals( SyncStateTypeEnum.MODIFY, syncStateValue.getSyncStateType() );
        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
        assertEquals( "", Strings.utf8ToString( syncStateValue.getCookie() ) );

        // Check the encoding
        try
        {
            bb = ByteBuffer.allocate( 0x0A );
View Full Code Here

            {
                0x30, 0x00 // SyncStateValue ::= SEQUENCE {
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
    }
View Full Code Here

                'b',
                'c' //     cookie syncCookie OPTIONAL,
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
    }
View Full Code Here

                      //         modify (2)
                      //     }
            } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
    }
View Full Code Here

                'c',
                'd' //     cookie syncCookie OPTIONAL,
        } );
        bb.flip();

        SyncStateValue decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
            .decode( bb.array() );

        assertEquals( SyncStateTypeEnum.MODDN, syncStateValue.getSyncStateType() );
        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
        assertEquals( "xkcd", Strings.utf8ToString( syncStateValue.getCookie() ) );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValue

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.