use of org.eclipse.sw360.portal.common.UsedAsLiferayAction in project sw360portal by sw360.
the class ComponentUploadPortlet method updateComponents.
@UsedAsLiferayAction
public void updateComponents(ActionRequest request, ActionResponse response) throws PortletException, IOException, TException {
List<CSVRecord> releaseRecords = getCSVFromRequest(request, "file");
FluentIterable<ComponentCSVRecord> compCSVRecords = convertCSVRecordsToCompCSVRecords(releaseRecords);
log.trace("read records <" + Joiner.on("\n").join(compCSVRecords) + ">");
final ComponentService.Iface componentClient = thriftClients.makeComponentClient();
final VendorService.Iface vendorClient = thriftClients.makeVendorClient();
final AttachmentService.Iface attachmentClient = thriftClients.makeAttachmentClient();
User user = UserCacheHolder.getUserFromRequest(request);
final RequestSummary requestSummary = writeToDatabase(compCSVRecords, componentClient, vendorClient, attachmentClient, user);
renderRequestSummary(request, response, requestSummary);
}
Aggregations