Package org.apache.directory.shared.ldap.codec.controls.search.persistentSearch

Examples of org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchDecorator


            } );

        String expected = Strings.dumpBytes(bb.array());
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
        PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
        ctrl.setChangesOnly( false );
        ctrl.setReturnECs( false );
        ctrl.setChangeTypes( 1 );
        bb = decorator.encode(ByteBuffer.allocate( decorator.computeLength() ) );
        String decoded = Strings.dumpBytes(bb.array());
        assertEquals( expected, decoded );
    }
View Full Code Here


              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

        PersistentSearch ctrl = ( PersistentSearch )decorator.decode( bb.array() );

        int changeTypes = ctrl.getChangeTypes();
        assertTrue( ChangeType.ADD.presentIn( changeTypes ) );
        assertTrue( ChangeType.MODDN.presentIn( changeTypes ) );
        assertEquals( false, ctrl.isChangesOnly() );
View Full Code Here

              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

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

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

              0x02, 0x01, 0x01, // changeTypes INTEGER,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

              0x02, 0x01, 0x01, // changeTypes INTEGER,
              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

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

            } );

        String expected = Strings.dumpBytes(bb.array());
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
        PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
        ctrl.setChangesOnly( false );
        ctrl.setReturnECs( false );
        ctrl.setChangeTypes( 1 );
        bb = decorator.encode(ByteBuffer.allocate( decorator.computeLength() ) );
        String decoded = Strings.dumpBytes(bb.array());
        assertEquals( expected, decoded );
    }
View Full Code Here

              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
              0x01, 0x01, 0x00  // returnECs BOOLEAN
            } );
        bb.flip();

        PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );

        PersistentSearch ctrl = ( PersistentSearch )decorator.decode( bb.array() );

        int changeTypes = ctrl.getChangeTypes();
        assertTrue( ChangeType.ADD.presentIn( changeTypes ) );
        assertTrue( ChangeType.MODDN.presentIn( changeTypes ) );
        assertEquals( false, ctrl.isChangesOnly() );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchDecorator

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.