Commit 6f6e4dd2 authored by Sunil Kumar's avatar Sunil Kumar
Browse files

Added subordinateSubtree LDAP scope in jldap

parent ff4d05bc
...@@ -93,6 +93,14 @@ public class LDAPConnection implements Cloneable ...@@ -93,6 +93,14 @@ public class LDAPConnection implements Cloneable
*<p>SCOPE_ONE = 2</p> *<p>SCOPE_ONE = 2</p>
*/ */
public static final int SCOPE_SUB = 2; public static final int SCOPE_SUB = 2;
/**
* Used with search to specify that the scope of entries to search is to
* search the subordinate subtree object and all entries within it.
*
*<p>SCOPE_SUBORDINATESUBTREE = 4</p>
*/
public static final int SCOPE_SUBORDINATESUBTREE = 4;
/** /**
* Used with search instead of an attribute list to indicate that no * Used with search instead of an attribute list to indicate that no
......
...@@ -281,6 +281,7 @@ public class LDAPSearchRequest extends LDAPMessage { ...@@ -281,6 +281,7 @@ public class LDAPSearchRequest extends LDAPMessage {
* @see com.novell.ldap.LDAPConnection#SCOPE_BASE * @see com.novell.ldap.LDAPConnection#SCOPE_BASE
* @see com.novell.ldap.LDAPConnection#SCOPE_ONE * @see com.novell.ldap.LDAPConnection#SCOPE_ONE
* @see com.novell.ldap.LDAPConnection#SCOPE_SUB * @see com.novell.ldap.LDAPConnection#SCOPE_SUB
* * @see com.novell.ldap.LDAPConnection#SCOPE_SUBORDINATESUBTREE
*/ */
public int getScope() public int getScope()
{ {
......
...@@ -749,7 +749,10 @@ public class LDAPUrl implements java.lang.Cloneable,Externalizable ...@@ -749,7 +749,10 @@ public class LDAPUrl implements java.lang.Cloneable,Externalizable
} else } else
if( scopeStr.equalsIgnoreCase("sub")) { if( scopeStr.equalsIgnoreCase("sub")) {
scope = LDAPConnection.SCOPE_SUB; scope = LDAPConnection.SCOPE_SUB;
} else { } else
if( scopeStr.equalsIgnoreCase("subordinateSubtree")) {
scope = LDAPConnection.SCOPE_SUBORDINATESUBTREE;
}else {
throw new MalformedURLException("LDAPUrl: URL invalid scope"); throw new MalformedURLException("LDAPUrl: URL invalid scope");
} }
......
...@@ -830,6 +830,8 @@ private ArrayList errors = new ArrayList(); ...@@ -830,6 +830,8 @@ private ArrayList errors = new ArrayList();
scope = LDAPConnection.SCOPE_ONE; scope = LDAPConnection.SCOPE_ONE;
} else if (temp.equals("wholeSubtree")) { } else if (temp.equals("wholeSubtree")) {
scope = LDAPConnection.SCOPE_SUB; scope = LDAPConnection.SCOPE_SUB;
} else if (temp.equals("subordinateSubtree")) {
scope = LDAPConnection.SCOPE_SUBORDINATESUBTREE;
} else { } else {
throw new SAXException( throw new SAXException(
"Invalid value for attribute 'scope', " + temp); "Invalid value for attribute 'scope', " + temp);
......
...@@ -62,7 +62,18 @@ public class LDAPConnection implements Cloneable ...@@ -62,7 +62,18 @@ public class LDAPConnection implements Cloneable
*/ */
public static final int SCOPE_SUB = public static final int SCOPE_SUB =
com.novell.ldap.LDAPConnection.SCOPE_SUB; com.novell.ldap.LDAPConnection.SCOPE_SUB;
/**
* Used with search to specify that the scope of entrys to search is to
* search the subordinate subtree object and all entries within it.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#SCOPE_SUBORDINATESUBTREE">
com.novell.ldap.LDAPConnection.SCOPE_SUBORDINATESUBTREE</a>
*/
public static final int SCOPE_SUBORDINATESUBTREE =
com.novell.ldap.LDAPConnection.SCOPE_SUBORDINATESUBTREE;
/** /**
* Used with search instead of an attribute list to indicate that no * Used with search instead of an attribute list to indicate that no
* attributes are to be returned. * attributes are to be returned.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment