Search in sources :

Example 1 with RemoveProjectRequest

use of org.sonarqube.ws.client.qualityprofile.RemoveProjectRequest in project sonarqube by SonarSource.

the class RemoveProjectAction method handle.

@Override
public void handle(Request request, Response response) throws Exception {
    RemoveProjectRequest removeProjectRequest = toWsRequest(request);
    try (DbSession dbSession = dbClient.openSession(false)) {
        String profileKey = projectAssociationFinder.getProfileKey(removeProjectRequest.getLanguage(), removeProjectRequest.getProfileName(), removeProjectRequest.getProfileKey());
        ComponentDto project = projectAssociationFinder.getProject(dbSession, removeProjectRequest.getProjectKey(), removeProjectRequest.getProjectUuid());
        profileProjectOperations.removeProject(dbSession, profileKey, project);
    }
    response.noContent();
}
Also used : DbSession(org.sonar.db.DbSession) RemoveProjectRequest(org.sonarqube.ws.client.qualityprofile.RemoveProjectRequest) ComponentDto(org.sonar.db.component.ComponentDto)

Aggregations

DbSession (org.sonar.db.DbSession)1 ComponentDto (org.sonar.db.component.ComponentDto)1 RemoveProjectRequest (org.sonarqube.ws.client.qualityprofile.RemoveProjectRequest)1