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

Examples of org.apache.directory.shared.ldap.codec.search.SearchResultReference


        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

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

        Control control = searchResultReference.getCurrentControl();

        assertTrue( control.getCriticality() );

        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
View Full Code Here


        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

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

        Control control = searchResultReference.getCurrentControl();

        assertTrue( control.getCriticality() );

        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

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

        Control control = searchResultReference.getCurrentControl();

        assertFalse( control.getCriticality() );

        assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

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

        Control control = searchResultReference.getCurrentControl();

        assertTrue( control.getCriticality() );

        assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

        assertEquals( 456, searchResultReference.getMessageId() );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

        List references = searchResultReference.getSearchResultReferences();

        assertEquals( 1, references.size() );

        try
        {
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

        List references = searchResultReference.getSearchResultReferences();

        assertEquals( 0, references.size() );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
            .getCurrentResponse() ).getCurrentSearchResultReference();

        List references = searchResultReference.getSearchResultReferences();

        assertEquals( 2, references.size() );

        try
        {
View Full Code Here

                    SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( sre );
                    searchResponseDsml.addResponse( searchResultEntryDsml );
                }
                else if ( LdapConstants.SEARCH_RESULT_REFERENCE == response.getMessageType() )
                {
                    SearchResultReference srr = response.getSearchResultReference();
                    copyMessageIdAndControls( response, srr );

                    SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml( srr );
                    searchResponseDsml.addResponse( searchResultReferenceDsml );
                }
View Full Code Here

     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
     */
    public Element toDsml( Element root )
    {
        Element element = root.addElement( "searchResultReference" );
        SearchResultReference searchResultReference = ( SearchResultReference ) instance;

        // Adding References
        List<LdapURL> refsList = searchResultReference.getSearchResultReferences();
        for ( int i = 0; i < refsList.size(); i++ )
        {
            element.addElement( "ref" ).addText( refsList.get( i ).toString() );
        }

View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.codec.search.SearchResultReference

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.