Examples of PhdCandidacyPeriod


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

        return null;
    }

    private boolean isOutOfCandidacyPeriod(final PhdProgramPublicCandidacyHashCode hashCode) {
        PhdCandidacyPeriod phdCandidacyPeriod = getPhdCandidacyPeriod(hashCode);
        return phdCandidacyPeriod == null || !phdCandidacyPeriod.contains(new DateTime());
    }
View Full Code Here

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

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

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

        return mapping.findForward("createPhdCandidacyPeriod");
    }

    public ActionForward prepareEditPhdCandidacyPeriod(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdCandidacyPeriod phdCandidacyPeriod = readPhdCandidacyPeriod(request);
        request.setAttribute("phdCandidacyPeriodBean", new PhdCandidacyPeriodBean(phdCandidacyPeriod));
        request.setAttribute("phdCandidacyPeriod", readPhdCandidacyPeriod(request));

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

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

        return mapping.findForward("editPhdCandidacyPeriod");
    }

    public ActionForward editPhdCandidacyPeriod(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdCandidacyPeriod phdCandidacyPeriod = readPhdCandidacyPeriod(request);
        PhdCandidacyPeriodBean bean = readPhdCandidacyPeriodBean();

        try {
            phdCandidacyPeriod.edit(bean.getStart(), bean.getEnd());
        } catch (DomainException e) {
            addActionMessage("error", request, e.getKey(), e.getArgs());
            return editPhdCandidacyPeriodInvalid(mapping, form, request, response);
        }
View Full Code Here

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

        return prepareEditPhdCandidacyPeriod(mapping, form, request, response);
    }

    public ActionForward view(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        PhdCandidacyPeriod period = readPhdCandidacyPeriod(request);

        request.setAttribute("phdCandidacyPeriod", period);

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

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

        return null;
    }

    private boolean isOutOfCandidacyPeriod(final PhdProgramPublicCandidacyHashCode hashCode) {
        final PhdCandidacyPeriod period = getPhdCandidacyPeriod(hashCode);
        return period == null || !period.contains(new DateTime());
    }
View Full Code Here

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

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

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

        return getReferee().getLetter() != null || candidacyPeriodIsOver();
    }

    private boolean candidacyPeriodIsOver() {
        final LocalDate candidacyDate = getReferee().getPhdProgramCandidacyProcess().getCandidacyDate();
        final PhdCandidacyPeriod period = getReferee().getPhdProgramCandidacyProcess().getPublicPhdCandidacyPeriod();
        return new DateTime().isAfter(period.getEnd());
    }
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.