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 2010/02/24 14:32:41 UTC

svn commit: r915784 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: filter/SearchScope.java trigger/StoredProcedureSearchContextOption.java

Author: elecharny
Date: Wed Feb 24 13:32:41 2010
New Revision: 915784

URL: http://svn.apache.org/viewvc?rev=915784&view=rev
Log:
o Removed the SearchScope class from trigger package
o Reflected the change on all the code
o Modified the SearchScope enum not to use any reference to jndi SearchControls

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SearchScope.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SearchScope.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SearchScope.java?rev=915784&r1=915783&r2=915784&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SearchScope.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SearchScope.java Wed Feb 24 13:32:41 2010
@@ -36,12 +36,8 @@
     SUBTREE( 2, "sub" );
     
     /** 
-     * The corresponding JNDI scope constant value as defined in 
-     * SearchControls.
-     * 
-     * @see SearchScope#OBJECT
-     * @see SearchScope#ONELEVEL
-     * @see SearchScope#SUBTREE
+     * The corresponding LDAP scope constant value as defined in 
+     * RFC 4511
      */ 
     private final int scope;
     
@@ -56,9 +52,9 @@
 
     /**
      * Creates a new instance of SearchScope based on the respective 
-     * SearchControls scope constant.
+     * scope constant.
      *
-     * @param scope the JNDI scope constant
+     * @param scope the scope constant
      * @param ldapUrlValue LDAP URL scope string value: base, one, or sub
      */
     private SearchScope( int scope, String ldapUrlValue )
@@ -81,8 +77,8 @@
     
 
     /**
-     * Gets the corresponding JNDI scope constant value as defined in 
-     * SearchControls.
+     * Gets the corresponding scope constant value as defined in 
+     * RFC 4511.
      * 
      * @return the scope
      */
@@ -107,10 +103,10 @@
     
     /**
      * Gets the SearchScope enumerated type for the corresponding 
-     * JNDI numeric value.
+     * scope numeric value.
      *
-     * @param jndiScope the JNDI numeric value to get SearchScope for
-     * @return the SearchScope enumerated type for JNDI numeric value
+     * @param scope the numeric value to get SearchScope for
+     * @return the SearchScope enumerated type for the scope numeric value
      */
     public static SearchScope getSearchScope( int scope )
     {
@@ -157,4 +153,13 @@
             throw new IllegalArgumentException( I18n.err( I18n.ERR_04161, ldapUrlValue ) );
         }
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return ldapUrlValue;
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java?rev=915784&r1=915783&r2=915784&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java Wed Feb 24 13:32:41 2010
@@ -22,6 +22,8 @@
 
 import javax.naming.Name;
 
+import org.apache.directory.shared.ldap.filter.SearchScope;
+
 
 /**
  * 
@@ -38,7 +40,7 @@
     public StoredProcedureSearchContextOption( Name baseObject )
     {
         // the default search scope is "base"
-        this( baseObject, SearchScope.BASE );
+        this( baseObject, SearchScope.OBJECT );
     }
     
     public StoredProcedureSearchContextOption( Name baseObject, SearchScope searchScope )