final List<ExecutionPeriod> executionPeriods = (List<ExecutionPeriod>) executeService(request, "ReadAllDomainObjects", args);
final Collection<ExecutionPeriod> executionPeriods = (Collection<ExecutionPeriod>) executeService(request, "ReadAllDomainObjects", args);
    public ActionForward prepare(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixFilterException,            FenixServiceException {        final Object[] args = { ExecutionPeriod.class };        final List<ExecutionPeriod> executionPeriods = (List<ExecutionPeriod>) executeService(request, "ReadAllDomainObjects", args);        final Set<ExecutionPeriod> sortedExecutionPeriods = new TreeSet<ExecutionPeriod>(executionPeriods);        request.setAttribute("executionPeriods", sortedExecutionPeriods);        final DynaActionForm dynaActionForm = (DynaActionForm) form;        final Integer executionPeriodID = getExecutionPeriodID(dynaActionForm);        final ExecutionPeriod selectedExecutionPeriod = findExecutionPeriod(executionPeriods, executionPeriodID);        dynaActionForm.set("executionPeriodID", selectedExecutionPeriod.getIdInternal().toString());        final Collection<ExecutionDegree> executionDegrees = new ArrayList<ExecutionDegree>();        for (final ExecutionDegree executionDegree : selectedExecutionPeriod.getExecutionYear().getExecutionDegreesSortedByDegreeName()) {            if (executionDegree.getDegreeCurricularPlan().getDegree().getTipoCurso() == DegreeType.DEGREE) {                executionDegrees.add(executionDegree);            }        }        request.setAttribute("executionDegrees", executionDegrees);        final Set<CurricularYear> curricularYears = new TreeSet<CurricularYear>();        request.setAttribute("curricularYears", curricularYears);        final Set<ExecutionCourse> executionCourses = new TreeSet<ExecutionCourse>(ExecutionCourse.EXECUTION_COURSE_NAME_COMPARATOR);        request.setAttribute("executionCourses", executionCourses);        final ExecutionCourse selectedExecutionCourse = (ExecutionCourse)            setDomainObjectInRequest(dynaActionForm, request, ExecutionCourse.class, "executionCourseID", "executionCourse");        request.setAttribute("selectedExecutionCourse", selectedExecutionCourse);        final Integer curricularYearID = getCurricularYearID(dynaActionForm);        final CurricularYear selecctedCurricularYear = (CurricularYear)                setDomainObjectInRequest(dynaActionForm, request, CurricularYear.class, "curricularYearID", "selecctedCurricularYear");        final DegreeCurricularPlan degreeCurricularPlan = (DegreeCurricularPlan)        setDomainObjectInRequest(dynaActionForm, request, DegreeCurricularPlan.class, "degreeCurricularPlanID", "executionCourse");        if (degreeCurricularPlan != null) {            request.setAttribute("degreeCurricularPlanID", degreeCurricularPlan.getIdInternal());        	for (final CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCourses()) {        		for (final CurricularCourseScope curricularCourseScope : curricularCourse.getScopes()) {        			final CurricularSemester curricularSemester = curricularCourseScope.getCurricularSemester();        			final CurricularYear curricularYear = curricularSemester.getCurricularYear();        			curricularYears.add(curricularYear);        			if (curricularYearID == null || curricularYear.getIdInternal().equals(curricularYearID)) {        				for (final ExecutionCourse executionCourse : curricularCourse.getExecutionCoursesByExecutionPeriod(selectedExecutionPeriod)) {        					executionCourses.add(executionCourse);        				}        			}        		}        	}        }        if (selecctedCurricularYear != null) {            request.setAttribute("curricularYearWeeklyWorkLoadView", new CurricularYearWeeklyWorkLoadView(degreeCurricularPlan, selectedExecutionPeriod, executionCourses));        }        return mapping.findForward("showWeeklyWorkLoad");    }