3 * Copyright (C) 2009-2021 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 package org.sonar.server.issue.index;
22 import java.util.List;
23 import java.util.OptionalInt;
24 import javax.annotation.Nullable;
26 public class SecurityStandardCategoryStatistics {
28 private final String category;
29 private final long vulnerabilities;
30 private final OptionalInt vulnerabiliyRating;
31 private final long toReviewSecurityHotspots;
32 private final long reviewedSecurityHotspots;
33 private final Integer securityReviewRating;
34 private final List<SecurityStandardCategoryStatistics> children;
35 private long activeRules;
36 private long totalRules;
38 public SecurityStandardCategoryStatistics(String category, long vulnerabilities, OptionalInt vulnerabiliyRating, long toReviewSecurityHotspots,
39 long reviewedSecurityHotspots, Integer securityReviewRating, @Nullable List<SecurityStandardCategoryStatistics> children) {
40 this.category = category;
41 this.vulnerabilities = vulnerabilities;
42 this.vulnerabiliyRating = vulnerabiliyRating;
43 this.toReviewSecurityHotspots = toReviewSecurityHotspots;
44 this.reviewedSecurityHotspots = reviewedSecurityHotspots;
45 this.securityReviewRating = securityReviewRating;
46 this.children = children;
49 public String getCategory() {
53 public long getVulnerabilities() {
54 return vulnerabilities;
57 public OptionalInt getVulnerabiliyRating() {
58 return vulnerabiliyRating;
61 public long getToReviewSecurityHotspots() {
62 return toReviewSecurityHotspots;
65 public long getReviewedSecurityHotspots() {
66 return reviewedSecurityHotspots;
69 public Integer getSecurityReviewRating() { return securityReviewRating; }
71 public List<SecurityStandardCategoryStatistics> getChildren() {
75 public long getActiveRules() {
79 public SecurityStandardCategoryStatistics setActiveRules(long activeRules) {
80 this.activeRules = activeRules;
84 public long getTotalRules() {
88 public SecurityStandardCategoryStatistics setTotalRules(long totalRules) {
89 this.totalRules = totalRules;