*/
@SuppressWarnings("static-access")//for StatusDescription.WARNING
protected List<StatusDescription> isConfigValidWithTranslator(CourseEditorEnv cev, String translatorStr, List<ConditionExpression> condExprs) {
List<StatusDescription> condExprsStatusDescs = new ArrayList<StatusDescription>();
// check valid configuration without course environment
StatusDescription first = isConfigValid();
// check valid configuration within the course environment
if (cev == null) {
// course environment not configured!??
condExprsStatusDescs.add(first);
return condExprsStatusDescs;
}
/*
* there is course editor environment, we can check further. Iterate over
* all conditions of this course node, validate the condition expression and
* transform the condition error message into a status description
*/
for (int i = 0; i < condExprs.size(); i++) {
ConditionExpression ce = condExprs.get(i);
ConditionErrorMessage[] cems = cev.validateConditionExpression(ce);
if (cems != null && cems.length > 0) {
for (int j = 0; j < cems.length; j++) {
StatusDescription sd = new StatusDescription(StatusDescription.WARNING, cems[j].errorKey, cems[j].solutionMsgKey,
cems[j].errorKeyParams, translatorStr);
sd.setDescriptionForUnit(getIdent());
condExprsStatusDescs.add(sd);
}
}
}
condExprsStatusDescs.add(first);