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

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


            HttpServletResponse response) {

        final PhdProgramDocumentUploadBean bean = new PhdProgramDocumentUploadBean();
        bean.setType(PhdIndividualProgramDocumentType.CANDIDACY_REVIEW);

        final PhdProgramCandidacyProcessStateBean stateBean =
                new PhdProgramCandidacyProcessStateBean(getProcess(request).getIndividualProgramProcess());
        stateBean.setState(PhdProgramCandidacyProcessState.WAITING_FOR_SCIENTIFIC_COUNCIL_RATIFICATION);

        request.setAttribute("documentToUpload", bean);
        request.setAttribute("stateBean", stateBean);

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


    }

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

        final PhdProgramCandidacyProcessStateBean stateBean =
                new PhdProgramCandidacyProcessStateBean(getProcess(request).getIndividualProgramProcess());
        request.setAttribute("stateBean", stateBean);
        return mapping.findForward("rejectCandidacyProcess");
    }
View Full Code Here

    }

    public ActionForward prepareRejectCandidacyProcessPostback(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {

        final PhdProgramCandidacyProcessStateBean bean = getRenderedObject("stateBean");
        request.setAttribute("stateBean", bean);

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

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

        try {
            final PhdProgramCandidacyProcessStateBean bean = getRenderedObject("stateBean");
            bean.setState(PhdProgramCandidacyProcessState.REJECTED);
            ExecuteProcessActivity.run(getProcess(request),
                    org.fenixedu.academic.domain.phd.candidacy.activities.RejectCandidacyProcess.class, bean);
        } catch (final DomainException e) {
            addErrorMessage(request, e.getKey(), e.getArgs());
            return rejectCandidacyProcessInvalid(mapping, actionForm, request, response);
View Full Code Here

        return viewIndividualProgramProcess(request, getProcess(request));
    }

    public ActionForward rejectCandidacyProcessInvalid(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcessStateBean bean = getRenderedObject("stateBean");
        request.setAttribute("stateBean", bean);

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

    }

    public ActionForward prepareRequestCandidacyReview(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcess process = getProcess(request);
        final PhdProgramCandidacyProcessStateBean bean =
                new PhdProgramCandidacyProcessStateBean(process.getIndividualProgramProcess());
        bean.setState(PhdProgramCandidacyProcessState.PENDING_FOR_COORDINATOR_OPINION);
        request.setAttribute("stateBean", bean);
        return mapping.findForward("requestCandidacyReview");
    }
View Full Code Here

    }

    private void sendCandidacyToCoordinator(final User userView, final PhdIndividualProgramProcess individualProcess) {
        final PhdProgramCandidacyProcess candidacyProcess = individualProcess.getCandidacyProcess();

        final PhdProgramCandidacyProcessStateBean reviewBean =
                new PhdProgramCandidacyProcessStateBean(candidacyProcess.getIndividualProgramProcess());
        reviewBean.setState(PhdProgramCandidacyProcessState.PENDING_FOR_COORDINATOR_OPINION);
        reviewBean.setGenerateAlert(false);
        ExecuteProcessActivity.run(candidacyProcess,
                org.fenixedu.academic.domain.phd.candidacy.activities.RequestCandidacyReview.class.getSimpleName(), reviewBean);

        final PhdProgramCandidacyProcessStateBean requestRatifyBean = new PhdProgramCandidacyProcessStateBean(individualProcess);
        requestRatifyBean.setGenerateAlert(false);
        requestRatifyBean.setState(PhdProgramCandidacyProcessState.WAITING_FOR_SCIENTIFIC_COUNCIL_RATIFICATION);
        ExecuteProcessActivity.run(candidacyProcess,
                org.fenixedu.academic.domain.phd.candidacy.activities.RequestRatifyCandidacy.class.getSimpleName(),
                requestRatifyBean);
    }
View Full Code Here

        }
    }

    @Override
    protected PhdProgramCandidacyProcess executeActivity(PhdProgramCandidacyProcess process, User userView, Object object) {
        final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
        process.createState(PhdProgramCandidacyProcessState.REJECTED, userView.getPerson(), bean.getRemarks());

        AlertService.alertAcademicOffice(process.getIndividualProgramProcess(), AcademicOperationType.VIEW_PHD_CANDIDACY_ALERTS,
                "message.phd.alert.candidacy.reject.subject", "message.phd.alert.candidacy.reject.body");

        return process;
View Full Code Here

        }
    }

    @Override
    protected PhdProgramCandidacyProcess executeActivity(PhdProgramCandidacyProcess process, User userView, Object object) {
        final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;

        if (!process.getIndividualProgramProcess().getPhdConfigurationIndividualProgramProcess().isMigratedProcess()
                && process.getCandidacyReviewDocuments().isEmpty()) {
            throw new DomainException(
                    "error.phd.candidacy.PhdProgramCandidacyProcess.RequestRatifyCandidacy.candidacy.review.document.is.required");
        }

        process.createState(PhdProgramCandidacyProcessState.WAITING_FOR_SCIENTIFIC_COUNCIL_RATIFICATION, userView.getPerson(),
                bean.getRemarks());

        if (bean.getGenerateAlert()) {
            AlertService.alertAcademicOffice(process.getIndividualProgramProcess(),
                    AcademicOperationType.VIEW_PHD_CANDIDACY_ALERTS, "message.phd.alert.candidacy.request.ratify.subject",
                    "message.phd.alert.candidacy.request.ratify.body");
        }
View Full Code Here

        final PhdIndividualProgramProcess mainProcess = process.getIndividualProgramProcess();
        if (mainProcess.getPhdProgram() == null) {
            throw new DomainException("error.phd.candidacy.PhdProgramCandidacyProcess.RequestCandidacyReview.invalid.phd.program");
        }

        final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
        process.createState(PhdProgramCandidacyProcessState.PENDING_FOR_COORDINATOR_OPINION, userView.getPerson(),
                bean.getRemarks());

        if (bean.getGenerateAlert()) {
            AlertService.alertCoordinators(mainProcess, subject(), body(mainProcess));
        }

        return process;
    }
View Full Code Here

TOP

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

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.