3 * Copyright (C) 2009-2019 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 inReviewSecurityHotspots;
32 private final long toReviewSecurityHotspots;
33 private final long wontFixSecurityHotspots;
34 private final List<SecurityStandardCategoryStatistics> children;
35 private long activeRules;
36 private long totalRules;
38 public SecurityStandardCategoryStatistics(String category, long vulnerabilities, OptionalInt vulnerabiliyRating, long inReviewSecurityHotspots, long toReviewSecurityHotspots,
39 long wontFixSecurityHotspots, @Nullable List<SecurityStandardCategoryStatistics> children) {
40 this.category = category;
41 this.vulnerabilities = vulnerabilities;
42 this.vulnerabiliyRating = vulnerabiliyRating;
43 this.inReviewSecurityHotspots = inReviewSecurityHotspots;
44 this.toReviewSecurityHotspots = toReviewSecurityHotspots;
45 this.wontFixSecurityHotspots = wontFixSecurityHotspots;
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 getInReviewSecurityHotspots() {
62 return inReviewSecurityHotspots;
65 public long getToReviewSecurityHotspots() {
66 return toReviewSecurityHotspots;
69 public long getWontFixSecurityHotspots() {
70 return wontFixSecurityHotspots;
73 public List<SecurityStandardCategoryStatistics> getChildren() {
77 public long getActiveRules() {
81 public long getTotalRules() {
85 public SecurityStandardCategoryStatistics setActiveRules(long activeRules) {
86 this.activeRules = activeRules;
90 public SecurityStandardCategoryStatistics setTotalRules(long totalRules) {
91 this.totalRules = totalRules;