mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
04.33.2013 87944ee88ce027a9115ed536b8ff9762c0872bf8
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/SearchScope.java
@@ -22,8 +22,8 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2013 ForgeRock AS
 */
package org.forgerock.opendj.ldap;
import java.util.Arrays;
@@ -88,6 +88,26 @@
    }
    /**
     * Returns the search scope having the specified name as defined in RFC 4511
     * section 4.5.1.2.
     *
     * @param name
     *          the name of the search scope to return
     * @return The search scope, or {@code null} if there was no search scope
     *         associated with {@code name}.
     * @throws NullPointerException
     *           if name is null
     */
    public static SearchScope valueOf(String name) {
        for (SearchScope searchScope : ELEMENTS) {
            if (searchScope.name.equals(name)) {
                return searchScope;
            }
        }
        return null;
    }
    /**
     * Returns an unmodifiable list containing the set of available search
     * scopes indexed on their integer value as defined in RFC 4511 section
     * 4.5.1.2.