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

Examples of org.apache.directory.api.ldap.extras.controls.SyncInfoValue


                0x01,
                ( byte ) 0xFF //         refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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


                0x01,
                ( byte ) 0x00 //         refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

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

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

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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

                0x01,
                0x00 //        refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

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

            {
                ( byte ) 0xA1, 0x00 // syncInfoValue ::= CHOICE {
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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

                0x01,
                ( byte ) 0xFF //         refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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

                0x01,
                ( byte ) 0x00 //         refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

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

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

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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

                0x01,
                0x00 //        refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

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

            {
                ( byte ) 0xA2, 0x00 // syncInfoValue ::= CHOICE {
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

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

TOP

Related Classes of org.apache.directory.api.ldap.extras.controls.SyncInfoValue

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.