private String asc;
private String availableSince;
private String compareToProfile;
+ private List<String> cwe;
private List<String> inheritance;
private String isTemplate;
private List<String> languages;
private String organization;
+ private List<String> owaspTop10;
private String q;
private String qprofile;
private List<String> repositories;
private String ruleKey;
private String s;
+ private List<String> sansTop25;
private List<String> severities;
+ private List<String> sonarsourceSecurity;
private List<String> statuses;
private List<String> tags;
private String targetKey;
return compareToProfile;
}
+ /**
+ * Example value: "12,125,unknown"
+ */
+ public ActivateRulesRequest setCwe(List<String> cwe) {
+ this.cwe = cwe;
+ return this;
+ }
+
+ public List<String> getCwe() {
+ return cwe;
+ }
+
/**
* Example value: "INHERITED,OVERRIDES"
* Possible values:
return organization;
}
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"a1"</li>
+ * <li>"a2"</li>
+ * <li>"a3"</li>
+ * <li>"a4"</li>
+ * <li>"a5"</li>
+ * <li>"a6"</li>
+ * <li>"a7"</li>
+ * <li>"a8"</li>
+ * <li>"a9"</li>
+ * <li>"a10"</li>
+ * </ul>
+ */
+ public ActivateRulesRequest setOwaspTop10(List<String> owaspTop10) {
+ this.owaspTop10 = owaspTop10;
+ return this;
+ }
+
+ public List<String> getOwaspTop10() {
+ return owaspTop10;
+ }
+
/**
* Example value: "xpath"
*/
return s;
}
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"insecure-interaction"</li>
+ * <li>"risky-resource"</li>
+ * <li>"porous-defenses"</li>
+ * </ul>
+ */
+ public ActivateRulesRequest setSansTop25(List<String> sansTop25) {
+ this.sansTop25 = sansTop25;
+ return this;
+ }
+
+ public List<String> getSansTop25() {
+ return sansTop25;
+ }
+
/**
* Example value: "CRITICAL,BLOCKER"
* Possible values:
return severities;
}
+ /**
+ * Example value: "sql-injection,command-injection,others"
+ * Possible values:
+ * <ul>
+ * <li>"sql-injection"</li>
+ * <li>"command-injection"</li>
+ * <li>"path-traversal-injection"</li>
+ * <li>"ldap-injection"</li>
+ * <li>"xpath-injection"</li>
+ * <li>"rce"</li>
+ * <li>"dos"</li>
+ * <li>"ssrf"</li>
+ * <li>"csrf"</li>
+ * <li>"xss"</li>
+ * <li>"log-injection"</li>
+ * <li>"http-response-splitting"</li>
+ * <li>"open-redirect"</li>
+ * <li>"xxe"</li>
+ * <li>"object-injection"</li>
+ * <li>"weak-cryptography"</li>
+ * <li>"auth"</li>
+ * <li>"insecure-conf"</li>
+ * <li>"file-manipulation"</li>
+ * <li>"others"</li>
+ * </ul>
+ */
+ public ActivateRulesRequest setSonarsourceSecurity(List<String> sonarsourceSecurity) {
+ this.sonarsourceSecurity = sonarsourceSecurity;
+ return this;
+ }
+
+ public List<String> getSonarsourceSecurity() {
+ return sonarsourceSecurity;
+ }
+
/**
* Example value: "READY"
* Possible values:
* <li>"CODE_SMELL"</li>
* <li>"BUG"</li>
* <li>"VULNERABILITY"</li>
+ * <li>"SECURITY_HOTSPOT"</li>
* </ul>
*/
public ActivateRulesRequest setTypes(List<String> types) {
private String asc;
private String availableSince;
private String compareToProfile;
+ private List<String> cwe;
private List<String> inheritance;
private String isTemplate;
private List<String> languages;
private String organization;
+ private List<String> owaspTop10;
private String q;
private String qprofile;
private List<String> repositories;
private String ruleKey;
private String s;
+ private List<String> sansTop25;
private List<String> severities;
+ private List<String> sonarsourceSecurity;
private List<String> statuses;
private List<String> tags;
private String targetKey;
return compareToProfile;
}
+ /**
+ * Example value: "12,125,unknown"
+ */
+ public DeactivateRulesRequest setCwe(List<String> cwe) {
+ this.cwe = cwe;
+ return this;
+ }
+
+ public List<String> getCwe() {
+ return cwe;
+ }
+
/**
* Example value: "INHERITED,OVERRIDES"
* Possible values:
return organization;
}
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"a1"</li>
+ * <li>"a2"</li>
+ * <li>"a3"</li>
+ * <li>"a4"</li>
+ * <li>"a5"</li>
+ * <li>"a6"</li>
+ * <li>"a7"</li>
+ * <li>"a8"</li>
+ * <li>"a9"</li>
+ * <li>"a10"</li>
+ * </ul>
+ */
+ public DeactivateRulesRequest setOwaspTop10(List<String> owaspTop10) {
+ this.owaspTop10 = owaspTop10;
+ return this;
+ }
+
+ public List<String> getOwaspTop10() {
+ return owaspTop10;
+ }
+
/**
* Example value: "xpath"
*/
return s;
}
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"insecure-interaction"</li>
+ * <li>"risky-resource"</li>
+ * <li>"porous-defenses"</li>
+ * </ul>
+ */
+ public DeactivateRulesRequest setSansTop25(List<String> sansTop25) {
+ this.sansTop25 = sansTop25;
+ return this;
+ }
+
+ public List<String> getSansTop25() {
+ return sansTop25;
+ }
+
/**
* Example value: "CRITICAL,BLOCKER"
* Possible values:
return severities;
}
+ /**
+ * Example value: "sql-injection,command-injection,others"
+ * Possible values:
+ * <ul>
+ * <li>"sql-injection"</li>
+ * <li>"command-injection"</li>
+ * <li>"path-traversal-injection"</li>
+ * <li>"ldap-injection"</li>
+ * <li>"xpath-injection"</li>
+ * <li>"rce"</li>
+ * <li>"dos"</li>
+ * <li>"ssrf"</li>
+ * <li>"csrf"</li>
+ * <li>"xss"</li>
+ * <li>"log-injection"</li>
+ * <li>"http-response-splitting"</li>
+ * <li>"open-redirect"</li>
+ * <li>"xxe"</li>
+ * <li>"object-injection"</li>
+ * <li>"weak-cryptography"</li>
+ * <li>"auth"</li>
+ * <li>"insecure-conf"</li>
+ * <li>"file-manipulation"</li>
+ * <li>"others"</li>
+ * </ul>
+ */
+ public DeactivateRulesRequest setSonarsourceSecurity(List<String> sonarsourceSecurity) {
+ this.sonarsourceSecurity = sonarsourceSecurity;
+ return this;
+ }
+
+ public List<String> getSonarsourceSecurity() {
+ return sonarsourceSecurity;
+ }
+
/**
* Example value: "READY"
* Possible values:
* <li>"CODE_SMELL"</li>
* <li>"BUG"</li>
* <li>"VULNERABILITY"</li>
+ * <li>"SECURITY_HOTSPOT"</li>
* </ul>
*/
public DeactivateRulesRequest setTypes(List<String> types) {
import java.util.stream.Collectors;
import javax.annotation.Generated;
import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.WsConnector;
+import org.sonarqube.ws.Qualityprofiles;
import org.sonarqube.ws.Qualityprofiles.CopyWsResponse;
import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
-import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse;
-import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
/**
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles">Further information about this web service online</a>
.setParam("rule", request.getRule())
.setParam("severity", request.getSeverity())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("asc", request.getAsc())
.setParam("available_since", request.getAvailableSince())
.setParam("compareToProfile", request.getCompareToProfile())
+ .setParam("cwe", request.getCwe() == null ? null : request.getCwe().stream().collect(Collectors.joining(",")))
.setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
.setParam("is_template", request.getIsTemplate())
.setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
.setParam("organization", request.getOrganization())
+ .setParam("owaspTop10", request.getOwaspTop10() == null ? null : request.getOwaspTop10().stream().collect(Collectors.joining(",")))
.setParam("q", request.getQ())
.setParam("qprofile", request.getQprofile())
.setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
.setParam("rule_key", request.getRuleKey())
.setParam("s", request.getS())
+ .setParam("sansTop25", request.getSansTop25() == null ? null : request.getSansTop25().stream().collect(Collectors.joining(",")))
.setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+ .setParam("sonarsourceSecurity", request.getSonarsourceSecurity() == null ? null : request.getSonarsourceSecurity().stream().collect(Collectors.joining(",")))
.setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
.setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
.setParam("targetKey", request.getTargetKey())
.setParam("template_key", request.getTemplateKey())
.setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public void addProject(AddProjectRequest request) {
call(
new PostRequest(path("add_project"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("project", request.getProject())
- .setParam("projectUuid", request.getProjectUuid())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public String backup(BackupRequest request) {
return call(
new GetRequest(path("backup"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public void changeParent(ChangeParentRequest request) {
call(
new PostRequest(path("change_parent"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
- .setParam("parentKey", request.getParentKey())
.setParam("parentQualityProfile", request.getParentQualityProfile())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public String changelog(ChangelogRequest request) {
return call(
new GetRequest(path("changelog"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("p", request.getP())
.setParam("since", request.getSince())
.setParam("to", request.getTo())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("leftKey", request.getLeftKey())
.setParam("rightKey", request.getRightKey())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("key", request.getKey())
.setParam("rule", request.getRule())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("asc", request.getAsc())
.setParam("available_since", request.getAvailableSince())
.setParam("compareToProfile", request.getCompareToProfile())
+ .setParam("cwe", request.getCwe() == null ? null : request.getCwe().stream().collect(Collectors.joining(",")))
.setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
.setParam("is_template", request.getIsTemplate())
.setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
.setParam("organization", request.getOrganization())
+ .setParam("owaspTop10", request.getOwaspTop10() == null ? null : request.getOwaspTop10().stream().collect(Collectors.joining(",")))
.setParam("q", request.getQ())
.setParam("qprofile", request.getQprofile())
.setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
.setParam("rule_key", request.getRuleKey())
.setParam("s", request.getS())
+ .setParam("sansTop25", request.getSansTop25() == null ? null : request.getSansTop25().stream().collect(Collectors.joining(",")))
.setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+ .setParam("sonarsourceSecurity", request.getSonarsourceSecurity() == null ? null : request.getSonarsourceSecurity().stream().collect(Collectors.joining(",")))
.setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
.setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
.setParam("targetKey", request.getTargetKey())
.setParam("template_key", request.getTemplateKey())
.setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public void delete(DeleteRequest request) {
call(
new PostRequest(path("delete"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public String export(ExportRequest request) {
return call(
new GetRequest(path("export"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
return call(
new GetRequest(path("exporters"))
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
return call(
new GetRequest(path("importers"))
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/inheritance">Further information about this action online (including a response example)</a>
* @since 5.2
*/
- public InheritanceWsResponse inheritance(InheritanceRequest request) {
+ public Qualityprofiles.InheritanceWsResponse inheritance(InheritanceRequest request) {
return call(
new GetRequest(path("inheritance"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile()),
- InheritanceWsResponse.parser());
+ Qualityprofiles.InheritanceWsResponse.parser());
}
/**
.setParam("q", request.getQ())
.setParam("selected", request.getSelected())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public void removeProject(RemoveProjectRequest request) {
call(
new PostRequest(path("remove_project"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("project", request.getProject())
- .setParam("projectUuid", request.getProjectUuid())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("key", request.getKey())
.setParam("name", request.getName())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
.setParam("backup", request.getBackup())
.setParam("organization", request.getOrganization())
.setMediaType(MediaTypes.JSON)
- ).content();
- }
-
- /**
- *
- * This is part of the internal API.
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/restore_built_in">Further information about this action online (including a response example)</a>
- * @since 4.4
- * @deprecated since 6.4
- */
- @Deprecated
- public void restoreBuiltIn() {
- call(
- new PostRequest(path("restore_built_in"))
- .setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
public void setDefault(SetDefaultRequest request) {
call(
new PostRequest(path("set_default"))
- .setParam("key", request.getKey())
.setParam("language", request.getLanguage())
.setParam("organization", request.getOrganization())
.setParam("qualityProfile", request.getQualityProfile())
.setMediaType(MediaTypes.JSON)
- ).content();
+ ).content();
}
/**
* This is a GET request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/show">Further information about this action online (including a response example)</a>
* @since 6.5
+ * @return
*/
public ShowResponse show(ShowRequest request) {
return call(