IEnrollmentRule enrollmentRule = new MaximumNumberEctsCreditsEnrolmentRule(studentCurricularPlan, executionPeriod); try { result = enrollmentRule.apply(result); } catch (EnrolmentRuleDomainException e) { }
    protected List filter(StudentCurricularPlan studentCurricularPlan, ExecutionPeriod executionPeriod,	    List curricularCoursesToBeEnrolledIn,	    final List selectedCurricularCoursesFromSpecializationAndSecundaryAreas) {	final List curricularCoursesFromCommonAreas = getCommonAreasCurricularCourses(studentCurricularPlan);	List result = (List) CollectionUtils.select(curricularCoursesToBeEnrolledIn, new Predicate() {	    public boolean evaluate(Object obj) {		CurricularCourse2Enroll curricularCourse2Enroll = (CurricularCourse2Enroll) obj;		return curricularCoursesFromCommonAreas.contains(curricularCourse2Enroll			.getCurricularCourse());	    }	});	List curricularCoursesFromOtherAreasToMantain = (List) CollectionUtils.select(		curricularCoursesToBeEnrolledIn, new Predicate() {		    public boolean evaluate(Object obj) {			CurricularCourse2Enroll curricularCourse2Enroll = (CurricularCourse2Enroll) obj;			return selectedCurricularCoursesFromSpecializationAndSecundaryAreas				.contains(curricularCourse2Enroll.getCurricularCourse())				|| SpecificLEICEnrollmentRule.this.studentCurricularPlan					.getDegreeCurricularPlan().getTFCs().contains(						curricularCourse2Enroll.getCurricularCourse());		    }		});	List specializationAreaCurricularCourses = getSpecializationAreaCurricularCourses(studentCurricularPlan);	List secundaryAreaCurricularCourses = getSecundaryAreaCurricularCourses(studentCurricularPlan);	if (thereIsAnyTemporaryCurricularCourse(studentCurricularPlan, executionPeriod,		specializationAreaCurricularCourses)) {	    markCurricularCourses(curricularCoursesFromOtherAreasToMantain,		    specializationAreaCurricularCourses);	}	if (thereIsAnyTemporaryCurricularCourse(studentCurricularPlan, executionPeriod,		secundaryAreaCurricularCourses)) {	    markCurricularCourses(curricularCoursesFromOtherAreasToMantain,		    secundaryAreaCurricularCourses);	}	result.addAll(curricularCoursesFromOtherAreasToMantain);	//FIXME	if (result.isEmpty() || allTemporaryOrNotOptional(result)) {	    result.addAll(getOptionalCourses(result));	} else {	    IEnrollmentRule enrollmentRule = new PreviousYearsCurricularCourseEnrollmentRule(		    studentCurricularPlan, executionPeriod);	    try {		result = enrollmentRule.apply(result);	    } catch (EnrolmentRuleDomainException e) {	    }	}	return result;    }