Examples of ScopeNode


Examples of org.apache.directory.shared.ldap.model.filter.ScopeNode


    @Test(expected = InvalidCursorPositionException.class)
    public void testInvalidCursorPositionException() throws Exception
    {
        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new Dn( SchemaConstants.OU_AT_OID
            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
        SubtreeScopeEvaluator<Entry, Long> evaluator = new SubtreeScopeEvaluator<Entry, Long>( store, node );
        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
        cursor.get();
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.filter.ScopeNode


    @Test(expected = UnsupportedOperationException.class)
    public void testUnsupportBeforeWithoutIndex() throws Exception
    {
        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new Dn( SchemaConstants.OU_AT_OID
            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
        SubtreeScopeEvaluator<Entry, Long> evaluator = new SubtreeScopeEvaluator<Entry, Long>( store, node );
        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );

        // test before()
View Full Code Here

Examples of org.apache.ldap.common.filter.ScopeNode

     * @throws NamingException if any system indices fail
     * @see org.apache.ldap.server.db.Enumerator#enumerate(ExprNode)
     */
    public NamingEnumeration enumerate( ExprNode node ) throws NamingException
    {
        final ScopeNode snode = ( ScopeNode ) node;
        final BigInteger id = db.getEntryId( snode.getBaseDn() );

        switch( snode.getScope() )
        {
        case( SearchControls.OBJECT_SCOPE ):
            final IndexRecord record = new IndexRecord();
            record.setEntryId( id );
            record.setIndexKey( snode.getBaseDn() );
            return new SingletonEnumeration( record );
        case( SearchControls.ONELEVEL_SCOPE ):
            return enumerateChildren( snode.getBaseDn(),
                snode.getDerefAliases().derefInSearching() );
        case( SearchControls.SUBTREE_SCOPE ):
            return enumerateDescendants( snode );
        default:
            throw new NamingException( "Unrecognized search scope!" );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.