use of org.wso2.carbon.apimgt.rest.api.publisher.dto.API_endpointDTO in project carbon-apimgt by wso2.
the class MappingUtil method fromEndpointToList.
private static List<API_endpointDTO> fromEndpointToList(Map<String, Endpoint> endpoint) throws IOException {
List<API_endpointDTO> endpointDTOs = new ArrayList<>();
if (endpoint != null) {
for (Map.Entry<String, Endpoint> entry : endpoint.entrySet()) {
API_endpointDTO endpointDTO = new API_endpointDTO();
if (APIMgtConstants.API_SPECIFIC_ENDPOINT.equals(entry.getValue().getApplicableLevel())) {
endpointDTO.setInline(toEndPointDTO(entry.getValue()));
} else {
endpointDTO.setKey(entry.getValue().getId());
}
endpointDTO.setType(entry.getKey());
endpointDTOs.add(endpointDTO);
}
}
return endpointDTOs;
}
Aggregations