Package org.fenixedu.academic.domain.phd

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


    private String buildGuidingsInformation(final Collection<PhdParticipant> guidings) {
        final StringBuilder result = new StringBuilder();
        List<PhdParticipant> guidingsList = new ArrayList<>(guidings);
        for (int i = 0; i < guidingsList.size(); i++) {
            final PhdParticipant guiding = guidingsList.get(i);
            result.append(guiding.getNameWithTitle());
            if (i == guidings.size() - 2) {
                result.append(" ").append(getMessageFromResource("label.and")).append(" ");
            } else {
                result.append(", ");
            }
View Full Code Here


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

        final String externalId = (String) getFromRequest(request, "removeIndex");
        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        final PhdParticipant guiding = getGuiding(bean.getCandidacyHashCode().getIndividualProgramProcess(), externalId);

        try {
            PhdIndividualProgramProcess individualProgramProcess =
                    getCandidacyBean().getCandidacyHashCode().getIndividualProgramProcess();
            ExecuteProcessActivity.run(individualProgramProcess, DeleteGuiding.class, guiding);
View Full Code Here

        return mapping.findForward("viewPhdParticipants");
    }

    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

    // Upload guidance acceptance document

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

        final PhdIndividualProgramProcess mainProcess = getIndividualProgramProcess();
        final List<PhdParticipant> result = new ArrayList<PhdParticipant>();

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

        return result.toArray(new PhdParticipant[result.size()]);
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());
View Full Code Here

    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdParticipantBean bean = (PhdParticipantBean) object;
        PhdParticipant guiding = process.addGuiding(bean);
        if (bean.getGuidingAcceptanceLetter() != null && bean.getGuidingAcceptanceLetter().getFileContent() != null) {
            PhdProgramDocumentUploadBean acceptanceLetter = bean.getGuidingAcceptanceLetter();
            new PhdGuiderAcceptanceLetter(guiding, acceptanceLetter.getType(), "", bean.getGuidingAcceptanceLetter()
                    .getFileContent(), bean.getGuidingAcceptanceLetter().getFilename(), userView.getPerson());
        }
View Full Code Here

        }
    }

    private void disconnect() {

        final PhdParticipant participant = getParticipant();
        setParticipant(null);
        participant.tryDelete();

        setProcess(null);
        setRootDomainObject(null);
    }
View Full Code Here

            if (!juryElement.isInternal()) {
                createExternalAccess(juryElement);
            }

            final PhdParticipant participant = juryElement.getParticipant();
            sendAlertToJuryElement(process.getIndividualProgramProcess(), participant, bean);
        }
    }
View Full Code Here

            sendAlertToJuryElement(process.getIndividualProgramProcess(), participant, bean);
        }
    }

    private void createExternalAccess(ThesisJuryElement juryElement) {
        final PhdParticipant participant = juryElement.getParticipant();
        participant.addAccessType(PhdProcessAccessType.JURY_REVIEW_DOCUMENTS_DOWNLOAD);
    }
View Full Code Here

TOP

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

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.