Package org.apache.directory.server.core.filtering

Examples of org.apache.directory.server.core.filtering.BaseEntryFilteringCursor


            AliasDerefMode derefMode = searchContext.getAliasDerefMode();
            ExprNode filter = searchContext.getFilter();

            underlying = searchEngine.cursor( dn, derefMode, filter, searchCtls );

            return new BaseEntryFilteringCursor( new ServerEntryCursorAdaptor<ID>( this, underlying ), searchContext );
        }
        catch ( LdapException le )
        {
            // TODO: SearchEngine.cursor() should only throw LdapException, then the exception handling here can be removed
            throw le;
View Full Code Here


        throws LdapException
    {
        if ( listContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
        {
            // there is nothing under the schema subentry
            return new BaseEntryFilteringCursor( new EmptyCursor<Entry>(), listContext );
        }

        // check if entry to search exists
        //String msg = "Attempt to search under non-existant entry: ";
        //assertHasEntry( listContext, msg, listContext.getDn() );
View Full Code Here

            searchContext.setTypesOnlytypesOnly );

            if ( result )
            {
                Entry emptyEntry = new DefaultEntry( service.getSchemaManager(), Dn.EMPTY_DN );
                return new BaseEntryFilteringCursor( new SingletonCursor<Entry>( emptyEntry ), searchContext );
            }
            else
            {
                return new BaseEntryFilteringCursor( new EmptyCursor<Entry>(), searchContext );
            }
        }
        else
        {
            // It's a Search
View Full Code Here

                {
                    objectClassOid = schemaManager.lookupObjectClassRegistry( objectClass ).getOid();
                }
                else
                {
                    return new BaseEntryFilteringCursor( new EmptyCursor<Entry>(), searchContext );
                }

                AttributeType nodeAt = node.getAttributeType();

                // see if node attribute is objectClass
                if ( nodeAt.equals( OBJECT_CLASS_AT )
                    && ( objectClassOid.equals( SchemaConstants.TOP_OC_OID ) || objectClassOid
                        .equals( SchemaConstants.SUBSCHEMA_OC_OID ) ) && ( node instanceof EqualityNode ) )
                {
                    // call.setBypass( true );
                    Entry serverEntry = SchemaService.getSubschemaEntry( directoryService, searchCtls.getReturningAttributes() );
                    serverEntry.setDn( base );
                    return new BaseEntryFilteringCursor( new SingletonCursor<Entry>( serverEntry ), searchContext );
                }
                else
                {
                    return new BaseEntryFilteringCursor( new EmptyCursor<Entry>(), searchContext );
                }
            }
            else if ( filter instanceof PresenceNode )
            {
                PresenceNode node = ( PresenceNode ) filter;

                // see if node attribute is objectClass
                if ( node.getAttributeType().equals( OBJECT_CLASS_AT ) )
                {
                    // call.setBypass( true );
                    Entry serverEntry = SchemaService.getSubschemaEntry( directoryService, searchCtls.getReturningAttributes() );
                    serverEntry.setDn( base );
                    EntryFilteringCursor cursor = new BaseEntryFilteringCursor(
                        new SingletonCursor<Entry>( serverEntry ), searchContext );
                    return cursor;
                }
            }
        }

        // In any case not handled previously, just return an empty result
        return new BaseEntryFilteringCursor( new EmptyCursor<Entry>(), searchContext );
    }
View Full Code Here


        public EntryFilteringCursor search( SearchOperationContext opContext )
            throws NamingException
        {
            return new BaseEntryFilteringCursor( new BogusCursor( count ), opContext );
        }
View Full Code Here

        }


        public EntryFilteringCursor search( SearchOperationContext opContext, Collection<String> bypass ) throws NamingException
        {
            return new BaseEntryFilteringCursor( new BogusCursor( count ), opContext );
        }
View Full Code Here

        {
        }

        public EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception
        {
            return new BaseEntryFilteringCursor( new BogusCursor( count ), opContext );
        }
View Full Code Here


    public EntryFilteringCursor search( SearchOperationContext opContext )
        throws NamingException
    {
        return new BaseEntryFilteringCursor( new MockCursor( count ), opContext );
    }
View Full Code Here

    }


    public EntryFilteringCursor search( SearchOperationContext opContext, Collection<String> bypass ) throws NamingException
    {
        return new BaseEntryFilteringCursor( new MockCursor( count ), opContext );
    }
View Full Code Here

    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws Exception
    {
        if ( opContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
        {
            // there is nothing under the schema subentry
            return new BaseEntryFilteringCursor( new EmptyCursor<ServerEntry>(), opContext );
        }
       
        // check if entry to search exists
        String msg = "Attempt to search under non-existant entry: ";
        assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.filtering.BaseEntryFilteringCursor

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.