use of org.eclipse.sw360.datahandler.thrift.SW360Exception in project sw360portal by sw360.
the class ComponentHelper method makeRowsWithReleases.
private SubTable makeRowsWithReleases(Component component) throws SW360Exception {
List<Release> releases = getReleases(component);
SubTable table = new SubTable();
if (releases.size() > 0) {
for (Release release : releases) {
List<String> currentRow = makeRowForComponent(component);
currentRow.addAll(releaseHelper.makeRows(release).elements.get(0));
table.addRow(currentRow);
}
} else {
List<String> componentRowWithEmptyReleaseFields = makeRowForComponent(component);
for (int i = 0; i < releaseHelper.getColumns(); i++) {
componentRowWithEmptyReleaseFields.add("");
}
table.addRow(componentRowWithEmptyReleaseFields);
}
return table;
}
Aggregations