Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionDegree


                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD, infoExecutionPeriod);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD_OID, infoExecutionPeriod.getExternalId().toString());

        final ExecutionSemester executionSemester = FenixFramework.getDomainObject(infoExecutionPeriod.getExternalId());
        ExecutionDegree executionDegree = degreeCurricularPlan.getExecutionDegreeByYear(executionSemester.getExecutionYear());
        if (executionDegree != null) {
            // infoExecutionDegree
            InfoExecutionDegree infoExecutionDegree = InfoExecutionDegree.newInfoFromDomain(executionDegree);
            RequestUtils.setExecutionDegreeToRequest(request, infoExecutionDegree);
View Full Code Here


        }

        Set<Degree> degrees = executionCourse.getDegreesSortedByDegreeName();
        // destination attributes
        String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
        ExecutionDegree originExecutionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        request.setAttribute("originExecutionDegreeName", originExecutionDegree.getPresentationName());
        Boolean chooseNotLinked = Boolean.valueOf(RequestUtils.getAndSetStringToRequest(request, "executionCoursesNotLinked"));
        String curricularYearId = RequestUtils.getAndSetStringToRequest(request, "curricularYearId");

        if (!degrees.contains(originExecutionDegree.getDegree())) {
            ExecutionCourseBean sessionBean = new ExecutionCourseBean();
            sessionBean.setSourceExecutionCourse(executionCourse);
            sessionBean.setExecutionSemester(executionCourse.getExecutionPeriod());
            sessionBean.setChooseNotLinked(chooseNotLinked);
            CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
View Full Code Here

    private ActionForward readExecutionDegree(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            String findForward) {
        final DynaActionForm form = (DynaActionForm) actionForm;
        final String executionDegreeID = (String) form.get("executionDegreeID");
        if (!StringUtils.isEmpty(executionDegreeID)) {
            final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeID);
            request.setAttribute("executionDegree", executionDegree);
            return mapping.findForward(findForward);
        } else {
            return mapping.getInputForward();
        }
View Full Code Here

        if (StringUtils.isEmpty(executionCoursesNotLinked) || !Boolean.valueOf(executionCoursesNotLinked)) {
            String curricularYearId = RequestUtils.getAndSetStringToRequest(request, "curricularYearId");
            CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
            request.setAttribute("curYear", curYear.getYear().toString());
            String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
            request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());

        }
        RequestUtils.getAndSetStringToRequest(request, "executionCourseId");
        RequestUtils.getAndSetStringToRequest(request, "executionCourseName");
        ExecutionSemester executionSemester = FenixFramework.getDomainObject(executionPeriodId);
View Full Code Here

        if (StringUtils.isEmpty(executionCoursesNotLinked) || !Boolean.valueOf(executionCoursesNotLinked)) {
            String curricularYearId = RequestUtils.getAndSetStringToRequest(request, "curricularYearId");
            CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
            request.setAttribute("curYear", curYear.getYear().toString());
            String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
            request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());
        }
        String executionPeriodId = RequestUtils.getAndSetStringToRequest(request, "executionPeriodId");
        ExecutionSemester executionPeriod = FenixFramework.getDomainObject(executionPeriodId);
        request.setAttribute("executionPeriodName", executionPeriod.getQualifiedName());
        RequestUtils.getAndSetStringToRequest(request, "executionCourseName");
View Full Code Here

                    courseLoad.getType();
                    for (final Shift shift : courseLoad.getShiftsSet()) {
                        shift.getNome();
                        for (final SchoolClass schoolClass : shift.getAssociatedClassesSet()) {
                            schoolClass.getNome();
                            final ExecutionDegree executionDegree = schoolClass.getExecutionDegree();
                            final DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
                            degreeCurricularPlan.getName();
                            final Degree degree = degreeCurricularPlan.getDegree();
                            degree.getDegreeType();
                            final RootCourseGroup root = degreeCurricularPlan.getRoot();
                            load(root);
View Full Code Here

        RequestUtils.getAndSetStringToRequest(request, "executionPeriodId"); // maybe not needed (have EC id)

        CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
        request.setAttribute("curYear", curYear.getYear().toString());

        ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());

        InfoExecutionCourse infoExecutionCourse = ReadExecutionCourseWithShiftsAndCurricularCoursesByOID.run(executionCourseId);
        request.setAttribute("infoExecutionCourse", infoExecutionCourse);

        List executionDegrees =
View Full Code Here

        RequestUtils.getAndSetStringToRequest(request, "executionPeriodId");

        CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
        request.setAttribute("curYear", curYear.getYear().toString());

        ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());

        InfoExecutionCourse infoExecutionCourse = ReadExecutionCourseWithShiftsAndCurricularCoursesByOID.run(executionCourseId);
        request.setAttribute("infoExecutionCourse", infoExecutionCourse);

        return mapping.findForward("showSeparationPage");
View Full Code Here

        sessionBean.setChooseNotLinked(chooseNotLinked);

        if (!chooseNotLinked) {
            String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
            String curricularYearId = RequestUtils.getAndSetStringToRequest(request, "curricularYearId");
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
            CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);
            sessionBean.setExecutionDegree(executionDegree);
            sessionBean.setCurricularYear(curYear);
            request.setAttribute("curYear", curYear.getYear().toString());
            request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());
        }

        request.setAttribute("sessionBean", sessionBean);

        return mapping.findForward("manageCurricularSeparation");
View Full Code Here

        String destinationExecutionCourseIdString = (String) dynaActionForm.get("destinationExecutionCourseId");
        String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
        String curricularYearId = (String) dynaActionForm.get("curricularYearId");
        String[] shiftIdsToTransfer = (String[]) dynaActionForm.get("shiftIdsToTransfer");
        String[] curricularCourseIdsToTransfer = (String[]) dynaActionForm.get("curricularCourseIdsToTransfer");
        ExecutionDegree originExecutionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        ExecutionCourse originExecutionCourse = FenixFramework.getDomainObject(executionCourseId);
        String originExecutionDegreesString = originExecutionCourse.getDegreePresentationString();
        String destinationExecutionCourseId = null;

        try {

            if (!StringUtils.isEmpty(destinationExecutionCourseIdString)
                    && StringUtils.isNumeric(destinationExecutionCourseIdString)) {
                destinationExecutionCourseId = destinationExecutionCourseIdString;
            } else {
                throw new DomainException("error.selection.noDestinationExecutionCourse");
            }

            ExecutionCourse destinationExecutionCourse =
                    SeperateExecutionCourse.run(executionCourseId, destinationExecutionCourseId, shiftIdsToTransfer,
                            curricularCourseIdsToTransfer);

            String destinationExecutionCourseName = destinationExecutionCourse.getNameI18N().getContent();
            if (StringUtils.isEmpty(destinationExecutionCourseName)) {
                destinationExecutionCourseName = destinationExecutionCourse.getName();
            }
            String destinationExecutionCourseCode = destinationExecutionCourse.getSigla();
            String destinationDegreeName = destinationExecutionCourse.getDegreePresentationString();
            String transferedCurricularCourses = makeObjectStringFromArray(curricularCourseIdsToTransfer, CurricularCourse.class);
            String transferedShifts;

            String successKey;
            if (shiftIdsToTransfer.length == 0) {
                successKey = "message.manager.executionCourseManagement.transferCourse.success.many.noShifts";
                transferedShifts = "";
            } else {
                successKey = "message.manager.executionCourseManagement.transferCourse.success.many";
                transferedShifts = makeObjectStringFromArray(shiftIdsToTransfer, Shift.class);
            }
            addActionMessage("success", request, successKey, transferedCurricularCourses, transferedShifts,
                    destinationExecutionCourseName, destinationDegreeName, destinationExecutionCourseCode);

            // check if degree context has changed
            if (!originExecutionCourse.getExecutionDegrees().contains(originExecutionDegree)) {
                // origin execution course degree has changed (no longer on original degree)
                String originCourseName = originExecutionCourse.getNameI18N().getContent();
                if (StringUtils.isEmpty(originCourseName)) {
                    originCourseName = originExecutionCourse.getName();
                }
                addActionMessage("info", request,
                        "message.manager.executionCourseManagement.transferCourse.success.switchContext", originCourseName,
                        originExecutionDegreesString, originExecutionCourse.getDegreePresentationString(),
                        destinationExecutionCourseName, destinationExecutionCourse.getDegreePresentationString(),
                        originExecutionDegree.getDegree().getSigla());
                request.setAttribute("executionCourseId", destinationExecutionCourse.getExternalId().toString());
            }

        } catch (DomainException e) {
            addActionMessage("error", request, e.getMessage(), e.getArgs());
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.ExecutionDegree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.