for (final CurricularRuleType curricularRuleType : CurricularRuleType.values()) {
switch (curricularRuleType) {
case CREDITS_LIMIT:
if (getDegreeModule().isLeaf()) {
final CurricularCourse curricularCourse = (CurricularCourse) getDegreeModule();
if (curricularCourse.isOptionalCurricularCourse()) {
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
break;
}
}
case DEGREE_MODULES_SELECTION_LIMIT:
if (!getDegreeModule().isLeaf()) {
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
}
break;
case PRECEDENCY_BETWEEN_DEGREE_MODULES:
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
break;
case PRECEDENCY_APPROVED_DEGREE_MODULE:
case PRECEDENCY_ENROLED_DEGREE_MODULE:
case RESTRICTION_NOT_ENROLED_DEGREE_MODULE:
case ENROLMENT_TO_BE_APPROVED_BY_COORDINATOR:
if (getDegreeModule().isLeaf()) {
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
}
break;
case EXCLUSIVENESS:
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
break;
case ANY_CURRICULAR_COURSE:
if (getDegreeModule().isLeaf()) {
final CurricularCourse curricularCourse = (CurricularCourse) getDegreeModule();
if (curricularCourse.isOptionalCurricularCourse()) {
result.add(new SelectItem(curricularRuleType.getName(), BundleUtil.getString(Bundle.ENUMERATION,
curricularRuleType.getName())));
}
}
break;