private static int convertSearchScope(String searchScopeStr){
  Integer scopeValueI=DEFAULT_SEARCH_CTL_SCOPE;
  if (searchScopeStr == null) {
    _log.debug("Search scope not provided.  Using default one level");
  }
 else {
    scopeValueI=SEARCH_CTL_SCOPES.get(searchScopeStr);
    if (scopeValueI == null) {
      _log.debug("Could not convert search scope parameter value {}",searchScopeStr);
    }
    _log.debug("Provided search scope is: {}",searchScopeStr);
  }
  _log.debug("Search scope to be used is: {}",scopeValueI);
  return scopeValueI == null ? DEFAULT_SEARCH_CTL_SCOPE : scopeValueI;
}

private static int convertSearchScope ( String searchScopeStr ) { Integer scopeValueI = DEFAULT_SEARCH_CTL_SCOPE ; if ( searchScopeStr == null ) { _log . debug ( "Search scope not provided.  Using default one level" ) ; } else { scopeValueI = SEARCH_CTL_SCOPES . get ( searchScopeStr ) ; if ( scopeValueI == null ) { _log . debug ( "Could not convert search scope parameter value {}" , searchScopeStr ) ; } _log . debug ( "Provided search scope is: {}" , searchScopeStr ) ; } _log . debug ( "Search scope to be used is: {}" , scopeValueI ) ; return scopeValueI == null ? DEFAULT_SEARCH_CTL_SCOPE : scopeValueI ; }
converts a search scope string into the int value to be used in the ldap search control . handles defaulting and bad values .
