Package org.fenixedu.academic.dto.candidacy

Examples of org.fenixedu.academic.dto.candidacy.PrecedentDegreeInformationBean


        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        RenderUtils.invalidateViewState();

        if (bean.hasPrecedentDegreeType()) {
            if (bean.isExternalPrecedentDegreeType()) {
                bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());
            } else if (bean.hasPrecedentStudentCurricularPlan()) {
                createCandidacyPrecedentDegreeInformation(bean, bean.getPrecedentStudentCurricularPlan());
            } else {
                final List<StudentCurricularPlan> scps = bean.getPrecedentStudentCurricularPlans();
                if (scps.size() == 1) {
View Full Code Here


    }

    private static void editForDegreeTransferOrDegreeChange(IndividualCandidacyProcessBean processBean) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPrecedentDegreeInformationBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;
        PrecedentDegreeInformationBean bean = candidacyProcessWithPrecedentDegreeInformationBean.getPrecedentDegreeInformation();

        IndividualCandidacyProcess individualCandidacyProcess = processBean.getIndividualCandidacyProcess();
        IndividualCandidacy candidacy = individualCandidacyProcess.getCandidacy();
        PrecedentDegreeInformation pid = candidacy.getRefactoredPrecedentDegreeInformation();

        pid.setPrecedentDegreeDesignation(bean.getDegreeDesignation());
        pid.setPrecedentInstitution(getOrCreateInstitution(bean));
        pid.setNumberOfEnroledCurricularCourses(bean.getNumberOfEnroledCurricularCourses());
        pid.setNumberOfApprovedCurricularCourses(bean.getNumberOfApprovedCurricularCourses());
        pid.setGradeSum(bean.getGradeSum());
        pid.setApprovedEcts(bean.getApprovedEcts());
        pid.setEnroledEcts(bean.getEnroledEcts());
    }
View Full Code Here

    }

    @Override
    protected void createCandidacyPrecedentDegreeInformation(IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean,
            StudentCurricularPlan studentCurricularPlan) {
        final PrecedentDegreeInformationBean info =
                PrecedentDegreeInformationBeanFactory.createBean(studentCurricularPlan, CycleType.FIRST_CYCLE);

        bean.setPrecedentDegreeInformation(info);
    }
View Full Code Here

    }

    private static PrecedentDegreeInformation createForDegreeTransferOrDegreeChange(IndividualCandidacyProcessBean processBean) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPDIBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;
        PrecedentDegreeInformationBean bean = candidacyProcessWithPDIBean.getPrecedentDegreeInformation();

        PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
        pdi.setPrecedentDegreeDesignation(bean.getDegreeDesignation());
        pdi.setNumberOfEnroledCurricularCourses(bean.getNumberOfEnroledCurricularCourses());
        pdi.setNumberOfApprovedCurricularCourses(bean.getNumberOfApprovedCurricularCourses());
        pdi.setGradeSum(bean.getGradeSum());
        pdi.setApprovedEcts(bean.getApprovedEcts());
        pdi.setEnroledEcts(bean.getEnroledEcts());

        if (candidacyProcessWithPDIBean.isExternalPrecedentDegreeType()) {
            pdi.setPrecedentInstitution(getOrCreateInstitution(bean));
            pdi.setNumberOfEnrolmentsInPreviousDegrees(candidacyProcessWithPDIBean
                    .getNumberOfPreviousYearEnrolmentsInPrecedentDegree());
View Full Code Here

    private static PrecedentDegreeInformation createForSecondCycleOrDegreeCandidacyForGraduatedPerson(
            IndividualCandidacyProcessBean processBean) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPrecedentDegreeInformationBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;

        PrecedentDegreeInformationBean bean = candidacyProcessWithPrecedentDegreeInformationBean.getPrecedentDegreeInformation();

        PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
        pdi.setCandidacyInternal(false);
        pdi.setDegreeDesignation(bean.getDegreeDesignation());
        pdi.setInstitution(getOrCreateInstitution(bean));
        pdi.setCountry(bean.getCountry());
        pdi.setConclusionDate(bean.getConclusionDate());

        if (bean.getConclusionDate() != null) {
            pdi.setConclusionYear(bean.getConclusionDate().getYear());
        }

        pdi.setConclusionGrade(bean.getConclusionGrade());

        return pdi;
    }
View Full Code Here

                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;
        IndividualCandidacyProcess individualCandidacyProcess = processBean.getIndividualCandidacyProcess();
        IndividualCandidacy candidacy = individualCandidacyProcess.getCandidacy();
        PrecedentDegreeInformation pid = candidacy.getRefactoredPrecedentDegreeInformation();

        PrecedentDegreeInformationBean bean = candidacyProcessWithPrecedentDegreeInformationBean.getPrecedentDegreeInformation();

        pid.setDegreeDesignation(bean.getDegreeDesignation());
        pid.setInstitution(getOrCreateInstitution(bean));
        pid.setCountry(bean.getCountry());
        pid.setConclusionDate(bean.getConclusionDate());

        if (bean.getConclusionDate() != null) {
            pid.setConclusionYear(bean.getConclusionDate().getYear());
        }

        pid.setConclusionGrade(bean.getConclusionGrade());

    }
View Full Code Here

        DegreeChangeIndividualCandidacyProcess degreeChangeIndividualCandidacyProcess =
                (DegreeChangeIndividualCandidacyProcess) process;
        DegreeChangeIndividualCandidacyProcessBean degreeChangeProcessBean = (DegreeChangeIndividualCandidacyProcessBean) bean;
        LocalDate candidacyDate = bean.getCandidacyDate();
        Degree selectedDegree = degreeChangeProcessBean.getSelectedDegree();
        PrecedentDegreeInformationBean precedentDegreeInformation = degreeChangeProcessBean.getPrecedentDegreeInformation();

        checkParameters(person, degreeChangeIndividualCandidacyProcess, candidacyDate, selectedDegree, precedentDegreeInformation);
    }
View Full Code Here

            final IndividualCandidacyProcessBean bean) {
        DegreeTransferIndividualCandidacyProcessBean transferProcessBean = (DegreeTransferIndividualCandidacyProcessBean) bean;
        DegreeTransferIndividualCandidacyProcess transferProcess = (DegreeTransferIndividualCandidacyProcess) process;
        LocalDate candidacyDate = bean.getCandidacyDate();
        Degree selectedDegree = transferProcessBean.getSelectedDegree();
        PrecedentDegreeInformationBean precedentDegreeInformation = transferProcessBean.getPrecedentDegreeInformation();

        checkParameters(person, transferProcess, candidacyDate, selectedDegree, precedentDegreeInformation);
    }
View Full Code Here

        if (candidacy instanceof DFACandidacy && candidacy.getActiveCandidacySituation().canChangePersonalData()) {

            request.setAttribute("candidacy", candidacy);

            PrecedentDegreeInformation precedentDegreeInformation = ((DFACandidacy) candidacy).getPrecedentDegreeInformation();
            request.setAttribute("precedentDegreeInformation", new PrecedentDegreeInformationBean(precedentDegreeInformation));

            return mapping.findForward("change");
        }

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

    }

    public ActionForward change(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
            throws FenixServiceException {

        PrecedentDegreeInformationBean precedentDegreeInformation =
                (PrecedentDegreeInformationBean) RenderUtils.getViewState("precedentDegreeInformation").getMetaObject()
                        .getObject();

        EditPrecedentDegreeInformation.run(precedentDegreeInformation);

        try {
            StateMachineRunner
                    .run(new StateMachineRunner.RunnerArgs(precedentDegreeInformation.getPrecedentDegreeInformation()
                            .getStudentCandidacy().getActiveCandidacySituation(), CandidacySituationType.STAND_BY_FILLED_DATA
                            .toString()));
        } catch (DomainException e) {
            // Didn't move to next state
        }

        request.setAttribute("candidacy", precedentDegreeInformation.getPrecedentDegreeInformation().getStudentCandidacy());

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

TOP

Related Classes of org.fenixedu.academic.dto.candidacy.PrecedentDegreeInformationBean

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.