diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-05-19 17:41:47 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-05-20 15:24:09 +0200 |
commit | 3051f394a266a47b73e3265a33fa4952f64734dc (patch) | |
tree | 590aa70d8c6f34b82a2ca4fcd82dd7fd7d246c42 /server/sonar-ws-client/src | |
parent | 85a1196d667ddb1a9f39c4455ed2625b5170386a (diff) | |
download | sonarqube-3051f394a266a47b73e3265a33fa4952f64734dc.tar.gz sonarqube-3051f394a266a47b73e3265a33fa4952f64734dc.zip |
remove the api/projects/destroy WS - SONAR-6531
Diffstat (limited to 'server/sonar-ws-client/src')
2 files changed, 0 insertions, 83 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ProjectDeleteQuery.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ProjectDeleteQuery.java deleted file mode 100644 index 287fec55535..00000000000 --- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ProjectDeleteQuery.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.wsclient.services; - -/** - * @since 2.11 - */ -public final class ProjectDeleteQuery extends DeleteQuery { - - private String key; - private static final String BASE_URL = "/api/projects/"; - - private ProjectDeleteQuery(String key) { - this.key = key; - } - - public String getKey() { - return key; - } - - @Override - public String getUrl() { - StringBuilder url = new StringBuilder(); - url.append(BASE_URL); - url.append(encode(key)); - return url.toString(); - } - - public static ProjectDeleteQuery create(String projectKeyOrId) { - return new ProjectDeleteQuery(projectKeyOrId); - } -} diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ProjectDeleteQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ProjectDeleteQueryTest.java deleted file mode 100644 index 0fd85abbe10..00000000000 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ProjectDeleteQueryTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.wsclient.services; - -import org.junit.Test; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; - -public class ProjectDeleteQueryTest extends QueryTestCase { - - @Test - public void testUrl() { - ProjectDeleteQuery query = ProjectDeleteQuery.create("my:project"); - assertThat(query.getUrl(), is("/api/projects/my%3Aproject")); - } - -} |