Enum SearchScope

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