directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1423287 [3/3] - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/ core-api/src/main/java/org/apache/directory/server/core/api/filtering/ core-api/src/test/java/org/apache/directory/server/core/api/ ...
Date Tue, 18 Dec 2012 06:29:05 GMT
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
Tue Dec 18 06:28:48 2012
@@ -20,6 +20,7 @@
 package org.apache.directory.server.xdbm.search.cursor;
 
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -30,7 +31,9 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -95,7 +98,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         cursorIndex = 0;
@@ -105,7 +111,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         cursorIndex = cursors.size() - 1;
@@ -115,7 +124,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
 
@@ -123,7 +135,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
 
@@ -144,7 +159,7 @@ public class OrCursor<V> extends Abstrac
      * @param indexEntry the index entry to blacklist
      * @throws Exception if there are problems accessing underlying db
      */
-    private void blackListIfDuplicate( IndexEntry<?, String> indexEntry ) throws Exception
+    private void blackListIfDuplicate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         for ( int ii = 0; ii < evaluators.size(); ii++ )
         {
@@ -161,7 +176,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         while ( cursors.get( cursorIndex ).previous() )
         {
@@ -204,7 +222,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         while ( cursors.get( cursorIndex ).next() )
         {
@@ -249,7 +270,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public IndexEntry<V, String> get() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public IndexEntry<V, String> get() throws CursorException, IOException
     {
         checkNotClosed( "get()" );
 
@@ -262,7 +286,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public void close() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void close()
     {
         if ( IS_DEBUG )
         {
@@ -278,7 +305,10 @@ public class OrCursor<V> extends Abstrac
     }
 
 
-    public void close( Exception cause ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void close( Exception cause )
     {
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
Tue Dec 18 06:28:48 2012
@@ -20,13 +20,17 @@
 package org.apache.directory.server.xdbm.search.cursor;
 
 
+import java.io.IOException;
+
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.AbstractIndexCursor;
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.evaluator.PresenceEvaluator;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -103,7 +107,7 @@ public class PresenceCursor extends Abst
     /**
      * {@inheritDoc}
      */
-    public void before( IndexEntry<String, String> element ) throws Exception
+    public void before( IndexEntry<String, String> element ) throws LdapException,
CursorException, IOException
     {
         checkNotClosed( "before()" );
 
@@ -121,7 +125,7 @@ public class PresenceCursor extends Abst
     /**
      * {@inheritDoc}
      */
-    public void after( IndexEntry<String, String> element ) throws Exception
+    public void after( IndexEntry<String, String> element ) throws LdapException, CursorException,
IOException
     {
         checkNotClosed( "after()" );
 
@@ -136,7 +140,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
 
@@ -152,7 +159,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
 
@@ -167,7 +177,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first()" );
         if ( presenceCursor != null )
@@ -180,7 +193,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last()" );
 
@@ -195,7 +211,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -219,7 +238,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 
@@ -245,7 +267,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public IndexEntry<String, String> get() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public IndexEntry<String, String> get() throws CursorException, IOException
     {
         checkNotClosed( "get()" );
 
@@ -280,7 +305,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public void close() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void close()
     {
         if ( IS_DEBUG )
         {
@@ -300,7 +328,10 @@ public class PresenceCursor extends Abst
     }
 
 
-    public void close( Exception cause ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void close( Exception cause )
     {
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
Tue Dec 18 06:28:48 2012
@@ -20,6 +20,8 @@
 package org.apache.directory.server.xdbm.search.cursor;
 
 
+import java.io.IOException;
+
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.AbstractIndexCursor;
 import org.apache.directory.server.xdbm.Index;
@@ -27,8 +29,10 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.evaluator.SubstringEvaluator;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -97,7 +101,10 @@ public class SubstringCursor extends Abs
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         if ( evaluator.getExpression().getInitial() != null && hasIndex )
@@ -124,7 +131,10 @@ public class SubstringCursor extends Abs
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
 
@@ -136,14 +146,17 @@ public class SubstringCursor extends Abs
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
         return next();
     }
 
 
-    private boolean evaluateCandidate( IndexEntry<String, String> indexEntry ) throws
Exception
+    private boolean evaluateCandidate( IndexEntry<String, String> indexEntry ) throws
LdapException
     {
         if ( hasIndex )
         {
@@ -157,14 +170,21 @@ public class SubstringCursor extends Abs
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
+        
         return previous();
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         while ( wrapped.previous() )
         {
@@ -186,7 +206,10 @@ public class SubstringCursor extends Abs
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         while ( wrapped.next() )
         {
@@ -209,7 +232,10 @@ public class SubstringCursor extends Abs
     }
 
 
-    public IndexEntry<String, String> get() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public IndexEntry<String, String> get() throws CursorException, IOException
     {
         checkNotClosed( "get()" );
 
@@ -225,7 +251,7 @@ public class SubstringCursor extends Abs
     /**
      * {@inheritDoc}
      */
-    public void close() throws Exception
+    public void close()
     {
         if ( IS_DEBUG )
         {
@@ -241,7 +267,7 @@ public class SubstringCursor extends Abs
     /**
      * {@inheritDoc}
      */
-    public void close( Exception cause ) throws Exception
+    public void close( Exception cause )
     {
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -28,6 +28,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.server.xdbm.search.impl.ScanCountComparator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.AndNode;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 
@@ -102,7 +103,7 @@ public class AndEvaluator implements Eva
     /**
      * {@inheritDoc}
      */
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         for ( Evaluator<?> evaluator : evaluators )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
@@ -90,7 +91,7 @@ public class ApproximateEvaluator<T> ext
     /**
      * {@inheritDoc}
      */
-    public boolean evaluate( Entry entry ) throws Exception
+    public boolean evaluate( Entry entry ) throws LdapException
     {
         // get the attribute
         Attribute attr = entry.get( attributeType );
@@ -132,7 +133,7 @@ public class ApproximateEvaluator<T> ext
     /**
      * {@inheritDoc}
      */
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         Entry entry = indexEntry.getEntry();
 
@@ -156,7 +157,7 @@ public class ApproximateEvaluator<T> ext
 
     // TODO - determine if comparator and index entry should have the Value
     // wrapper or the raw normalized value
-    private boolean evaluate( Attribute attribute ) throws Exception
+    private boolean evaluate( Attribute attribute ) throws LdapException
     {
         /*
          * Cycle through the attribute values testing normalized version

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.EqualityNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
@@ -86,7 +87,7 @@ public class EqualityEvaluator<T> extend
     }
 
 
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         Entry entry = indexEntry.getEntry();
 
@@ -108,7 +109,7 @@ public class EqualityEvaluator<T> extend
     }
 
 
-    public boolean evaluate( Entry entry ) throws Exception
+    public boolean evaluate( Entry entry ) throws LdapException
     {
         // get the attribute
         Attribute attr = entry.get( attributeType );
@@ -149,7 +150,7 @@ public class EqualityEvaluator<T> extend
 
     // TODO - determine if comparator and index entry should have the Value
     // wrapper or the raw normalized value
-    private boolean evaluate( Attribute attribute ) throws Exception
+    private boolean evaluate( Attribute attribute ) throws LdapException
     {
         /*
          * Cycle through the attribute values testing normalized version

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.GreaterEqNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
@@ -87,7 +88,7 @@ public class GreaterEqEvaluator<T> exten
     }
 
 
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         if ( idx != null && idx.isDupsEnabled() )
         {
@@ -199,7 +200,7 @@ public class GreaterEqEvaluator<T> exten
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value 
     private boolean evaluate( IndexEntry<Object, String> indexEntry, Attribute attribute
)
-        throws Exception
+        throws LdapException
     {
         /*
          * Cycle through the attribute values testing normalized version

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.LessEqNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
@@ -87,7 +88,7 @@ public class LessEqEvaluator<T> extends 
     }
 
 
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         Entry entry = indexEntry.getEntry();
 
@@ -183,10 +184,10 @@ public class LessEqEvaluator<T> extends 
     }
 
 
-    // TODO - determine if comaparator and index entry should have the Value
+    // TODO - determine if comparator and index entry should have the Value
     // wrapper or the raw normalized value
     private boolean evaluate( IndexEntry<Object, String> indexEntry, Attribute attribute
)
-        throws Exception
+        throws LdapException
     {
         /*
          * Cycle through the attribute values testing normalized version

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -23,6 +23,7 @@ package org.apache.directory.server.xdbm
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.NotNode;
 
@@ -54,7 +55,7 @@ public class NotEvaluator implements Eva
     }
 
 
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         return !childEvaluator.evaluate( indexEntry );
     }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -26,6 +26,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ScopeNode;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 
@@ -96,7 +97,7 @@ public class OneLevelScopeEvaluator<E> i
      * @throws Exception if db lookups fail
      * @see org.apache.directory.server.xdbm.search.Evaluator#evaluate(IndexEntry)
      */
-    public boolean evaluate( IndexEntry<?, String> candidate ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> candidate ) throws LdapException
     {
         ParentIdAndRdn parent = db.getRdnIndex().reverseLookup( candidate.getId() );
         boolean isChild = parent.getParentId().equals( baseId );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -28,6 +28,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.server.xdbm.search.impl.ScanCountComparator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.OrNode;
 
@@ -77,7 +78,7 @@ public class OrEvaluator implements Eval
     }
 
 
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         for ( Evaluator<?> evaluator : evaluators )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PassThroughEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PassThroughEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PassThroughEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PassThroughEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -24,6 +24,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.UndefinedNode;
 
 
@@ -51,7 +52,7 @@ public class PassThroughEvaluator implem
     /**
      * {@inheritDoc}
      */
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         Entry entry = indexEntry.getEntry();
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.PresenceNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -91,7 +92,7 @@ public class PresenceEvaluator implement
 
     // TODO - determine if comparator and index entry should have the Value
     // wrapper or the raw normalized value
-    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntry ) throws LdapException
     {
         Entry entry = indexEntry.getEntry();
 
@@ -115,7 +116,7 @@ public class PresenceEvaluator implement
 
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value
-    public boolean evaluate( Entry entry ) throws Exception
+    public boolean evaluate( Entry entry ) throws LdapException
     {
         if ( db.hasSystemIndexOn( attributeType )
             || ( attributeType.getOid().equals( SchemaConstants.ENTRY_UUID_AT_OID ) ) )

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -30,6 +30,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.SubstringNode;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
@@ -123,7 +124,7 @@ public class SubstringEvaluator implemen
 
 
     @SuppressWarnings("unchecked")
-    public boolean evaluate( IndexEntry<?, String> indexEntryQM ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> indexEntryQM ) throws LdapException
     {
         IndexEntry<String, String> indexEntry = ( IndexEntry<String, String>
) indexEntryQM;
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
Tue Dec 18 06:28:48 2012
@@ -27,6 +27,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.ScopeNode;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 
@@ -119,7 +120,7 @@ public class SubtreeScopeEvaluator imple
      * the parentIdAndRdn up to the baseId. If we terminate on the context entry without

      * having found the baseId, then the candidate is not a descendant.
      */
-    private boolean isDescendant( String candidateId ) throws Exception
+    private boolean isDescendant( String candidateId ) throws LdapException
     {
         String tmp = candidateId;
 
@@ -157,7 +158,7 @@ public class SubtreeScopeEvaluator imple
      * @throws Exception if the index lookups fail.
      * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
      */
-    public boolean evaluate( IndexEntry<?, String> candidate ) throws Exception
+    public boolean evaluate( IndexEntry<?, String> candidate ) throws LdapException
     {
         String id = candidate.getId();
 

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java
Tue Dec 18 06:28:48 2012
@@ -90,7 +90,7 @@ public class AbstractIndexCursorTest
     }
 
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test(expected = CursorClosedException.class)
     public void testCheckNotClosedIfClosedWithCustomException() throws Exception
     {
         indexCursor.close( new IllegalArgumentException() );



Mime
View raw message