3 * Copyright (C) 2009-2020 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 List<SecurityStandardCategoryStatistics> children;
34 private long activeRules;
35 private long totalRules;
37 public SecurityStandardCategoryStatistics(String category, long vulnerabilities, OptionalInt vulnerabiliyRating, long toReviewSecurityHotspots,
38 long reviewedSecurityHotspots, @Nullable List<SecurityStandardCategoryStatistics> children) {
39 this.category = category;
40 this.vulnerabilities = vulnerabilities;
41 this.vulnerabiliyRating = vulnerabiliyRating;
42 this.toReviewSecurityHotspots = toReviewSecurityHotspots;
43 this.reviewedSecurityHotspots = reviewedSecurityHotspots;
44 this.children = children;
47 public String getCategory() {
51 public long getVulnerabilities() {
52 return vulnerabilities;
55 public OptionalInt getVulnerabiliyRating() {
56 return vulnerabiliyRating;
59 public long getToReviewSecurityHotspots() {
60 return toReviewSecurityHotspots;
63 public long getReviewedSecurityHotspots() {
64 return reviewedSecurityHotspots;
67 public List<SecurityStandardCategoryStatistics> getChildren() {
71 public long getActiveRules() {
75 public SecurityStandardCategoryStatistics setActiveRules(long activeRules) {
76 this.activeRules = activeRules;
80 public long getTotalRules() {
84 public SecurityStandardCategoryStatistics setTotalRules(long totalRules) {
85 this.totalRules = totalRules;