code: private int getSearchScope(LdapSearchScope scope) {
          if (scope == LdapSearchScope.ONE_LEVEL) {
              return SearchControls.ONELEVEL_SCOPE;
          } else {
              return SearchControls.SUBTREE_SCOPE;
          }
      }
docs: Convert the {@link LdapSearchScope} setting to the JNDI {@link SearchControls} equivalent.
  
  @param scope The {@link LdapIdentityStore} to convert to the JNDI equivalent.
  @return The JNDI {@link SearchControls} search scope.