aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@searchbox.com>2014-06-17 18:21:04 +0200
committerStephane Gamard <stephane.gamard@searchbox.com>2014-06-17 18:57:35 +0200
commitdfe79e3c1f6e6fb9540d8b125c87a9731dbd053d (patch)
tree31eedb60eac8ffc30590accf5df3692a4a6dfb66 /sonar-server
parent361a12f8b7a65dda6c038b96cba10c4e6c26e3df (diff)
downloadsonarqube-dfe79e3c1f6e6fb9540d8b125c87a9731dbd053d.tar.gz
sonarqube-dfe79e3c1f6e6fb9540d8b125c87a9731dbd053d.zip
SONAR-5007 - Added REMOVED filter for count and stats methods
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileService.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileService.java
index 2194a89b848..47451880c77 100644
--- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileService.java
+++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileService.java
@@ -211,6 +211,10 @@ public class QProfileService implements ServerComponent {
UserSession.get().checkGlobalPermission(GlobalPermissions.QUALITY_PROFILE_ADMIN);
}
+ public long countActiveRulesByProfile(QualityProfileKey key) {
+ return index.get(ActiveRuleIndex.class).countByQualityProfileKey(key);
+ }
+
public Map<QualityProfileKey, Long> countAllActiveRules() {
Map<QualityProfileKey, Long> counts = new HashMap<QualityProfileKey, Long>();
for (Map.Entry<String, Long> entry : index.get(ActiveRuleIndex.class).countAllByQualityProfileKey().entrySet()) {