use of org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_QUALITY_PROFILE in project sonarqube by SonarSource.
the class ExportAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction("export").setSince("5.2").setDescription("Export a quality profile.").setResponseExample(getClass().getResource("export-example.xml")).setHandler(this);
action.createParam(PARAM_QUALITY_PROFILE).setDescription("Quality profile name to export. If left empty, the default profile for the language is exported.").setExampleValue("My Sonar way");
action.createParam(PARAM_LANGUAGE).setDescription("Quality profile language").setRequired(true).setExampleValue(LanguageParamUtils.getExampleValue(languages)).setPossibleValues(LanguageParamUtils.getOrderedLanguageKeys(languages));
Set<String> exporterKeys = Arrays.stream(languages.all()).map(language -> exporters.exportersForLanguage(language.getKey())).flatMap(Collection::stream).map(ProfileExporter::getKey).collect(MoreCollectors.toSet());
if (!exporterKeys.isEmpty()) {
action.createParam(PARAM_EXPORTER_KEY).setDescription("Output format. If left empty, the same format as api/qualityprofiles/backup is used. " + "Possible values are described by api/qualityprofiles/exporters.").setPossibleValues(exporterKeys);
}
}
Aggregations