Package org.fenixedu.academic.domain.phd.candidacy

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


    }

    protected Object fromFocusArea(Object source) {
        PhdProgramCandidacyProcessBean bean = (PhdProgramCandidacyProcessBean) source;
        List<PhdProgram> activePhdProgramList = new ArrayList<PhdProgram>();
        InstitutionPhdCandidacyPeriod phdCandidacyPeriod = (InstitutionPhdCandidacyPeriod) bean.getPhdCandidacyPeriod();

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

        for (PhdProgram phdProgram : bean.getFocusArea().getPhdProgramsSet()) {
            if (phdCandidacyPeriod.getPhdProgramsSet().contains(phdProgram)) {
                activePhdProgramList.add(phdProgram);
            }
        }

        return activePhdProgramList;
View Full Code Here


        if (source instanceof PhdProgramCandidacyProcessBean) {
            PhdProgramCandidacyProcessBean bean = (PhdProgramCandidacyProcessBean) source;

            Set<PhdProgramFocusArea> focusAreaSet = new HashSet<PhdProgramFocusArea>();
            InstitutionPhdCandidacyPeriod phdCandidacyPeriod = (InstitutionPhdCandidacyPeriod) bean.getPhdCandidacyPeriod();

            for (PhdProgram phdProgram : phdCandidacyPeriod.getPhdProgramsSet()) {
                focusAreaSet.addAll(phdProgram.getPhdProgramFocusAreasSet());
            }

            List<PhdProgramFocusArea> focusAreaList = new ArrayList<PhdProgramFocusArea>();
            focusAreaList.addAll(focusAreaSet);

            return focusAreaList;

        } else if (source instanceof PhdIndividualProgramProcessBean) {
            PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) source;
            Set<PhdProgramFocusArea> focusAreaSet = new HashSet<PhdProgramFocusArea>();

            InstitutionPhdCandidacyPeriod phdCandidacyPeriod =
                    (InstitutionPhdCandidacyPeriod) bean.getIndividualProgramProcess().getCandidacyProcess()
                            .getPublicPhdCandidacyPeriod();

            for (PhdProgram phdProgram : phdCandidacyPeriod.getPhdProgramsSet()) {
                focusAreaSet.addAll(phdProgram.getPhdProgramFocusAreasSet());
            }

            List<PhdProgramFocusArea> focusAreaList = new ArrayList<PhdProgramFocusArea>();
            focusAreaList.addAll(focusAreaSet);
View Full Code Here

        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();
                request.setAttribute("candidacyPeriod", getPhdCandidacyPeriod(hashCode));
                request.setAttribute("nextCandidacyPeriod", nextCandidacyPeriod);
                return mapping.findForward("outOfCandidacyPeriod");
            }
        }
View Full Code Here

    }

    public ActionForward addPhdProgram(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdCandidacyPeriodBean phdCandidacyPeriodBean = readPhdCandidacyPeriodBean();
        InstitutionPhdCandidacyPeriod phdCandidacyPeriod = (InstitutionPhdCandidacyPeriod) readPhdCandidacyPeriod(request);

        phdCandidacyPeriod.addPhdProgramListToPeriod(phdCandidacyPeriodBean.getPhdProgramList());

        return prepareEditPhdCandidacyPeriod(mapping, form, request, response);
    }
View Full Code Here

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

    public ActionForward removePhdProgram(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        InstitutionPhdCandidacyPeriod phdCandidacyPeriod = (InstitutionPhdCandidacyPeriod) readPhdCandidacyPeriod(request);
        phdCandidacyPeriod.removePhdProgramInPeriod(readPhdProgram(request));

        return prepareEditPhdCandidacyPeriod(mapping, form, request, response);
    }
View Full Code Here

    public Object provide(Object source, Object current) {
        // return fromFocusArea(source);

        if (source instanceof PhdProgramCandidacyProcessBean) {
            PhdProgramCandidacyProcessBean bean = (PhdProgramCandidacyProcessBean) source;
            InstitutionPhdCandidacyPeriod phdCandidacyPeriod = (InstitutionPhdCandidacyPeriod) bean.getPhdCandidacyPeriod();

            return phdCandidacyPeriod.getPhdProgramsSet();

        } else if (source instanceof PhdIndividualProgramProcessBean) {
            PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) source;
            InstitutionPhdCandidacyPeriod publicPhdCandidacyPeriod =
                    (InstitutionPhdCandidacyPeriod) bean.getIndividualProgramProcess().getCandidacyProcess()
                            .getPublicPhdCandidacyPeriod();

            return publicPhdCandidacyPeriod.getPhdProgramsSet();
        }

        return Collections.EMPTY_LIST;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.phd.candidacy.InstitutionPhdCandidacyPeriod

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.