Package org.apache.directory.ldap.client.api.message

Examples of org.apache.directory.ldap.client.api.message.SearchResultEntry


        Cursor<SearchResponse> cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE,
            "*" );
        while ( cursor.next() )
        {
            SearchResponse sr = cursor.get();
            SearchResultEntry sre = ( SearchResultEntry ) sr;
        }

        cursor.close();

        long t3 = System.currentTimeMillis();
View Full Code Here


    /**
     * Convert a SearchResultEntryCodec to a SearchResultEntry message
     */
    private SearchResultEntry convert( SearchResultEntryCodec searchEntryResultCodec )
    {
        SearchResultEntry searchResultEntry = new SearchResultEntry();

        searchResultEntry.setMessageId( searchEntryResultCodec.getMessageId() );
        searchResultEntry.setEntry( searchEntryResultCodec.getEntry() );
        addControls( searchEntryResultCodec, searchResultEntry );

        return searchResultEntry;
    }
View Full Code Here

                // Store the response into the responseQueue
                SearchResultEntryCodec searchResultEntryCodec = (SearchResultEntryCodec)response;
                searchResultEntryCodec.setMessageId( messageId );
                searchResultEntryCodec.addControl( response.getCurrentControl() );

                SearchResultEntry srchEntry = convert( searchResultEntryCodec );

                searchFuture = (SearchFuture)responseFuture;
               
                if ( searchFuture == null )
                {
View Full Code Here

                {
                    SearchResponse searchResp = cursor.get();

                    if ( searchResp instanceof SearchResultEntry )
                    {
                        SearchResultEntry searchResult = ( SearchResultEntry ) searchResp;
                        deleteRecursive( searchResult.getEntry().getDn(), cursorMap, listener );
                    }
                }
                while ( cursor.next() );

                cursorMap.remove( dn );
View Full Code Here

        Cursor<SearchResponse> cursor = null;
        try
        {
            cursor = search( "", "(objectClass=*)", SearchScope.OBJECT, "*", "+" );
            cursor.next();
            SearchResultEntry searchRes = ( SearchResultEntry ) cursor.get();

            rootDSE = searchRes.getEntry();
        }
        catch ( Exception e )
        {
            String msg = "Failed to fetch the RootDSE";
            LOG.error( msg );
View Full Code Here

    {
        createUser( "billyd", "billyd" );
       
        DN userName = new DN( "uid=billyd,ou=users,ou=system" );
        LdapConnection connection = getConnectionAs( userName, "billyd" );
        SearchResultEntry entry = ( SearchResultEntry ) connection.lookup( "ou=system" );
        assertNull( entry );
    }
View Full Code Here

            + "grantsAndDenials { grantBrowse } } } } }" );
       
        DN userName = new DN( "uid=billyd,ou=users,ou=system" );
       
        LdapConnection connection = getConnectionAs( userName, "billyd" );
        SearchResultEntry entry = ( SearchResultEntry ) connection.lookup( "ou=system" );
        assertNull( entry );
    }
View Full Code Here

        entry.add( SchemaConstants.ENTRY_CSN_AT, csn.toString() );
       
        con.add( entry );

        // Analyze entry and description attribute
        SearchResultEntry resp = ( SearchResultEntry ) con.lookup( dn, "*", "+" );
        Entry addedEntry = resp.getEntry();
        assertNotNull( addedEntry );

        EntryAttribute attr = addedEntry.get( SchemaConstants.ENTRY_UUID_AT );
        assertNotNull( attr );
       
View Full Code Here

    }
   
   
    boolean canReadAdministrators( LdapConnection connection ) throws Exception
    {
        SearchResultEntry res = ( SearchResultEntry ) connection.lookup( "cn=Administrators,ou=groups,ou=system" );
       
        if( res == null )
        {
            return false;
        }
View Full Code Here

    }


    private void assertNotPresent( LdapConnection connection, String dn ) throws LdapException
    {
        SearchResultEntry se = ( SearchResultEntry ) connection.lookup( dn );
        assertNull( se );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldap.client.api.message.SearchResultEntry

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.