use of org.sonar.server.qualityprofile.QProfileResult in project sonarqube by SonarSource.
the class CreateAction method doHandle.
private CreateWsResponse doHandle(DbSession dbSession, CreateRequest createRequest, Request request) {
QProfileResult result = new QProfileResult();
QualityProfileDto profile = profileFactory.create(dbSession, QProfileName.createFor(createRequest.getLanguage(), createRequest.getProfileName()));
result.setProfile(profile);
for (ProfileImporter importer : importers) {
String importerKey = importer.getKey();
InputStream contentToImport = request.paramAsInputStream(getBackupParamName(importerKey));
if (contentToImport != null) {
result.add(exporters.importXml(profile, importerKey, contentToImport, dbSession));
}
}
dbSession.commit();
activeRuleIndexer.index(result.getChanges());
return buildResponse(result);
}
Aggregations