aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org/sonar
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-05-15 14:52:25 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-05-15 14:52:35 +0200
commitdcc95840ae5f64cfc50d8bb27ffd3ffdb20496b9 (patch)
treec03bda9923dc3f02990c79548addea8ba3416a01 /sonar-ws-client/src/main/java/org/sonar
parent3d333b6bfd8a75bdb03e72ef761d451500315247 (diff)
downloadsonarqube-dcc95840ae5f64cfc50d8bb27ffd3ffdb20496b9.tar.gz
sonarqube-dcc95840ae5f64cfc50d8bb27ffd3ffdb20496b9.zip
SONAR-5007 drop tables RULE_TAGS and RULES_RULE_TAGS
Diffstat (limited to 'sonar-ws-client/src/main/java/org/sonar')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java9
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleTagClient.java39
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleTagClient.java59
3 files changed, 0 insertions, 107 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java
index 7e06483dcd5..beabf3d0735 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java
@@ -33,9 +33,7 @@ import org.sonar.wsclient.qprofile.internal.DefaultQProfileClient;
import org.sonar.wsclient.qualitygate.QualityGateClient;
import org.sonar.wsclient.qualitygate.internal.DefaultQualityGateClient;
import org.sonar.wsclient.rule.RuleClient;
-import org.sonar.wsclient.rule.RuleTagClient;
import org.sonar.wsclient.rule.internal.DefaultRuleClient;
-import org.sonar.wsclient.rule.internal.DefaultRuleTagClient;
import org.sonar.wsclient.system.SystemClient;
import org.sonar.wsclient.system.internal.DefaultSystemClient;
import org.sonar.wsclient.user.UserClient;
@@ -112,13 +110,6 @@ public class SonarClient {
}
/**
- * New client to interact with web services related to rule tags
- */
- public RuleTagClient ruleTagClient() {
- return new DefaultRuleTagClient(requestFactory);
- }
-
- /**
* New client to interact with web services related to rules
*/
public RuleClient ruleClient() {
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleTagClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleTagClient.java
deleted file mode 100644
index b1d8e93ec3c..00000000000
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleTagClient.java
+++ /dev/null
@@ -1,39 +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.rule;
-
-import java.util.Collection;
-
-/**
- * Allows management of rule tags
- * @since 4.2
- */
-public interface RuleTagClient {
-
- /**
- * List all tags
- */
- Collection<String> list();
-
- /**
- * Create a new tag
- */
- void create(String tag);
-}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleTagClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleTagClient.java
deleted file mode 100644
index 62f15a11e05..00000000000
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleTagClient.java
+++ /dev/null
@@ -1,59 +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.rule.internal;
-
-import org.json.simple.JSONValue;
-import org.sonar.wsclient.internal.HttpRequestFactory;
-import org.sonar.wsclient.rule.RuleTagClient;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Do not instantiate this class, but use {@link org.sonar.wsclient.SonarClient#ruleTagClient()}.
- */
-public class DefaultRuleTagClient implements RuleTagClient {
-
- private static final String ROOT_URL = "/api/rule_tags";
- private static final String LIST_URL = ROOT_URL + "/list";
- private static final String CREATE_URL = ROOT_URL + "/create";
-
- private final HttpRequestFactory requestFactory;
-
- public DefaultRuleTagClient(HttpRequestFactory requestFactory) {
- this.requestFactory = requestFactory;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Collection<String> list() {
- String json = requestFactory.get(LIST_URL, Collections.<String, Object> emptyMap());
- return (Collection<String>) JSONValue.parse(json);
- }
-
- @Override
- public void create(String tag) {
- Map<String, Object> params = new HashMap<String, Object>();
- params.put("tag", tag);
- requestFactory.post(CREATE_URL, params);
- }
-}