directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1368974 - in /directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search: SearchEngine.java impl/DefaultSearchEngine.java
Date Fri, 03 Aug 2012 14:16:50 GMT
Author: gokturk
Date: Fri Aug  3 14:16:50 2012
New Revision: 1368974

URL: http://svn.apache.org/viewvc?rev=1368974&view=rev
Log:
* Added a new forwarding cursor() method which takes SearchScope rather than SearchControls.

SearchControls is from javax.naming and only used for retrieving its searchScope parameter.

Modified:
    directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
    directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java

Modified: directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java?rev=1368974&r1=1368973&r2=1368974&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
(original)
+++ directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
Fri Aug  3 14:16:50 2012
@@ -25,6 +25,7 @@ import java.util.UUID;
 import org.apache.directory.shared.ldap.model.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.server.core.api.partition.index.IndexCursor;
 
@@ -89,6 +90,20 @@ public interface SearchEngine
 
 
     /**
+     * Conducts a search on a database.
+     * 
+     * @param base the search base
+     * @param aliasDerefMode the alias dereferencing mode to use
+     * @param filter the search filter AST root
+     * @param searchScope scope of the search
+     * @return enumeration over SearchResults
+     * @throws Exception if the search fails
+     */
+    IndexCursor<UUID> cursor( Dn base, AliasDerefMode aliasDerefMode, ExprNode filter,
+        SearchScope searchScope ) throws Exception;
+
+
+    /**
      * Builds an Evaluator for a filter expression.
      * 
      * @param filter the filter root AST node

Modified: directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=1368974&r1=1368973&r2=1368974&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
(original)
+++ directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
Fri Aug  3 14:16:50 2012
@@ -215,6 +215,17 @@ public class DefaultSearchEngine impleme
 
 
     /**
+     * @see SearchEngine#cursor(Dn, AliasDerefMode, ExprNode, SearchScope)
+     */
+    public IndexCursor<UUID> cursor( Dn base, AliasDerefMode aliasDerefMode, ExprNode
filter,
+        SearchScope searchScope ) throws Exception
+    {
+        return cursor( base, aliasDerefMode, filter,
+            new SearchControls( searchScope.ordinal(), 0, 0, null, false, false ) );
+    }
+
+
+    /**
      * @see SearchEngine#evaluator(ExprNode)
      */
     public Evaluator<? extends ExprNode> evaluator( ExprNode filter ) throws Exception



Mime
View raw message