Package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator


              0x04, 0x03, 'a', 'b', 'c',    //     cookie syncCookie OPTIONAL,
              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_ONLY, syncRequestValue.getMode() );
        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here


              0x04, 0x03, 'a', 'b', 'c',    //     cookie syncCookie OPTIONAL,
              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here

                                            //     }
              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecoratorcodec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertNull( syncRequestValue.getCookie() );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here

                                            //     }
              0x01, 0x01, (byte)0xFF        //     reloadHint BOOLEAN DEFAULT FALSE
            } );
        buffer.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( buffer.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertNull( syncRequestValue.getCookie() );
        assertEquals( true, syncRequestValue.isReloadHint() );
View Full Code Here

                                            //         refreshAndPersist (3)
                                            //     }
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertNull( syncRequestValue.getCookie() );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here

                                            //     }
              0x04, 0x03, 'a', 'b', 'c'     //     cookie syncCookie OPTIONAL,
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here

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

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
        assertEquals( "", Strings.utf8ToString(syncRequestValue.getCookie()) );
        assertEquals( false, syncRequestValue.isReloadHint() );
View Full Code Here

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

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        try
        {
            decorator.decode( bb.array() );
            fail( "we should not get there" );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
View Full Code Here

            0x30, 0x05,                     // syncRequestValue ::= SEQUENCE {
              0x04, 0x03, 'a', 'b', 'c'     //     cookie syncCookie OPTIONAL,
            } );
        bb.flip();

        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
       
        try
        {
            decorator.decode( bb.array() );
            fail( "we should not get there" );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
View Full Code Here

     *
     * @throws Exception in case of any problems encountered while searching
     */
    private void doSyncSearch( SynchronizationModeEnum syncType, boolean reloadHint ) throws Exception
    {
        SyncRequestValueDecorator syncReq = new SyncRequestValueDecorator( ldapCodecService );

        syncReq.setMode( syncType );
        syncReq.setReloadHint( reloadHint );

        if ( syncCookie != null )
        {
            LOG.debug( "searching with searchRequest, cookie '{}'", Strings.utf8ToString(syncCookie) );
            syncReq.setCookie( syncCookie );
        }

        searchRequest.addControl( syncReq );

        // Do the search
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator

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.