Examples of PhdProgramCandidacyProcessBean


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

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        final PhdIndividualProgramProcess individualProgramProcess = bean.getCandidacyHashCode().getIndividualProgramProcess();
        final Person person = individualProgramProcess.getPerson();
        canEditPersonalInformation(request, person);

        PersonBean personBean = bean.getPersonBean();
        final String familyName = personBean.getFamilyNames();
        final String composedName =
                familyName == null || familyName.isEmpty() ? personBean.getGivenNames() : personBean.getGivenNames() + " "
                        + familyName;
        personBean.setName(composedName);

        try {
            ExecuteProcessActivity.run(individualProgramProcess, EditPersonalInformation.class, bean.getPersonBean());
        } catch (final DomainException e) {
            addErrorMessage(request, e.getKey(), e.getArgs());
            request.setAttribute("candidacyBean", bean);
            return mapping.findForward("editPersonalInformation");
        }

        return viewCandidacy(mapping, request, bean.getCandidacyHashCode());
    }
View Full Code Here

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

    @Override
    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();
        }
View Full Code Here

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

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        RenderUtils.invalidateViewState();
        prepareUploadDocumentsAttributes(bean, request);

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

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

    @Override
    public ActionForward uploadDocumentsInvalid(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        request.setAttribute("candidacyBean", bean);
        request.setAttribute("documentByType", getRenderedObject("documentByType"));
        request.setAttribute("candidacyProcessDocuments", bean.getCandidacyHashCode().getIndividualProgramProcess()
                .getCandidacyProcessDocuments());

        if (!RenderUtils.getViewState("documentByType").isValid()) {
            addErrorMessage(request, "error.documentToUpload.not.valid");
        }
        RenderUtils.invalidateViewState();
        validateProcessDocuments(request, bean.getCandidacyHashCode().getIndividualProgramProcess());

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

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

        return Collections.EMPTY_LIST;
    }

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

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

    public ActionForward removeDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramProcessDocument document = getDomainObject(request, "documentId");
        final PhdProgramCandidacyProcess process = (PhdProgramCandidacyProcess) document.getPhdProgramProcess();
        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean(process);
        try {
            ExecuteProcessActivity.run(process,
                    org.fenixedu.academic.domain.phd.candidacy.activities.RemoveCandidacyDocument.class, document);
            addSuccessMessage(request, "message.documents.uploaded.with.success");
View Full Code Here

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

    }

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

        final PhdProgramCandidacyProcessBean candidacyBean = getCandidacyBean();
        request.setAttribute("candidacyBean", candidacyBean);
        request.setAttribute("individualProcessBean", new PhdIndividualProgramProcessBean(candidacyBean.getCandidacyHashCode()
                .getIndividualProgramProcess()));

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

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

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        request.setAttribute("candidacyBean", bean);

        if (bean.getCandidacyHashCode().getIndividualProgramProcess().getGuidingsSet().isEmpty()) {
            bean.setGuidings(createGuidingsMinimumList(bean.getIndividualProgramProcess()));
        } else {
            bean.setGuidings(new ArrayList<PhdParticipantBean>());
            bean.addGuiding(new PhdParticipantBean(bean.getIndividualProgramProcess()));
        }

        RenderUtils.invalidateViewState();
        return mapping.findForward("editCandidacyGuidings");
    }
View Full Code Here

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

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

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

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

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        if (bean.getGuidings().size() > 1) {
            bean.removeGuiding(getIntegerFromRequest(request, "removeIndex").intValue());
        }

        request.setAttribute("candidacyBean", bean);
        RenderUtils.invalidateViewState();
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.