Search in sources :

Example 21 with RequestSummary

use of org.eclipse.sw360.datahandler.thrift.RequestSummary in project sw360portal by sw360.

the class CommonUtils method getRequestSummary.

public static RequestSummary getRequestSummary(int total, int failures) {
    final RequestSummary requestSummary = new RequestSummary();
    requestSummary.requestStatus = failures == 0 ? RequestStatus.SUCCESS : RequestStatus.FAILURE;
    requestSummary.setTotalElements(total);
    requestSummary.setTotalAffectedElements(total - failures);
    return requestSummary;
}
Also used : RequestSummary(org.eclipse.sw360.datahandler.thrift.RequestSummary)

Aggregations

RequestSummary (org.eclipse.sw360.datahandler.thrift.RequestSummary)17 User (org.eclipse.sw360.datahandler.thrift.users.User)11 AttachmentContent (org.eclipse.sw360.datahandler.thrift.attachments.AttachmentContent)4 Component (org.eclipse.sw360.datahandler.thrift.components.Component)4 ComponentService (org.eclipse.sw360.datahandler.thrift.components.ComponentService)4 UsedAsLiferayAction (org.eclipse.sw360.portal.common.UsedAsLiferayAction)4 CSVRecord (org.apache.commons.csv.CSVRecord)3 TException (org.apache.thrift.TException)3 AttachmentService (org.eclipse.sw360.datahandler.thrift.attachments.AttachmentService)3 Release (org.eclipse.sw360.datahandler.thrift.components.Release)3 LicenseService (org.eclipse.sw360.datahandler.thrift.licenses.LicenseService)2 DocumentOperationResult (org.ektorp.DocumentOperationResult)2 List (java.util.List)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1 DatabaseConnector (org.eclipse.sw360.datahandler.couchdb.DatabaseConnector)1 DatabaseRepository (org.eclipse.sw360.datahandler.couchdb.DatabaseRepository)1 PermissionUtils (org.eclipse.sw360.datahandler.permissions.PermissionUtils)1 ReleaseRelationship (org.eclipse.sw360.datahandler.thrift.ReleaseRelationship)1 RequestStatus (org.eclipse.sw360.datahandler.thrift.RequestStatus)1