Search in sources :

Example 1 with SetRequest

use of org.sonarqube.ws.client.setting.SetRequest in project sonarqube by SonarSource.

the class WebhooksTest method setProperty.

private void setProperty(@Nullable String componentKey, String key, @Nullable String value) {
    if (value == null) {
        ResetRequest req = ResetRequest.builder().setKeys(key).setComponent(componentKey).build();
        adminWs.settingsService().reset(req);
    } else {
        SetRequest req = SetRequest.builder().setKey(key).setValue(value).setComponent(componentKey).build();
        adminWs.settingsService().set(req);
    }
}
Also used : SetRequest(org.sonarqube.ws.client.setting.SetRequest) ResetRequest(org.sonarqube.ws.client.setting.ResetRequest)

Aggregations

ResetRequest (org.sonarqube.ws.client.setting.ResetRequest)1 SetRequest (org.sonarqube.ws.client.setting.SetRequest)1