You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/07/04 19:20:48 UTC
svn commit: r1142744 - in /directory/apacheds/trunk:
xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/
xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/
xdbm-tools/src/main/java/org/apache/directory/server/c...
Author: elecharny
Date: Mon Jul 4 17:20:47 2011
New Revision: 1142744
URL: http://svn.apache.org/viewvc?rev=1142744&view=rev
Log:
o Removed the unused evaluateId(ID) method
Modified:
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java Mon Jul 4 17:20:47 2011
@@ -20,8 +20,8 @@
package org.apache.directory.server.xdbm.search;
-import org.apache.directory.shared.ldap.model.filter.ExprNode;
import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.shared.ldap.model.filter.ExprNode;
/**
@@ -66,17 +66,6 @@ public interface Evaluator<N extends Exp
/**
- * Evaluates whether or not a candidate, specified by an id, satisfies the
- * expression associated with this Evaluator .
- *
- * @param id the identifier for the candidate entry
- * @return true if filter selects the candidate false otherwise
- * @throws Exception if there are faults during evaluation
- */
- boolean evaluateId( ID id ) throws Exception;
-
-
- /**
* Evaluates whether or not a candidate, satisfies the expression
* associated with this Evaluator .
*
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java Mon Jul 4 17:20:47 2011
@@ -102,20 +102,6 @@ public class AndEvaluator<ID> implements
}
- public boolean evaluateId( ID id ) throws Exception
- {
- for ( Evaluator<?, Entry, ID> evaluator : evaluators )
- {
- if ( !evaluator.evaluateId( id ) )
- {
- return false;
- }
- }
-
- return true;
- }
-
-
public boolean evaluateEntry( Entry entry ) throws Exception
{
for ( Evaluator<?, Entry, ID> evaluator : evaluators )
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java Mon Jul 4 17:20:47 2011
@@ -48,12 +48,6 @@ public class NotEvaluator<ID> implements
}
- public boolean evaluateId( ID id ) throws Exception
- {
- return !childEvaluator.evaluateId( id );
- }
-
-
public boolean evaluateEntry( Entry entry ) throws Exception
{
return !childEvaluator.evaluateEntry( entry );
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java Mon Jul 4 17:20:47 2011
@@ -116,20 +116,6 @@ public class OrEvaluator<ID> implements
}
- public boolean evaluateId( ID id ) throws Exception
- {
- for ( Evaluator<?, Entry, ID> evaluator : evaluators )
- {
- if ( evaluator.evaluateId( id ) )
- {
- return true;
- }
- }
-
- return false;
- }
-
-
public boolean evaluateEntry( Entry entry ) throws Exception
{
for ( Evaluator<?, Entry, ID> evaluator : evaluators )
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java Mon Jul 4 17:20:47 2011
@@ -20,12 +20,12 @@
package org.apache.directory.server.xdbm.search.impl;
-import org.apache.directory.shared.ldap.model.filter.ScopeNode;
-import org.apache.directory.shared.ldap.model.message.SearchScope;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.model.filter.ScopeNode;
+import org.apache.directory.shared.ldap.model.message.SearchScope;
/**
@@ -124,29 +124,15 @@ public class SubtreeScopeEvaluator<E, ID
*/
public boolean evaluate( IndexEntry<?, E, ID> candidate ) throws Exception
{
- return evaluateId( candidate.getId() );
- }
-
-
- /**
- * Asserts whether or not a candidate has sub level scope while taking
- * alias dereferencing into account.
- *
- * @param id the id of the entry tested to see if it is in subtree scope
- * @return true if the candidate is within one level scope whether or not
- * alias dereferencing is enabled.
- * @throws Exception if the index lookups fail.
- * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
- */
- public boolean evaluateId( ID id ) throws Exception
- {
+ ID id = candidate.getId();
+
/*
* This condition catches situations where the candidate is equal to
* the base entry and when the base entry is the context entry. Note
* we do not store a mapping in the subtree index of the context entry
* to all it's subordinates since that would be the entire set of
* entries in the db.
- */
+ */
boolean isDescendant = baseIsContextEntry || baseId.equals( id ) || db.getSubLevelIndex().forward( baseId, id );
/*
Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=1142744&r1=1142743&r2=1142744&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java Mon Jul 4 17:20:47 2011
@@ -103,7 +103,8 @@ public class EntryNode implements TreeNo
if ( db.getChildCount( rec.getId() ) == 0 )
{
Evaluator evaluator = engine.evaluator( exprNode );
- if ( evaluator.evaluateId( rec.getId() ) )
+
+ if ( evaluator.evaluate( rec ) )
{
Entry newEntry = db.lookup( rec.getId() );
EntryNode child = new EntryNode( ( Long ) rec.getId(), this, db, newEntry, map, exprNode,