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

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


        List<Entry> actualOrder = new ArrayList<Entry>();

        while ( cursor.next() )
        {
            SearchResultEntry se = ( SearchResultEntry ) cursor.get();
            Entry entry = se.getEntry();
            actualOrder.add( entry );
        }

        cursor.close();
       
        // start deleting from the first entry
        // SHOULD succeeded if the order is as expected
        for( int i = 0; i < actualOrder.size(); i++ )
        {
            con.delete( actualOrder.get( i ).getDn() );
        }
       
        // now insert from the last entry, SHOULD succeed
        for( int i = actualOrder.size() - 1; i >= 0; i-- )
        {
            con.add( actualOrder.get( i ) );
        }
       
        actualOrder.clear();

        sk.setReverseOrder( true );
        cursor = con.search( req );
       
        while ( cursor.next() )
        {
            SearchResultEntry se = ( SearchResultEntry ) cursor.get();
            Entry entry = se.getEntry();
            actualOrder.add( entry );
        }

        // now delete again, this time from the end, SHOULD succeed
        for( int i = actualOrder.size() - 1; i >= 0; i-- )
View Full Code Here


            return respRef;
        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt control is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            return respEntry;
        }
    }
View Full Code Here

        // a SearchResultDone (RefreshOnly mode)
        while ( !( resp instanceof SearchResultDone ) && !sf.isCancelled() && !disconnected )
        {
            if ( resp instanceof SearchResultEntry )
            {
                SearchResultEntry result = ( SearchResultEntry ) resp;

                handleSearchResultEntry( result );
            }
            else if ( resp instanceof SearchResultReference )
            {
View Full Code Here

            return respRef;
        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt control is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            return respEntry;
        }
    }
View Full Code Here

        // a SearchResultDone (RefreshOnly mode)
        while ( !( resp instanceof SearchResultDone ) && !sf.isCancelled() && !disconnected )
        {
            if ( resp instanceof SearchResultEntry )
            {
                SearchResultEntry result = ( SearchResultEntry ) resp;

                handleSearchResultEntry( result );
            }
            else if ( resp instanceof SearchResultReference )
            {
View Full Code Here

            return respRef;
        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt decorator is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            // Filter the userPassword if the server mandate to do so
            if ( session.getCoreSession().getDirectoryService().isPasswordHidden() )
            {
                // Remove the userPassord attribute from the entry.
                respEntry.getEntry().removeAttributes( SchemaConstants.USER_PASSWORD_AT );
            }

            return respEntry;
        }
    }
View Full Code Here

            return respRef;
        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt control is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            return respEntry;
        }
    }
View Full Code Here

     * {@inheritDoc}
     */
    public Response get() throws CursorException, IOException
    {
        Entry entry = wrapped.get();
        SearchResultEntry se = new SearchResultEntryImpl( messageId );
        se.setEntry( entry );

        return se;
    }
View Full Code Here

                break;

            case SEARCH_RESULT_ENTRY:
                // Store the response into the responseQueue
                SearchResultEntry searchResultEntry = ( SearchResultEntry ) response;

                if ( schemaManager != null )
                {
                    searchResultEntry.setEntry( new DefaultEntry( schemaManager, searchResultEntry.getEntry() ) );
                }

                searchFuture = ( SearchFuture ) responseFuture;

                if ( LOG.isDebugEnabled() )
View Full Code Here

                {
                    Response searchResponse = searchResponses.get();

                    if ( searchResponse.getType() == MessageTypeEnum.SEARCH_RESULT_ENTRY )
                    {
                        SearchResultEntry searchResultEntry = ( SearchResultEntry ) searchResponse;

                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml(
                            connection.getCodecService(), searchResultEntry );
                        searchResponseDsml = new SearchResponseDsml( connection.getCodecService(),
                            searchResultEntryDsml );
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.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.