Examples of PhdProgramPublicCandidacyHashCode


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

    }

    @Override
    protected ActionForward filterDispatchMethod(final PhdProgramCandidacyProcessBean bean, ActionMapping mapping,
            ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception {
        final PhdProgramPublicCandidacyHashCode hashCode = (bean != null ? bean.getCandidacyHashCode() : null);
        final String methodName = getMethodName(mapping, actionForm, request, response, mapping.getParameter());

        if (methodName == null || !DO_NOT_VALIDATE_CANDIDACY_PERIOD_IN_METHODS.contains(methodName)) {
            if (isOutOfCandidacyPeriod(hashCode)) {
                request.setAttribute("candidacyPeriod", getPhdCandidacyPeriod(hashCode));
View Full Code Here

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

    @EntryPoint
    public ActionForward prepareCreateCandidacyIdentification(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {

        final String hash = request.getParameter("hash");
        final PhdProgramPublicCandidacyHashCode hashCode =
                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(hash);
        if (hashCode != null) {
            return viewCandidacy(mapping, request, hashCode);
        }
View Full Code Here

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

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

        sendSubmissionEmailForCandidacy(hashCode, request);

        String url =
                String.format("%s?hash=%s", EPFLPhdCandidacyProcessProperties.getConfiguration()
                        .getPublicCandidacySubmissionLink(), hashCode.getValue());

        request.setAttribute("processLink", url);

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

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

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

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

        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

    }

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

        final PhdProgramPublicCandidacyHashCode hashCode =
                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(request
                        .getParameter("hash"));

        if (hashCode == null) {
            return mapping.findForward("createCandidacyStepOne");
        }

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

        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean();
        bean.setPersonBean(new PersonBean());
        bean.getPersonBean().setEmail(hashCode.getEmail());
        bean.setCandidacyHashCode(hashCode);
        bean.setExecutionYear(ExecutionYear.readCurrentExecutionYear());
        bean.setCollaborationType(PhdIndividualProgramCollaborationType.EPFL);
        bean.setState(PhdProgramCandidacyProcessState.PRE_CANDIDATE);
        bean.setMigratedProcess(Boolean.FALSE);
View Full Code Here

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

                new TreeMap<PhdProgramFocusArea, Set<PhdProgramPublicCandidacyHashCode>>(PhdProgramFocusArea.COMPARATOR_BY_NAME);

        for (final PublicCandidacyHashCode hashCode : Bennu.getInstance().getCandidacyHashCodesSet()) {
            if (hashCode.isFromPhdProgram() && hashCode.hasCandidacyProcess()) {

                final PhdProgramPublicCandidacyHashCode phdHashCode = (PhdProgramPublicCandidacyHashCode) hashCode;

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

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

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

//                if (phdHashCode.getPhdProgramCandidacyProcess().isValidatedByCandidate()) {
                addCandidate(unfocusAreaCandidates, candidates, phdHashCode);
View Full Code Here

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

        writeResponse(response, presentationPage, "text/html");
    }

    private void displayCandidatePage(HttpServletRequest request, HttpServletResponse response) throws IOException {
        final String hashCode = request.getParameter("process");
        final PhdProgramPublicCandidacyHashCode code =
                (PhdProgramPublicCandidacyHashCode) PhdProgramPublicCandidacyHashCode.getPublicCandidacyCodeByHash(hashCode);
        final byte[] candidatePage = ExportPhdIndividualProgramProcessesInHtml.drawCandidatePage(code);
        writeResponse(response, candidatePage, "text/html");
    }
View Full Code Here

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

        writeResponse(response, refereePage, "text/html");
    }

    private void downloadCandidateDocuments(HttpServletRequest request, HttpServletResponse response) throws IOException {
        final String candidateOid = request.getParameter("candidateOid");
        final PhdProgramPublicCandidacyHashCode code = FenixFramework.getDomainObject(candidateOid);
        final byte[] documents = ExportPhdIndividualProgramProcessesInHtml.createZip(code);
        final String email = code.getEmail().substring(0, code.getEmail().indexOf("@"));
        final String documentName = email + "-documents.zip";
        response.addHeader("Content-Disposition", "attachment; filename=" + documentName);
        writeResponse(response, documents, "application/zip");
    }
View Full Code Here

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

    "createRefereeLetter");

    @Override
    protected ActionForward filterDispatchMethod(final PhdProgramCandidacyProcessBean bean, ActionMapping mapping,
            ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception {
        final PhdProgramPublicCandidacyHashCode hashCode = (bean != null ? bean.getCandidacyHashCode() : null);
        final String methodName = getMethodName(mapping, actionForm, request, response, mapping.getParameter());

        if (methodName == null || !DO_NOT_VALIDATE_CANDIDACY_PERIOD_IN_METHODS.contains(methodName)) {
            if (isOutOfCandidacyPeriod(hashCode)) {
                InstitutionPhdCandidacyPeriod nextCandidacyPeriod = InstitutionPhdCandidacyPeriod.readNextCandidacyPeriod();
View Full Code Here

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

     */
    @EntryPoint
    public ActionForward prepareCreateIdentification(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final String hash = request.getParameter("hash");
        final PhdProgramPublicCandidacyHashCode hashCode =
                (PhdProgramPublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(hash);
        if (hashCode != null) {
            return viewCandidacy(mapping, form, request, response, hashCode);
        }

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.