aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-deprecated
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-23 00:26:02 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-23 00:26:02 +0200
commita5e9b7728595fc28ccad401cf44574e3c08b0430 (patch)
treee39984a1139980ed9e89a1eae72226139e418d21 /sonar-deprecated
parent66a964aca512b5bced3fae1fffea1e8305754dd6 (diff)
downloadsonarqube-a5e9b7728595fc28ccad401cf44574e3c08b0430.tar.gz
sonarqube-a5e9b7728595fc28ccad401cf44574e3c08b0430.zip
Remove the classes RulesManager and DaoFacade.
Both of them have been deprecated long time ago.
Diffstat (limited to 'sonar-deprecated')
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java78
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java36
2 files changed, 0 insertions, 114 deletions
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java
deleted file mode 100644
index 773ac7ebe67..00000000000
--- a/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import com.google.common.collect.Maps;
-import org.sonar.jpa.dao.RulesDao;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A class to manage and access rules defined in Sonar.
- *
- * @deprecated UGLY CLASS
- */
-@Deprecated
-public class DefaultRulesManager extends RulesManager {
-
- private final Map<String, Map<String, Rule>> rulesByPluginAndKey = Maps.newHashMap();
- private final RulesDao rulesDao;
-
- public DefaultRulesManager(RulesDao dao) {
- this.rulesDao = dao;
- }
-
- /**
- * Gets a list of rules indexed by their key for a given plugin
- *
- * @param pluginKey the plugin key
- * @return a Map with the rule key and the rule
- */
- public Map<String, Rule> getPluginRulesIndexedByKey(String pluginKey) {
- Map<String, Rule> rulesByKey = rulesByPluginAndKey.get(pluginKey);
- if (rulesByKey == null) {
- rulesByKey = new HashMap<String, Rule>();
- List<Rule> rules = rulesDao.getRulesByPlugin(pluginKey);
- if (rules != null) {
- for (Rule rule : rules) {
- rulesByKey.put(rule.getKey(), rule);
- }
- }
- rulesByPluginAndKey.put(pluginKey, rulesByKey);
- }
- return rulesByKey;
- }
-
- /**
- * Gets a rule belonging to a defined plugin based on its key
- *
- * @param pluginKey the plugin key
- * @param ruleKey the rule key
- * @return the rule
- */
- @Override
- public Rule getPluginRule(String pluginKey, String ruleKey) {
- Map<String, Rule> rulesByKey = getPluginRulesIndexedByKey(pluginKey);
- return rulesByKey.get(ruleKey);
- }
-
-}
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java
deleted file mode 100644
index d50f33c1896..00000000000
--- a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-/**
- * @deprecated since 2.3
- */
-@Deprecated
-public abstract class RulesManager {
-
- /**
- * Gets a rule belonging to a defined plugin based on its key
- *
- * @param pluginKey the plugin key
- * @param ruleKey the rule key
- * @return the rule
- */
- public abstract Rule getPluginRule(String pluginKey, String ruleKey);
-}