use of com.sequenceiq.environment.api.v1.platformresource.model.AccessConfigResponseComparator in project cloudbreak by hortonworks.
the class CloudAccessConfigsToPlatformAccessConfigsV1ResponseConverter method convert.
public PlatformAccessConfigsResponse convert(CloudAccessConfigs source) {
PlatformAccessConfigsResponse platformAccessConfigsResponse = new PlatformAccessConfigsResponse();
List<AccessConfigResponse> result = new ArrayList<>();
for (CloudAccessConfig entry : source.getCloudAccessConfigs()) {
AccessConfigResponse actual = new AccessConfigResponse(entry.getName(), entry.getId(), entry.getProperties());
result.add(actual);
}
result.sort(new AccessConfigResponseComparator());
platformAccessConfigsResponse.setAccessConfigs(result);
return platformAccessConfigsResponse;
}
Aggregations