Examples of PhdProgramPublicCandidacyHashCode


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

            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);

        String url =
                String.format("%s?hash=%s",
                        InstitutionPhdCandidacyProcessProperties.getPublicCandidacySubmissionLink(I18N.getLocale()),
                        hashCode.getValue());

        request.setAttribute("processLink", url);

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

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

    }

    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 {
                sendSubmissionEmailForCandidacy(hashCode, request);
            }
        }
View Full Code Here

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

        return mapping.findForward("applicationSubmissionGuide");
    }

    public ActionForward prepareFillPersonalData(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramPublicCandidacyHashCode hashCode =
                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(request
                        .getParameter("hash"));

        if (hashCode == null) {
            return prepareCreateIdentification(mapping, form, request, response);
        }

        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);
View Full Code Here

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

        sendApplicationSuccessfullySubmitedEmail(bean.getCandidacyHashCode(), request);

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

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

        request.setAttribute("processLink", processLink);
View Full Code Here

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

        final Statistics statistics = new Statistics();

        final List<PublicPhdCandidacyBean> candidacyHashCodes = new ArrayList<PublicPhdCandidacyBean>();
        for (final PublicCandidacyHashCode hashCode : Bennu.getInstance().getCandidacyHashCodesSet()) {
            if (hashCode.isFromPhdProgram()) {
                final PhdProgramPublicCandidacyHashCode phdHashCode = (PhdProgramPublicCandidacyHashCode) hashCode;

                PhdCandidacyPeriod phdCandidacyPeriod = selectPeriodBean.getPhdCandidacyPeriod();

                if (phdHashCode.getPhdProgramCandidacyProcess() == null) {

                    if (phdCandidacyPeriod.contains(phdHashCode.getWhenCreated())) {
                        statistics.plusTotalRequests();
                        candidacyHashCodes.add(new PublicPhdCandidacyBean(phdHashCode));
                    }

                    continue;
                }

                PhdIndividualProgramProcess individualProgramProcess = phdHashCode.getIndividualProgramProcess();

                if (individualProgramProcess.getExecutionYear() != ExecutionYear.readCurrentExecutionYear()) {
                    continue;
                }

                if (!PhdIndividualProgramCollaborationType.EPFL.equals(individualProgramProcess.getCollaborationType())) {
                    continue;
                }

                if (!PhdIndividualProgramProcessState.CANDIDACY.equals(individualProgramProcess.getActiveState())) {
                    continue;
                }

                if (phdHashCode.hasCandidacyProcess()) {
                    statistics.plusTotalCandidates();
                }

                if (phdHashCode.hasCandidacyProcess() && phdHashCode.getPhdProgramCandidacyProcess().isValidatedByCandidate()) {
                    statistics.plusTotalValidated();
                }

                candidacyHashCodes.add(new PublicPhdCandidacyBean(phdHashCode));
            }
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.