use of com.sequenceiq.cloudbreak.cloud.model.component.StackInfo in project cloudbreak by hortonworks.
the class ImagesToImagesResponseJsonConverter method getDefaultStackInfos.
private List<StackDetailsJson> getDefaultStackInfos(Iterable<? extends StackInfo> defaultStackInfos) {
List<StackDetailsJson> result = new ArrayList<>();
for (StackInfo info : defaultStackInfos) {
StackDetailsJson json = new StackDetailsJson();
StackRepoDetailsJson repoJson = new StackRepoDetailsJson();
Map<String, String> stackRepo = info.getRepo().getStack();
if (stackRepo != null) {
repoJson.setStack(stackRepo);
}
Map<String, String> utilRepo = info.getRepo().getUtil();
if (utilRepo != null) {
repoJson.setUtil(utilRepo);
}
Map<String, String> knoxRepo = info.getRepo().getKnox();
if (knoxRepo != null) {
repoJson.setKnox(knoxRepo);
}
json.setRepo(repoJson);
json.setVersion(info.getVersion());
result.add(json);
}
return result;
}
Aggregations