From 87944ee88ce027a9115ed536b8ff9762c0872bf8 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 04 Apr 2013 14:33:30 +0000
Subject: [PATCH] OPENDJ-832 Leverage the work queue for processing requests received on the HTTP connection handler
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/SearchScope.java | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/SearchScope.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/SearchScope.java
index 8f84ec4..60b89bf 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/SearchScope.java
+++ b/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.
--
Gitblit v1.10.0