Package org.fenixedu.academic.domain.phd

Examples of org.fenixedu.academic.domain.phd.PhdParticipantBean


    }

    public ActionForward prepareEditPhdParticipant(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdParticipant phdParticipant = getDomainObject(request, "phdParticipantId");
        PhdParticipantBean bean = new PhdParticipantBean(phdParticipant);
        request.setAttribute("phdParticipantBean", bean);

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


        return mapping.findForward("editPhdParticipant");
    }

    public ActionForward editPhdParticipant(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdParticipantBean bean = getRenderedObject("phdParticipantBean");
        ExecuteProcessActivity.run(getProcess(request), EditPhdParticipant.class, bean);

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

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

    public ActionForward editPhdParticipantInvalid(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdParticipantBean bean = getRenderedObject("phdParticipantBean");
        request.setAttribute("phdParticipantBean", bean);

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

    public ActionForward prepareUploadGuidanceAcceptanceLetter(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        PhdIndividualProgramProcess process = getDomainObject(request, "processId");
        PhdParticipant guider = getDomainObject(request, "guidingId");

        PhdParticipantBean guidingBean = new PhdParticipantBean(guider);
        PhdProgramDocumentUploadBean guidingAcceptanceLetter = new PhdProgramDocumentUploadBean();
        guidingAcceptanceLetter.setType(PhdIndividualProgramDocumentType.GUIDER_ACCEPTANCE_LETTER);
        guidingBean.setGuidingAcceptanceLetter(guidingAcceptanceLetter);

        request.setAttribute("process", process);
        request.setAttribute("guidingBean", guidingBean);

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

    }

    public ActionForward uploadGuidanceAcceptanceLetter(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdIndividualProgramProcess process = getDomainObject(request, "processId");
        PhdParticipantBean guidingBean = getRenderedObject("guidingBean");

        ExecuteProcessActivity.run(process, UploadGuidanceAcceptanceLetter.class, guidingBean);

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

        }

    }

    private PhdParticipantBean getExternalPhdParticipantBean(final PhdIndividualProgramProcess individualProcess) {
        final PhdParticipantBean participantBean = new PhdParticipantBean();
        participantBean.setParticipantType(PhdParticipantType.EXTERNAL);
        participantBean.setParticipantSelectType(PhdParticipantSelectType.NEW);
        participantBean.setIndividualProgramProcess(individualProcess);
        participantBean.setName(getGuidingBean().getName());
        participantBean.setWorkLocation(getInstitution());
        participantBean.setInstitution(getInstitution());

        return participantBean;
    }
View Full Code Here

        return participantBean;
    }

    private PhdParticipantBean getInternalPhdParticipantBean(final PhdIndividualProgramProcess individualProcess) {
        final PhdParticipantBean participantBean = new PhdParticipantBean();
        participantBean.setIndividualProgramProcess(individualProcess);
        final Teacher teacher = User.findByUsername(getGuidingBean().getTeacherId()).getPerson().getTeacher();

        if (teacher == null) {
            throw new PhdMigrationGuidingNotFoundException("The guiding is not present in the system as a teacher");
        }

        for (PhdParticipant existingParticipant : individualProcess.getParticipantsSet()) {
            if (!existingParticipant.isInternal()) {
                continue;
            }

            final InternalPhdParticipant existingInternalParticipant = (InternalPhdParticipant) existingParticipant;
            final Person existingInternalPerson = existingInternalParticipant.getPerson();

            if (teacher.getPerson() == existingInternalPerson) {
                // The guider is already associated with the process
                participantBean.setInternalParticipant(teacher.getPerson());
                participantBean.setParticipant(existingParticipant);
                participantBean.setParticipantSelectType(PhdParticipantSelectType.EXISTING);

                return participantBean;
            }
        }

        // The guiding is in the system as teacher, but not yet associated with
        // the process
        participantBean.setParticipantSelectType(PhdParticipantSelectType.NEW);
        participantBean.setInternalParticipant(teacher.getPerson());
        participantBean.setInstitution(getInstitution());
        participantBean.setWorkLocation(getInstitution());
        return participantBean;
    }
View Full Code Here

                new PublicPresentationSeminarProcessBean());

        if (!StringUtils.isEmpty(getProcessBean().getGuiderId())) {
            final PhdMigrationGuiding migrationGuiding = getGuiding(getProcessBean().getGuiderId());
            if (migrationGuiding != null) {
                final PhdParticipantBean guidingBean = migrationGuiding.getPhdParticipantBean(individualProcess);
                ExecuteProcessActivity.run(individualProcess, AddGuidingInformation.class.getSimpleName(), guidingBean);
            }
        }

        if (!StringUtils.isEmpty(getProcessBean().getAssistantGuiderId())) {
            final PhdMigrationGuiding migrationAssistantGuiding = getGuiding(getProcessBean().getAssistantGuiderId());
            if (migrationAssistantGuiding != null) {
                final PhdParticipantBean assistantGuidingBean =
                        migrationAssistantGuiding.getPhdParticipantBean(individualProcess);
                ExecuteProcessActivity.run(individualProcess, AddAssistantGuidingInformation.class.getSimpleName(),
                        assistantGuidingBean);
            }
        }
View Full Code Here

        for (final Person person : mainProcess.getCoordinatorsFor(ExecutionYear.readCurrentExecutionYear())) {

            final PhdParticipant participant = mainProcess.getParticipant(person);

            if (participant == null) {
                result.add(PhdParticipant.getUpdatedOrCreate(mainProcess, new PhdParticipantBean().setInternalParticipant(person)));

            } else if (participant.getCandidacyFeedbackRequestElementsSet().isEmpty()) {
                result.add(participant);
            }
        }
View Full Code Here

        }
    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdParticipantBean guidingBean = (PhdParticipantBean) object;
        PhdParticipant guiding = guidingBean.getParticipant();
        PhdProgramDocumentUploadBean acceptanceLetter = guidingBean.getGuidingAcceptanceLetter();

        new PhdGuiderAcceptanceLetter(guiding, acceptanceLetter.getType(), "", acceptanceLetter.getFileContent(),
                acceptanceLetter.getFilename(), userView.getPerson());

        return process;
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.phd.PhdParticipantBean

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.