Class ImpactMapper
- java.lang.Object
-
- org.sonar.api.server.rule.internal.ImpactMapper
-
public class ImpactMapper extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
convertToDeprecatedSeverity(Severity severity)
Deprecated.since 10.14, useconvertToRuleSeverity(Severity)
instead.static Severity
convertToImpactSeverity(java.lang.String ruleSeverity)
static java.lang.String
convertToRuleSeverity(Severity severity)
static RuleType
convertToRuleType(SoftwareQuality softwareQuality)
static SoftwareQuality
convertToSoftwareQuality(RuleType ruleType)
static java.util.Map.Entry<SoftwareQuality,Severity>
getBestImpactForBackmapping(java.util.Map<SoftwareQuality,Severity> impacts)
This method is needed for picking the best impact on which we are going to base backmapping (getting type and severity from impact).
-
-
-
Method Detail
-
convertToSoftwareQuality
public static SoftwareQuality convertToSoftwareQuality(RuleType ruleType)
-
convertToRuleType
public static RuleType convertToRuleType(SoftwareQuality softwareQuality)
-
convertToRuleSeverity
public static java.lang.String convertToRuleSeverity(Severity severity)
-
convertToDeprecatedSeverity
@Deprecated(since="10.14") public static java.lang.String convertToDeprecatedSeverity(Severity severity)
Deprecated.since 10.14, useconvertToRuleSeverity(Severity)
instead.
-
convertToImpactSeverity
public static Severity convertToImpactSeverity(java.lang.String ruleSeverity)
-
getBestImpactForBackmapping
public static java.util.Map.Entry<SoftwareQuality,Severity> getBestImpactForBackmapping(java.util.Map<SoftwareQuality,Severity> impacts)
This method is needed for picking the best impact on which we are going to base backmapping (getting type and severity from impact). As Impacts like any ordering (there is no "best" impact, all of them are equal) we just need to ensure that our choice is consistent to make sure we always pick the same impact when the list (map) of impacts is the same.
-
-