com.denimgroup.threadfix.data.enums.CICDReportGroupByEnum Maven / Gradle / Ivy
package com.denimgroup.threadfix.data.enums;
import com.fasterxml.jackson.annotation.JsonFormat;
@JsonFormat(shape= JsonFormat.Shape.OBJECT)
public enum CICDReportGroupByEnum {
None("None"),
CWE("CWE"),
SEVERITY("Severity"),
CWE_SEVERITY("CWE and Severity");
CICDReportGroupByEnum(String displayName){
this.displayName = displayName;
}
private String displayName;
public String getDisplayName() {
return displayName;
}
public static CICDReportGroupByEnum getCICDReportGroupByEnum(String input) {
if (input == null) {
return null;
}
CICDReportGroupByEnum groupByEnum = None;
for (CICDReportGroupByEnum groupBy : values()) {
if (groupBy.name().equalsIgnoreCase(input) ||
groupBy.displayName.equalsIgnoreCase(input) ||
groupBy.displayName.replace(' ', '_').equalsIgnoreCase(input)) {
groupByEnum = groupBy;
break;
}
}
if(groupByEnum.equals(None) && input.equalsIgnoreCase("CWEAndSeverity")){
groupByEnum = CWE_SEVERITY;
}
return groupByEnum;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy