use of org.eclipse.winery.repository.rest.resources.apiData.InterfacesSelectApiData in project winery by eclipse.
the class InterfacesResource method onGet.
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public List<?> onGet(@QueryParam("selectData") String selectData) {
if (selectData == null) {
return this.interfaces;
}
List<InterfacesSelectApiData> list = new ArrayList<>();
for (TInterface item : this.interfaces) {
List<String> ops = new ArrayList<>();
for (TOperation op : item.getOperation()) {
ops.add(op.getName());
}
list.add(new InterfacesSelectApiData(item.getName(), ops));
}
return list;
}
Aggregations