Examples of PhdProgramCandidacyProcessBean


Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

    @Override
    public Object provide(Object source, Object currentValue) {

        if (source instanceof PhdProgramCandidacyProcessBean) {
            PhdProgramCandidacyProcessBean bean = (PhdProgramCandidacyProcessBean) source;
            if (bean.getFocusArea() == null) {
                return Collections.EMPTY_LIST;
            }

            return bean.getFocusArea().getPhdProgramsSet();
        }

        if (source instanceof PhdIndividualProgramProcessBean) {
            PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) source;
            if (bean.getFocusArea() == null) {
                return Collections.EMPTY_LIST;
            }

            return bean.getFocusArea().getPhdProgramsSet();
        }

        return null;

    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(hash);
        if (hashCode != null) {
            return viewCandidacy(mapping, form, request, response, hashCode);
        }

        request.setAttribute("candidacyBean", new PhdProgramCandidacyProcessBean());

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

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

        return mapping.findForward("createIdentification");
    }

    public ActionForward createIdentification(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        if (bean == null) {
            return prepareCreateIdentification(mapping, form, request, response);
        }
        final PhdProgramPublicCandidacyHashCode hashCode =
                PhdProgramPublicCandidacyHashCode.getOrCreatePhdProgramCandidacyHashCode(bean.getEmail());

        if (hashCode.hasCandidacyProcess()
                && hashCode.getPhdProgramCandidacyProcess().getCandidacy().getDegreeCurricularPlan()
                        .equals(bean.getProcess().getCandidacy().getDegreeCurricularPlan())) {
            addErrorMessage(request, "error.PhdProgramPublicCandidacyHashCode.already.has.candidacy");
            return prepareCreateIdentification(mapping, form, request, response);
        }

        sendSubmissionEmailForCandidacy(hashCode, request);
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

    /*
     * Identification recovery
     */
    public ActionForward prepareIdentificationRecovery(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        request.setAttribute("candidacyBean", new PhdProgramCandidacyProcessBean());
        return mapping.findForward("identificationRecovery");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

        return mapping.findForward("identificationRecovery");
    }

    public ActionForward identificationRecovery(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        final PhdProgramPublicCandidacyHashCode hashCode =
                PhdProgramPublicCandidacyHashCode.getPhdProgramCandidacyHashCode(bean.getEmail(), bean.getProgram());

        if (hashCode != null) {
            if (hashCode.hasCandidacyProcess()) {
                sendRecoveryEmailForCandidate(hashCode, request);
            } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

        if (hashCode.hasCandidacyProcess()) {
            return viewCandidacy(mapping, form, request, response, hashCode);
        }

        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean();
        PhdCandidacyPeriod phdCandidacyPeriod = getPhdCandidacyPeriod(hashCode);

        bean.setPersonBean(new PersonBean());
        bean.getPersonBean().setEmail(hashCode.getEmail());
        bean.setCandidacyHashCode(hashCode);
        bean.setExecutionYear(phdCandidacyPeriod.getExecutionInterval());
        bean.setState(PhdProgramCandidacyProcessState.PRE_CANDIDATE);
        bean.setMigratedProcess(Boolean.FALSE);
        bean.setPhdCandidacyPeriod(phdCandidacyPeriod);

        request.setAttribute("candidacyBean", bean);

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

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

        if (checkPersonalDataForward != null) {
            return checkPersonalDataForward;
        }

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        if (PhdProgramPublicCandidacyHashCode.getPhdProgramCandidacyHashCode(bean.getCandidacyHashCode().getEmail(),
                bean.getProgram()) != null) {
            addErrorMessage(request, "error.PhdProgramPublicCandidacyHashCode.already.has.candidacy");
            return fillPersonalDataInvalid(mapping, form, request, response);
        }
        PhdIndividualProgramProcess process =
                (PhdIndividualProgramProcess) CreateNewProcess.run(PublicPhdIndividualProgramProcess.class, bean);
        sendApplicationSuccessfullySubmitedEmail(bean.getCandidacyHashCode(), request);

        request.setAttribute("phdIndividualProgramProcess", process);
        request.setAttribute("candidacyHashCode", bean.getCandidacyHashCode());

        PhdProgramPublicCandidacyHashCode candidacyProcessHashCode = process.getCandidacyProcessHashCode();
        String processLink =
                InstitutionPhdCandidacyProcessProperties.getPublicCandidacyAccessLink(candidacyProcessHashCode, I18N.getLocale());
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(hash);
        if (hashCode != null) {
            return viewCandidacy(mapping, request, hashCode);
        }

        request.setAttribute("candidacyBean", new PhdProgramCandidacyProcessBean());
        return mapping.findForward("createCandidacyIdentification");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        final PhdProgramPublicCandidacyHashCode hashCode =
                PhdProgramPublicCandidacyHashCode.getOrCreatePhdProgramCandidacyHashCode(bean.getEmail());

        if (hashCode.hasCandidacyProcess()) {
            addErrorMessage(request, "error.PhdProgramPublicCandidacyHashCode.already.has.candidacy");
            return prepareCreateCandidacyIdentification(mapping, actionForm, request, response);
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.candidacy.PhdProgramCandidacyProcessBean

     */

    public ActionForward prepareEditPersonalData(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcess process = getProcess(request);
        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean(process);
        Person person = process.getPerson();
        PersonBean personBean = new PersonBean(person);
        bean.setPersonBean(personBean);

        /* TODO: UGLY HACK DUE TO PENDING VALIDATION DATA FOR PERSON */
        initPersonBeanUglyHack(personBean, person);

        canEditCandidacy(request, process.getCandidacyHashCode());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.