Enum SearchScope
- java.lang.Object
-
- java.lang.Enum<SearchScope>
-
- org.apache.directory.api.ldap.model.message.SearchScope
-
- All Implemented Interfaces:
Serializable
,Comparable<SearchScope>
public enum SearchScope extends Enum<SearchScope>
A search scope enumerated type.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLdapUrlValue()
Gets the LDAP URL value for the scope: according to RFC 2255 this is either base, one, or sub.int
getScope()
Gets the corresponding scope constant value as defined in RFC 4511.SearchScope
getScope(String scope)
Gets the SearchScope associated with a scope Stringstatic SearchScope
getSearchScope(int scope)
Gets the SearchScope enumerated type for the corresponding scope numeric value.static int
getSearchScope(String scope)
Gets the SearchScope enumerated type for the corresponding scope value of either base, one or sub.String
toString()
static SearchScope
valueOf(String name)
Returns the enum constant of this type with the specified name.static SearchScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OBJECT
public static final SearchScope OBJECT
Base scope
-
ONELEVEL
public static final SearchScope ONELEVEL
One Level scope
-
SUBTREE
public static final SearchScope SUBTREE
Subtree scope
-
-
Method Detail
-
values
public static SearchScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SearchScope c : SearchScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SearchScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getLdapUrlValue
public String getLdapUrlValue()
Gets the LDAP URL value for the scope: according to RFC 2255 this is either base, one, or sub.- Returns:
- the LDAP URL value
- See Also:
- RFC 2255
-
getScope
public int getScope()
Gets the corresponding scope constant value as defined in RFC 4511.- Returns:
- the scope
-
getSearchScope
public static SearchScope getSearchScope(int scope)
Gets the SearchScope enumerated type for the corresponding scope numeric value.- Parameters:
scope
- the numeric value to get SearchScope for- Returns:
- the SearchScope enumerated type for the scope numeric value
-
getScope
public SearchScope getScope(String scope)
Gets the SearchScope associated with a scope String- Parameters:
scope
- The scope we are looking for- Returns:
- the scope
-
getSearchScope
public static int getSearchScope(String scope)
Gets the SearchScope enumerated type for the corresponding scope value of either base, one or sub.- Parameters:
scope
- the scope value to get SearchScope for- Returns:
- the SearchScope enumerated type for the LDAP URL scope value
-
toString
public String toString()
- Overrides:
toString
in classEnum<SearchScope>
-
-