]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17620 removed import and export of portfolios
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>
Wed, 12 Apr 2023 12:12:30 +0000 (14:12 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 12 Apr 2023 20:03:18 +0000 (20:03 +0000)
server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java
sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java

index 610447c331158d78010d35c1ec27fd4be781833a..1c68509234062108d26b9f534f1f44e82aa0d9f9 100644 (file)
@@ -290,6 +290,11 @@ public class ComponentDbTester {
     return insertComponentAndPortfolio(ComponentTesting.newPortfolio().setPrivate(true), true, dtoPopulator, portfolioPopulator);
   }
 
+  public final ComponentDto insertSubportfolio(ComponentDto parentPortfolio) {
+    ComponentDto subPortfolioComponent = ComponentTesting.newSubPortfolio(parentPortfolio);
+    return insertComponentAndPortfolio(subPortfolioComponent, true, defaults(), sp -> sp.setParentUuid(sp.getRootUuid()));
+  }
+
   public void addPortfolioReference(String portfolioUuid, String... referencerUuids) {
     for (String uuid : referencerUuids) {
       dbClient.portfolioDao().addReference(dbSession, portfolioUuid, uuid);
index eb74613c6542e761e3a42afd490ce90ff6c6980f..10ee26b1a3e35424e26870d7a59fbdc8be31483c 100644 (file)
@@ -136,39 +136,6 @@ public class ViewsService extends BaseService {
       ).content();
   }
 
-  /**
-   *
-   * This is part of the internal API.
-   * This is a POST request.
-   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/define">Further information about this action online (including a response example)</a>
-   * @since 1.0
-   * @deprecated since 9.2
-   */
-  @Deprecated
-  public void define(DefineRequest request) {
-    call(
-      new PostRequest(path("define"))
-        .setParam("def", request.getDef())
-        .setMediaType(MediaTypes.JSON)
-      ).content();
-  }
-
-  /**
-   *
-   * This is part of the internal API.
-   * This is a GET request.
-   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/definition">Further information about this action online (including a response example)</a>
-   * @since 2.0
-   * @deprecated since 9.2
-   */
-  @Deprecated
-  public String definition() {
-    return call(
-      new GetRequest(path("definition"))
-        .setMediaType(MediaTypes.JSON)
-      ).content();
-  }
-
   /**
    *
    * This is part of the internal API.
@@ -473,4 +440,5 @@ public class ViewsService extends BaseService {
         .setMediaType(MediaTypes.JSON)
       ).content();
   }
+
 }