use of com.sequenceiq.cloudbreak.api.model.imagecatalog.StackRepoDetailsJson 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;
}
use of com.sequenceiq.cloudbreak.api.model.imagecatalog.StackRepoDetailsJson in project cloudbreak by hortonworks.
the class ImagesToImagesResponseJsonConverter method convertStackRepoDetailsToJson.
private StackRepoDetailsJson convertStackRepoDetailsToJson(StackRepoDetails repo) {
StackRepoDetailsJson json = new StackRepoDetailsJson();
json.setStack(new HashMap<>(repo.getStack()));
json.setUtil(new HashMap<>(repo.getUtil()));
if (repo.getKnox() != null && !repo.getKnox().isEmpty()) {
json.setKnox(repo.getKnox());
}
return json;
}
Aggregations