org.apache.directory.server.xdbm.search.impl
Class SubtreeScopeEvaluator<E,ID extends Comparable<ID>>

java.lang.Object
  extended by org.apache.directory.server.xdbm.search.impl.SubtreeScopeEvaluator<E,ID>
All Implemented Interfaces:
Evaluator<org.apache.directory.shared.ldap.model.filter.ScopeNode,E,ID>

public class SubtreeScopeEvaluator<E,ID extends Comparable<ID>>
extends Object
implements Evaluator<org.apache.directory.shared.ldap.model.filter.ScopeNode,E,ID>

Evaluates ScopeNode assertions with subtree scope on candidates using an entry database.

Author:
Apache Directory Project

Constructor Summary
SubtreeScopeEvaluator(Store<E,ID> db, org.apache.directory.shared.ldap.model.filter.ScopeNode node)
          Creates a subtree scope node evaluator for search expressions.
 
Method Summary
 boolean evaluate(IndexEntry<?,ID> candidate)
          Asserts whether or not a candidate has sub level scope while taking alias dereferencing into account.
 boolean evaluateEntry(E candidate)
          Asserts whether or not a candidate has sub level scope while taking alias dereferencing into account.
 ID getBaseId()
           
 org.apache.directory.shared.ldap.model.filter.ScopeNode getExpression()
          Gets the expression used by this expression Evaluator.
 boolean isDereferencing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtreeScopeEvaluator

public SubtreeScopeEvaluator(Store<E,ID> db,
                             org.apache.directory.shared.ldap.model.filter.ScopeNode node)
                      throws Exception
Creates a subtree scope node evaluator for search expressions.

Parameters:
node - the scope node
db - the database used to evaluate scope node
Throws:
Exception - on db access failure
Method Detail

evaluate

public boolean evaluate(IndexEntry<?,ID> candidate)
                 throws Exception
Asserts whether or not a candidate has sub level scope while taking alias dereferencing into account.

Specified by:
evaluate in interface Evaluator<org.apache.directory.shared.ldap.model.filter.ScopeNode,E,ID extends Comparable<ID>>
Parameters:
candidate - the entry tested to see if it is in subtree scope
Returns:
true if the candidate is within one level scope whether or not alias dereferencing is enabled.
Throws:
Exception - if the index lookups fail.
See Also:
Evaluator.evaluate(org.apache.directory.server.xdbm.IndexEntry)

evaluateEntry

public boolean evaluateEntry(E candidate)
                      throws Exception
Asserts whether or not a candidate has sub level scope while taking alias dereferencing into account.

Specified by:
evaluateEntry in interface Evaluator<org.apache.directory.shared.ldap.model.filter.ScopeNode,E,ID extends Comparable<ID>>
Parameters:
candidate - the entry tested to see if it is in subtree scope
Returns:
true if the candidate is within one level scope whether or not alias dereferencing is enabled.
Throws:
Exception - if the index lookups fail.
See Also:
Evaluator.evaluate(org.apache.directory.server.xdbm.IndexEntry)

getExpression

public org.apache.directory.shared.ldap.model.filter.ScopeNode getExpression()
Description copied from interface: Evaluator
Gets the expression used by this expression Evaluator.

Specified by:
getExpression in interface Evaluator<org.apache.directory.shared.ldap.model.filter.ScopeNode,E,ID extends Comparable<ID>>
Returns:
the AST for the expression

getBaseId

public ID getBaseId()

isDereferencing

public boolean isDereferencing()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.