Package org.fenixedu.academic.dto.student

Examples of org.fenixedu.academic.dto.student.RegistrationConclusionBean


        final Registration registration = getAndSetRegistration(request);

        if (registration.isBolonha()) {

            if (registration.getLastStudentCurricularPlan().getInternalCycleCurriculumGrops().size() > 1) {
                request.setAttribute("registrationConclusionBean", new RegistrationConclusionBean(registration));
                return mapping.findForward("chooseCycleForRegistrationConclusion");

            } else if (registration.getInternalCycleCurriculumGrops().size() == 1) {
                final RegistrationConclusionBean bean = buildRegistrationConclusionBean(registration);
                bean.setCycleCurriculumGroup(registration.getInternalCycleCurriculumGrops().iterator().next());
                request.setAttribute("registrationConclusionBean", bean);
                return mapping.findForward("registrationConclusion");

            } else {
                return mapping.findForward("chooseCycleForRegistrationConclusion");
View Full Code Here


        request.setAttribute("registrationConclusionBean", buildRegistrationConclusionBean(registration));
        return mapping.findForward("registrationConclusion");
    }

    private RegistrationConclusionBean buildRegistrationConclusionBean(final Registration registration) {
        final RegistrationConclusionBean bean = new RegistrationConclusionBean(registration);
        bean.setHasAccessToRegistrationConclusionProcess(RegistrationPredicates.MANAGE_CONCLUSION_PROCESS.evaluate(registration));
        return bean;
    }
View Full Code Here

    }

    public ActionForward doRegistrationConclusion(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final RegistrationConclusionBean registrationConclusionBean = getRegistrationConclusionBeanFromViewState();

        try {
            RegistrationConclusionProcess.run(registrationConclusionBean);
        } catch (final IllegalDataAccessException e) {
            addActionMessage("illegal.access", request, "error.not.authorized.to.registration.conclusion.process");
            request.setAttribute("registrationConclusionBean", registrationConclusionBean);
            return mapping.findForward("registrationConclusion");

        } catch (final DomainException e) {
            addActionMessage(request, e.getKey(), e.getArgs());
            request.setAttribute("registrationConclusionBean", registrationConclusionBean);
            return mapping.findForward("registrationConclusion");
        }

        request.setAttribute("registrationId", registrationConclusionBean.getRegistration().getExternalId());
        return visualizeRegistration(mapping, form, request, response);

    }
View Full Code Here

    }

    public ActionForward chooseCycleCurriculumGroupForConclusion(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {

        final RegistrationConclusionBean registrationConclusionBean = getRegistrationConclusionBeanFromViewState();
        request.setAttribute("registrationConclusionBean", registrationConclusionBean);
        request.setAttribute("registration", registrationConclusionBean.getRegistration());

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

        final Registration registration = getAndSetRegistration(request);
        request.setAttribute("registration", registration);

        final Object cycleCurriculumGroupId = getFromRequest(request, "cycleCurriculumGroupId");
        final CycleCurriculumGroup cycleCurriculumGroup = getDomainObject(request, "cycleCurriculumGroupId");
        final RegistrationConclusionBean registrationConclusionBean;
        if (cycleCurriculumGroupId == null) {
            registrationConclusionBean = new RegistrationConclusionBean(registration);
        } else {
            registrationConclusionBean = new RegistrationConclusionBean(registration, cycleCurriculumGroup);
        }
        request.setAttribute("registrationConclusionBean", registrationConclusionBean);

        String degreePresentationName =
                registration.getDegree().getPresentationName(registrationConclusionBean.getConclusionYear());
        request.setAttribute("degreePresentationName", degreePresentationName);

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

            if (registration != null && !registration.isTransition()) {

                for (final CycleType cycleType : registration.getDegreeType().getCycleTypes()) {
                    final CycleCurriculumGroup cycleCGroup = studentCurricularPlan.getRoot().getCycleCurriculumGroup(cycleType);
                    if (cycleCGroup != null && !cycleCGroup.isExternal()) {
                        final RegistrationConclusionBean registrationConclusionBean =
                                new RegistrationConclusionBean(registration, cycleCGroup);

                        ExecutionYear conclusionYear = null;
                        if (cycleCGroup.isConcluded()) {
                            conclusionYear = registrationConclusionBean.getConclusionYear();

                            if (conclusionYear != executionYear && conclusionYear != executionYear.getPreviousExecutionYear()) {
                                continue;
                            }

                        }
                        boolean isToAddRegistration = false;
                        boolean isActive = false;
                        for (RegistrationState state : registration.getRegistrationStates(executionYear)) {
                            if (state.isActive() || state.getStateType() == RegistrationStateType.CONCLUDED) {
                                isToAddRegistration = true;
                            }
                            isActive |= state.isActive();
                        }
                        if (isToAddRegistration && conclusionYear != null) {
                            reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, true, registrationConclusionBean.getConclusionDate());
                        } else if (isActive) {
                            reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, false, null);
                        }
                    }
View Full Code Here

                for (final CycleType cycleType : registration.getDegreeType().getCycleTypes()) {
                    final CycleCurriculumGroup cycleCGroup = studentCurricularPlan.getRoot().getCycleCurriculumGroup(cycleType);
                    if (cycleCGroup != null && !cycleCGroup.isExternal()) {

                        final RegistrationConclusionBean registrationConclusionBean =
                                new RegistrationConclusionBean(registration, cycleCGroup);

                        if (cycleCGroup.isConcluded()) {
                            final ExecutionYear conclusionYear = registrationConclusionBean.getConclusionYear();

                            if (conclusionYear != executionYear && conclusionYear != executionYear.getPreviousExecutionYear()) {
                                continue;
                            }

                        }

                        boolean isToAddRegistration = false;
                        for (RegistrationState state : registration.getRegistrationStates(executionYear)) {
                            if (state.isActive() || state.getStateType() == RegistrationStateType.CONCLUDED) {
                                isToAddRegistration = true;
                                break;
                            }
                        }
                        if (isToAddRegistration
                                && (cycleCGroup.isConcluded(executionYear.getPreviousExecutionYear()) == ConclusionValue.CONCLUDED)) {
                            reportRaidesGraduate(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, true, registrationConclusionBean.getConclusionDate(),
                                    registrationConclusionBean.getAverage());
                        } else if (isToAddRegistration
                                && registration.getLastDegreeCurricularPlan().hasExecutionDegreeFor(executionYear)) {
                            reportRaidesGraduate(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
                                    cycleType, false, null, registrationConclusionBean.getAverage());
                        }
                    }
                }
            }
        }
View Full Code Here

                throw new DomainException("error.Registration.already.concluded");
            }
        }

        if (getConclusionProcess() != null) {
            getConclusionProcess().update(new RegistrationConclusionBean(this));
        } else {
            RegistrationConclusionProcess.conclude(new RegistrationConclusionBean(this));
        }

    }
View Full Code Here

        }

        for (Registration registration : student.getConcludedRegistrations()) {
            if (!registration.getDegreeType().isEmpty() && registration.isBolonha()
                    && registration.isAllowedToManageRegistration()) {
                RegistrationConclusionBean conclusionBean = null;
                CycleType cycleType = registration.getDegreeType().getLastOrderedCycleType();
                if (cycleType != null) {
                    conclusionBean = new RegistrationConclusionBean(registration, cycleType);
                } else {
                    conclusionBean = new RegistrationConclusionBean(registration);
                }
                ExecutionYear conclusionYear = conclusionBean.getConclusionYear();
                if (matchesRecentExecutionYear(currentExecutionYear, conclusionYear)) {
                    phdRegistrationWrapperResult.add(new PhdRegistrationWrapper(registration));
                }
            }
        }
View Full Code Here

        return getRegistration().getRegistryDiplomaRequest(getWhatShouldBeRequestedCycle()) != null;
    }

    @Override
    public LocalDate getConclusionDate() {
        final RegistrationConclusionBean registrationConclusionBean =
                new RegistrationConclusionBean(getRegistration(), getCycleCurriculumGroup());

        return calculateConclusionDate(registrationConclusionBean);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.student.RegistrationConclusionBean

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.