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

Examples of org.apache.directory.shared.ldap.extras.controls.SyncStateValue


                0x04, 0x03, 'a', 'b', 'c',     //     entryUUID syncUUID OPTIONAL,
                0x04, 0x04, 'x', 'k', '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.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
View Full Code Here


                                          //     }
                0x04, 0x03, 'a', '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.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
View Full Code Here

                0x04, 0x03, 'a', 'b', 'c', //     entryUUID syncUUID OPTIONAL
                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

              0x30, 0x05,                 // SyncStateValue ::= SEQUENCE {
                0x04, 0x03, 'a', '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

                0x04, 0x03, 'a', 'b', 'c',     //     entryUUID syncUUID OPTIONAL,
                0x04, 0x04, 'x', 'k', '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.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
View Full Code Here

            } );
        bb.flip();

        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = (SyncStateValue)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.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
View Full Code Here

            } );
        bb.flip();

        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = (SyncStateValue)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.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
View Full Code Here

            } );
        bb.flip();

        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = (SyncStateValue)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

TOP

Related Classes of org.apache.directory.shared.ldap.extras.controls.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.