+ @Value.Immutable
+ @Gson.TypeAdapters
+ interface RicInfo {
+ public String name();
+
+ public Collection<String> nodeNames();
+
+ public Collection<String> policyTypes();
+ }
+
+ @Override
+ public ResponseEntity<Collection<String>> getRicsSupportingType(String typeName) {
+ String url = baseUrl() + "/rics?policyType={typeName}";
+ Map<String, ?> uriVariables = Map.of("typeName", typeName);
+ String rsp = this.restTemplate.getForObject(url, String.class, uriVariables);
+
+ Type listType = new TypeToken<List<ImmutableRicInfo>>() {}.getType();
+ List<RicInfo> rspParsed = gson.fromJson(rsp, listType);
+
+ Collection<String> result = new Vector<>(rspParsed.size());
+ for (RicInfo ric : rspParsed) {
+ result.add(ric.name());
+ }
+ return new ResponseEntity<>(result, HttpStatus.OK);
+ }
+