All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.conqat.engine.index.shared.FindingsSummaryGuidelineRuleInfoBase Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) CQSE GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.conqat.engine.index.shared;

import org.conqat.lib.commons.js_export.ExportToTypeScript;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Holds how many findings exist for a given rule in a guideline (e.g. AUTOSAR C++14).
 */
@ExportToTypeScript
public class FindingsSummaryGuidelineRuleInfoBase {

	private static final String NAME_PROPERTY = "name";

	private static final String COUNT_PROPERTY = "count";

	private static final String COUNT_RED_PROPERTY = "countRed";

	private static final String NUMBER_OF_CHECKS_PROPERTY = "numberOfChecks";

	/** Name of the guideline rule/category. */
	@JsonProperty(NAME_PROPERTY)
	protected String name;

	/** The overall number of findings in the contained group infos. */
	@JsonProperty(COUNT_PROPERTY)
	protected int count;

	/** The number of red findings. */
	@JsonProperty(COUNT_RED_PROPERTY)
	protected int countRed;

	/** The number of checks for this rule/category. */
	@JsonProperty(NUMBER_OF_CHECKS_PROPERTY)
	protected int numberOfChecks;

	@JsonCreator
	public FindingsSummaryGuidelineRuleInfoBase(@JsonProperty(NAME_PROPERTY) String ruleName,
			@JsonProperty(COUNT_PROPERTY) int count, @JsonProperty(COUNT_RED_PROPERTY) int countRed,
			@JsonProperty(NUMBER_OF_CHECKS_PROPERTY) int numberOfChecks) {
		this.name = ruleName;
		this.count = count;
		this.countRed = countRed;
		this.numberOfChecks = numberOfChecks;
	}

	public int getCount() {
		return count;
	}

	public int getCountRed() {
		return countRed;
	}

	public int getNumberOfChecks() {
		return numberOfChecks;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy