]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7970 SONAR-7986 SONAR-7968 SONAR-7969 api/settings WS should be internal
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 31 Aug 2016 08:25:01 +0000 (10:25 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 31 Aug 2016 08:39:45 +0000 (10:39 +0200)
server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java
server/sonar-server/src/main/java/org/sonar/server/setting/ws/ResetAction.java
server/sonar-server/src/main/java/org/sonar/server/setting/ws/SetAction.java
server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java
server/sonar-server/src/test/java/org/sonar/server/setting/ws/ListDefinitionsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/setting/ws/ResetActionTest.java
server/sonar-server/src/test/java/org/sonar/server/setting/ws/SetActionTest.java
server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java

index 56ba6df717aaf429897ff38d359ca56f9eb6aa84..b542ef4540c2a45cbbf5d6ba461f5b6548de5681 100644 (file)
@@ -73,6 +73,7 @@ public class ListDefinitionsAction implements SettingsWsAction {
         "</ul>", PARAM_COMPONENT_ID, PARAM_COMPONENT_KEY))
       .setResponseExample(getClass().getResource("list_definitions-example.json"))
       .setSince("6.1")
+      .setInternal(true)
       .setHandler(this);
     addComponentParameters(action);
   }
index 7f588b24c264c267f1ef1187f690b72fc18376e6..87dda71655a95408214a5ec6e5751ade5bb40ecd 100644 (file)
@@ -68,6 +68,7 @@ public class ResetAction implements SettingsWsAction {
         "<li>'Administer' rights on the specified component</li>" +
         "</ul>", PARAM_COMPONENT_ID, PARAM_COMPONENT_KEY)
       .setSince("6.1")
+      .setInternal(true)
       .setPost(true)
       .setHandler(this);
 
index 9c0762a28db210b5b1a2fe95083bb624fcadfa16..2d6024c4bd47820c54667b4e2b5a8d24799eb980 100644 (file)
@@ -104,6 +104,7 @@ public class SetAction implements SettingsWsAction {
         PARAM_VALUE, PARAM_VALUES,
         PARAM_COMPONENT_ID, PARAM_COMPONENT_KEY)
       .setSince("6.1")
+      .setInternal(true)
       .setPost(true)
       .setHandler(this);
 
index 50d645315a0b804359e0768f6d38081e8af24b8f..4b6bc9b824c8a72d0b396756975fe680fece32cd 100644 (file)
@@ -89,6 +89,7 @@ public class ValuesAction implements SettingsWsAction {
         "</ul>", PARAM_COMPONENT_ID, PARAM_COMPONENT_KEY)
       .setResponseExample(getClass().getResource("values-example.json"))
       .setSince("6.1")
+      .setInternal(true)
       .setHandler(this);
     addComponentParameters(action);
     action.createParam(PARAM_KEYS)
index c1bfd55fda47cd66d65e78f9c838a40674f3b9b6..5182de8666e67585cd5f6f67b39339fa04b2ff9e 100644 (file)
@@ -349,7 +349,7 @@ public class ListDefinitionsActionTest {
   public void test_ws_definition() {
     WebService.Action action = ws.getDef();
     assertThat(action).isNotNull();
-    assertThat(action.isInternal()).isFalse();
+    assertThat(action.isInternal()).isTrue();
     assertThat(action.isPost()).isFalse();
     assertThat(action.responseExampleAsString()).isNotEmpty();
     assertThat(action.params()).hasSize(2);
index 70a1e4f29c21dc90d0a5bc41341fb066ec329597..76f7b9c7ac525c9f29f62c26d52f32c447f55b3d 100644 (file)
@@ -180,7 +180,7 @@ public class ResetActionTest {
   public void test_ws_definition() {
     WebService.Action action = ws.getDef();
     assertThat(action).isNotNull();
-    assertThat(action.isInternal()).isFalse();
+    assertThat(action.isInternal()).isTrue();
     assertThat(action.isPost()).isTrue();
     assertThat(action.responseExampleAsString()).isNull();
     assertThat(action.params()).hasSize(3);
index 22217d4559817b111c94b47a78c32f8e969dbb6d..857ee0bae17ba4e20b88c16652922b38276f943f 100644 (file)
@@ -595,6 +595,7 @@ public class SetActionTest {
 
     assertThat(definition.key()).isEqualTo("set");
     assertThat(definition.isPost()).isTrue();
+    assertThat(definition.isInternal()).isTrue();
     assertThat(definition.since()).isEqualTo("6.1");
     assertThat(definition.params()).extracting(Param::key)
       .containsOnly("key", "value", "values", "fieldValues", "componentId", "componentKey");
index 323b007c72acfef8fe38252cd62a5adedfa36900..6db8874796d880e4e864d5c6cb7520da5f0b3e5b 100644 (file)
@@ -538,7 +538,7 @@ public class ValuesActionTest {
   public void test_ws_definition() {
     WebService.Action action = ws.getDef();
     assertThat(action).isNotNull();
-    assertThat(action.isInternal()).isFalse();
+    assertThat(action.isInternal()).isTrue();
     assertThat(action.isPost()).isFalse();
     assertThat(action.responseExampleAsString()).isNotEmpty();
     assertThat(action.params()).hasSize(3);