Package org.fenixedu.academic.domain.candidacyProcess

Examples of org.fenixedu.academic.domain.candidacyProcess.IndividualCandidacyProcessWithPrecedentDegreeInformationBean


        ActionForward actionForwardError = verifySubmissionPreconditions(mapping);
        if (actionForwardError != null) {
            return actionForwardError;
        }

        final IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) getIndividualCandidacyProcessBean();

        StudentCurricularPlan studentCurricularPlan = bean.getLastPrecedentStudentCurricularPlan();

        if (studentCurricularPlan == null) {
            addActionMessage("candidacyMessages", request, "error.public.candidacies.message.no.student.curricular.plan", null);
        } else {
            if (studentCurricularPlan.getRegistration().isTransited()) {
                addActionMessage("candidacyMessages", request, "error.public.candidacies.message.no.student.curricular.plan",
                        null);
            } else {
                bean.setPrecedentDegreeType(PrecedentDegreeType.INSTITUTION_DEGREE);
                bean.setPrecedentStudentCurricularPlan(studentCurricularPlan);
                createCandidacyPrecedentDegreeInformation(bean, bean.getPrecedentStudentCurricularPlan());
            }
        }

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        return mapping.findForward("candidacy-continue-creation");
View Full Code Here


        ActionForward actionForwardError = verifySubmissionPreconditions(mapping);
        if (actionForwardError != null) {
            return actionForwardError;
        }

        final IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) getIndividualCandidacyProcessBean();
        bean.setPrecedentDegreeType(PrecedentDegreeType.EXTERNAL_DEGREE);
        bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        return mapping.findForward("candidacy-continue-creation");
    }
View Full Code Here

    public ActionForward fillPrecedentInformationPostback(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {

        // assuming that when using this method each individual candidacy bean
        // extends IndividualCandidacyProcessWithPrecedentDegreeInformationBean
        final IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) getIndividualCandidacyProcessBean();
        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) {
                    createCandidacyPrecedentDegreeInformation(bean, scps.iterator().next());
                    bean.setPrecedentStudentCurricularPlan(scps.iterator().next());
                }
            }
        }

        return mapping.findForward("fill-candidacy-information");
View Full Code Here

    public ActionForward fillPrecedentInformationStudentCurricularPlanPostback(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {

        // assuming that when using this method each individual candidacy bean
        // extends IndividualCandidacyProcessWithPrecedentDegreeInformationBean
        final IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) getIndividualCandidacyProcessBean();
        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);

        if (bean.hasPrecedentStudentCurricularPlan()) {
            createCandidacyPrecedentDegreeInformation(bean, bean.getPrecedentStudentCurricularPlan());
        }

        RenderUtils.invalidateViewState();
        return mapping.findForward("fill-candidacy-information");
    }
View Full Code Here

public class PrecedentStudentCurricularPlansProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        final IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) source;
        return bean.getPrecedentStudentCurricularPlans();
    }
View Full Code Here

public class DegreeChangePublicIndividualCandidacyDegreesProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) source;

        if (bean.getCandidacyProcess() != null) {
            return bean.getCandidacyProcess().getDegreeSet();
        } else {
            return bean.getIndividualCandidacyProcess().getCandidacyProcess().getDegreeSet();
        }
    }
View Full Code Here

        });
    }

    private Collection<Degree> getDegrees(Object source) {
        if (source instanceof IndividualCandidacyProcessWithPrecedentDegreeInformationBean) {
            IndividualCandidacyProcessWithPrecedentDegreeInformationBean bean =
                    (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) source;

            if (bean.getCandidacyProcess() != null) {
                return bean.getCandidacyProcess().getDegreeSet();
            } else {
                return bean.getIndividualCandidacyProcess().getCandidacyProcess().getDegreeSet();
            }
        }
        if (source instanceof ChooseDegreeBean) {
            final ChooseDegreeBean bean = (ChooseDegreeBean) source;
            final CandidacyProcess candidacyProcess = bean.getCandidacyProcess();
            if (candidacyProcess instanceof DegreeCandidacyForGraduatedPersonProcess) {
                final DegreeCandidacyForGraduatedPersonProcess candidacyForGraduatedPersonProcess =
                        (DegreeCandidacyForGraduatedPersonProcess) candidacyProcess;
                return candidacyForGraduatedPersonProcess.getAvailableDegrees();
            }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.candidacyProcess.IndividualCandidacyProcessWithPrecedentDegreeInformationBean

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.