public DestinationsConfig()

in util/src/main/java/com/google/cloud/healthcare/imaging/dicomadapter/DestinationsConfig.java [40:56]


  public DestinationsConfig(String jsonInline, String jsonPath) throws IOException {
    JSONArray jsonArray = JsonUtil.parseConfig(jsonInline, jsonPath, ENV_DESTINATION_CONFIG_JSON);

    if(jsonArray != null) {
      for (Object elem : jsonArray) {
        JSONObject elemJson = (JSONObject) elem;
        String filter = elemJson.getString("filter");
        if(map.containsKey(filter)){
          throw new IllegalArgumentException("Duplicate filter in Destinations config. Use --send_to_all_matching_destinations for multiple destination filtering mode.");
        }

        map.put(filter, elemJson.getString("dicomweb_destination"));
      }
    }

    log.info("DestinationsConfig map = {}", map);
  }