use of org.asqatasun.entity.parameterization.ParameterElement in project Asqatasun by Asqatasun.
the class ParameterDataServiceImpl method getParameterSetFromAuditLevel.
@Override
public Set<Parameter> getParameterSetFromAuditLevel(String ref, String level) {
if (ref.equalsIgnoreCase(RGAA22_REF) || ref.equalsIgnoreCase(RGAA30_REF) || ref.equalsIgnoreCase(RGAA40_REF)) {
if (level.equalsIgnoreCase(BRONZE_LEVEL)) {
level = A_LEVEL;
} else if (level.equalsIgnoreCase(SILVER_LEVEL)) {
level = AA_LEVEL;
} else if (level.equalsIgnoreCase(GOLD_LEVEL)) {
level = AAA_LEVEL;
}
}
if (level.equalsIgnoreCase(BRONZE_LEVEL) || level.equalsIgnoreCase(A_LEVEL)) {
level = LEVEL_1;
} else if (level.equalsIgnoreCase(SILVER_LEVEL) || level.equalsIgnoreCase(AA_LEVEL)) {
level = LEVEL_2;
} else if (level.equalsIgnoreCase(GOLD_LEVEL) || level.equalsIgnoreCase(AAA_LEVEL)) {
level = LEVEL_3;
}
ParameterElement levelParameterElement = parameterElementDataService.getParameterElement(LEVEL_PARAMETER_ELEMENT_CODE);
Parameter levelParameter = getParameter(levelParameterElement, ref + ";" + level);
Set<Parameter> paramSet = getDefaultParameterSet();
return updateParameter(paramSet, levelParameter);
}
Aggregations