aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-deprecated/src/main/java/org/sonar
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-06 17:22:57 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-06 17:22:57 +0000
commitaef2286bf00aca219862aa62ef5dcac4bb9d2e9a (patch)
tree185ed172e4fd630b1b14c07b072e049fee6c4494 /sonar-deprecated/src/main/java/org/sonar
parent4592819b97fd656bd857e319b6c26c008e2f50f2 (diff)
downloadsonarqube-aef2286bf00aca219862aa62ef5dcac4bb9d2e9a.tar.gz
sonarqube-aef2286bf00aca219862aa62ef5dcac4bb9d2e9a.zip
SONAR-1229 Export/Import a given Sonar quality profile
Diffstat (limited to 'sonar-deprecated/src/main/java/org/sonar')
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java47
1 files changed, 0 insertions, 47 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
index dce362a38a6..26b917b9329 100644
--- a/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java
@@ -137,53 +137,6 @@ public class DefaultRulesManager extends RulesManager {
return Collections.emptyList();
}
- /**
- * Gets count of rules by categories defined for a given language
- *
- * @param language the language
- * @return a Map with the category as key and the count as value
- */
- public Map<String, Long> countRulesByCategory(Language language) {
- return countRulesByCategory(language, rulesDao);
- }
-
- protected Map<String, Long> countRulesByCategory(Language language, RulesDao rulesDao) {
- Map<String, Long> countByCategory = new HashMap<String, Long>();
- List<Plugin> result = getPlugins(language);
- if (!CollectionUtils.isEmpty(result)) {
- List<String> keys = getPluginKeys(getPlugins(language));
- for (RulesCategory rulesCategory : rulesDao.getCategories()) {
- Long rulesCount = rulesDao.countRules(keys, rulesCategory.getName());
- countByCategory.put(rulesCategory.getName(), rulesCount);
- }
- }
- return countByCategory;
- }
-
- private List<String> getPluginKeys(List<Plugin> plugins) {
- ArrayList<String> keys = new ArrayList<String>();
- for (Plugin plugin : plugins) {
- keys.add(plugin.getKey());
- }
- return keys;
- }
-
- /**
- * Get the list of rules plugin that implement a mechanism of export for a given language
- *
- * @param language the language
- * @return the list of plugins
- */
- public List<Plugin> getExportablePlugins(Language language) {
- List<Plugin> targets = new ArrayList<Plugin>();
- List<RulesRepository<?>> rulesRepositories = getRulesRepositories(language);
- for (RulesRepository<?> repository : rulesRepositories) {
- if (repository instanceof ConfigurationExportable) {
- targets.add(plugins.getPluginByExtension(repository));
- }
- }
- return targets;
- }
/**
* Get the list of rules plugin that implement a mechanism of import for a given language