private JSONObject getJsonObject(String response) {
    if (response == null || response.isEmpty()) {
      return null;
    }
    JSONObject jsonObject = (JSONObject) JSONValue.parse(response);

    if (jsonObject.get("status") != null && (Long)jsonObject.get("status") >= 400L) {
      // Throw exception if HTTP status is not OK
      String message;
      if (jsonObject.containsKey("message")) {
        message = (String) jsonObject.get("message");
      } else {
        message = "without message";
      }
      throw new ServiceFormattedException("Proxy: Server returned error " + jsonObject.get("status") + " " +
          message + ". Check Capacity-Scheduler instance properties.");
    }
    return jsonObject;
  }
Checks if the user is an operator.

@return    if <code>true</code>, the user is an operator; otherwise <code>false</code>
contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java