Search in sources :

Example 86 with RequestStatus

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

the class Sw360ProjectService method updateProject.

public RequestStatus updateProject(Project project, User sw360User) throws TException {
    ProjectService.Iface sw360ProjectClient = getThriftProjectClient();
    RequestStatus requestStatus = sw360ProjectClient.updateProject(project, sw360User);
    if (requestStatus != RequestStatus.SUCCESS) {
        throw new RuntimeException("sw360 project with name '" + project.getName() + " cannot be updated.");
    }
    return requestStatus;
}
Also used : ProjectService(org.eclipse.sw360.datahandler.thrift.projects.ProjectService) AddDocumentRequestStatus(org.eclipse.sw360.datahandler.thrift.AddDocumentRequestStatus) RequestStatus(org.eclipse.sw360.datahandler.thrift.RequestStatus)

Aggregations

RequestStatus (org.eclipse.sw360.datahandler.thrift.RequestStatus)52 TException (org.apache.thrift.TException)27 User (org.eclipse.sw360.datahandler.thrift.users.User)24 Test (org.junit.Test)16 Project (org.eclipse.sw360.datahandler.thrift.projects.Project)13 UsedAsLiferayAction (org.eclipse.sw360.portal.common.UsedAsLiferayAction)10 ModerationRequest (org.eclipse.sw360.datahandler.thrift.moderation.ModerationRequest)5 TestUtils.assertTestString (org.eclipse.sw360.datahandler.TestUtils.assertTestString)4 AddDocumentRequestStatus (org.eclipse.sw360.datahandler.thrift.AddDocumentRequestStatus)4 SW360Exception (org.eclipse.sw360.datahandler.thrift.SW360Exception)4 ComponentService (org.eclipse.sw360.datahandler.thrift.components.ComponentService)4 VendorService (org.eclipse.sw360.datahandler.thrift.vendors.VendorService)4 WrappedTException (org.eclipse.sw360.datahandler.common.WrappedException.WrappedTException)3 Release (org.eclipse.sw360.datahandler.thrift.components.Release)3 Vulnerability (org.eclipse.sw360.datahandler.thrift.vulnerabilities.Vulnerability)3 JSONObject (com.liferay.portal.kernel.json.JSONObject)2 PrintWriter (java.io.PrintWriter)2 Attachment (org.eclipse.sw360.datahandler.thrift.attachments.Attachment)2 Component (org.eclipse.sw360.datahandler.thrift.components.Component)2 UpdateType (org.eclipse.sw360.datahandler.thrift.cvesearch.UpdateType)2