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
  • Enum Constant Details

    • 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 Details

    • values

      public static SearchScope[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - 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:
    • 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 class Enum<SearchScope>