Package org.apache.directory.shared.ldap.model.message

Examples of org.apache.directory.shared.ldap.model.message.Control


            .getSearchResultDone();
        Map<String, Control> controls = searchResultDone.getControls();

        assertEquals( 2, searchResultDone.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.789" );

        assertNotNull( control );
        assertFalse( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
        assertEquals( "Some other text", Strings.utf8ToString( ( byte[] ) ( ( DsmlControl<?> ) control ).getValue() ) );
    }
View Full Code Here


                .getSearchResultDone();
        Map<String, Control> controls = searchResultDone.getControls();

        assertEquals( 3, searchResultDone.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.456" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
        assertFalse( ( ( DsmlControl<?> ) control ).hasValue() );
    }
View Full Code Here

        // after a change operation
        boolean changeTypeSeen = false;

        ChangeType operation = ChangeType.Add;
        String lowerLine;
        Control control;

        while ( iter.hasNext() )
        {
            // Each line could start either with an OID, an attribute type, with
            // "control:" or with "changetype:"
View Full Code Here

        if ( !( o instanceof Control ) )
        {
            return false;
        }

        Control otherControl = ( Control ) o;

        if ( !oid.equalsIgnoreCase( otherControl.getOid() ) )
        {
            return false;
        }

        return criticality == otherControl.isCritical();
    }
View Full Code Here

        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
        assertTrue( entry.isChangeDelete() );

        // Check the control
        Control control = entry.getControl( "1.2.840.113556.1.4.805" );

        assertEquals( "1.2.840.113556.1.4.805", control.getOid() );
        assertTrue( control.isCritical() );
    }
View Full Code Here

        assertEquals( "ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
        assertTrue( entry.isChangeDelete() );

        // Check the control
        Control control = entry.getControl( "1.2.840.113556.1.4.805" );

        assertEquals( "1.2.840.113556.1.4.805", control.getOid() );
        assertFalse( control.isCritical() );
    }
View Full Code Here

        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = extendedResponse.getControls();

        assertEquals( 1, extendedResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.643" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
        assertEquals( "Some text", Strings.utf8ToString((byte[]) ( ( DsmlControl<?> ) control ).getValue()) );
    }
View Full Code Here

        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = extendedResponse.getControls();

        assertEquals( 1, extendedResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.643" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
        assertFalse( ( ( DsmlControl<?> ) control ).hasValue() );
    }
View Full Code Here

        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = extendedResponse.getControls();

        assertEquals( 2, extendedResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.789" );

        assertNotNull( control );
        assertFalse( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ( ( DsmlControl<?> ) control ).getValue()) );
    }
View Full Code Here

        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
        Map<String, Control> controls = extendedResponse.getControls();

        assertEquals( 3, extendedResponse.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.456" );

        assertNotNull( control );
        assertTrue( control.isCritical() );
        assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
        assertFalse( ( ( DsmlControl<?> ) control ).hasValue() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.message.Control

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.