Package org.fenixedu.academic.domain.phd

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


public class PhdProgramsProviderForEditDetails extends AbstractDomainObjectProvider {

    @Override
    public Object provide(Object source, Object current) {
        final PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) source;
        return bean.hasFocusArea() ? bean.getFocusArea().getPhdProgramsSet() : Bennu.getInstance().getPhdProgramsSet();
    }
View Full Code Here


        return result;
    }

    public ActionForward prepareFillRemarksOnTransfer(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdIndividualProgramProcessBean bean = new PhdIndividualProgramProcessBean(getProcess(request));

        bean.setDestiny((PhdIndividualProgramProcess) getDomainObject(request, "destinyId"));
        request.setAttribute("phdIndividualProgramProcessBean", bean);

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

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

        try {
            PhdIndividualProgramProcessBean bean = getRenderedObject("phdIndividualProgramProcessBean");
            ExecuteProcessActivity.run(getProcess(request), TransferToAnotherProcess.class, bean);
        } catch (DomainException e) {
            addErrorMessage(request, e.getKey(), e.getArgs());
            return transferProcessInvalid(mapping, form, request, response);
        }
View Full Code Here

        ExecuteProcessActivity.run(candidacyProcess,
                org.fenixedu.academic.domain.phd.candidacy.activities.RatifyCandidacy.class.getSimpleName(), ratifyBean);
    }

    private void formalizeRegistration(final User userView, final PhdIndividualProgramProcess individualProcess) {
        final PhdIndividualProgramProcessBean individualProcessBean = new PhdIndividualProgramProcessBean(individualProcess);
        individualProcessBean.setQualificationExamsPerformed(QualificationExamsResult.NO);
        individualProcessBean.setQualificationExamsRequired(QualificationExamsResult.NO);
        ExecuteProcessActivity.run(individualProcess, EditQualificationExams.class.getSimpleName(), individualProcessBean);

        final PhdStudyPlanBean planBean = new PhdStudyPlanBean(individualProcess);
        planBean.setExempted(true);
        ExecuteProcessActivity.run(individualProcess, AddStudyPlan.class.getSimpleName(), planBean);
View Full Code Here

        ExecuteProcessActivity.run(thesisProcess, SetFinalGrade.class, thesisBean);
    }

    private void cancelPhdProgram(final User userView, final PhdIndividualProgramProcess individualProcess,
            LocalDate anullmentDate) {
        final PhdIndividualProgramProcessBean processBean = new PhdIndividualProgramProcessBean(individualProcess);
        processBean.setStateDate(anullmentDate);
        ExecuteProcessActivity.run(individualProcess, CancelPhdProgramProcess.class.getSimpleName(), processBean);
    }
View Full Code Here

    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) object;

        DateTime stateDate = bean.getStateDate().toDateTimeAtStartOfDay();
        PhdProgramProcessState.createWithGivenStateDate(process, PhdIndividualProgramProcessState.FLUNKED, userView.getPerson(),
                "", stateDate);

        process.cancelDebts(userView.getPerson());
View Full Code Here

    }

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

        /*
         * 1 - Check if there's no registration 2 - Check if last active state
         * was candidacy
         */
        if (process.getRegistration() != null) {
            throw new DomainException("error.PhdIndividualProgramProcess.set.candidacy.state.has.registration");
        }

        if (!process.getLastActiveState().getType().equals(PhdIndividualProgramProcessState.CANDIDACY)) {
            throw new DomainException(
                    "error.PhdIndividualProgramProcess.set.candidacy.state.previous.active.state.is.not.candidacy");
        }

        PhdProgramProcessState.createWithGivenStateDate(process, process.getLastActiveState().getType(), userView.getPerson(),
                "", bean.getStateDate().toDateTimeAtStartOfDay());

        return process;
    }
View Full Code Here

    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) object;

        DateTime stateDate = bean.getStateDate().toDateTimeAtStartOfDay();
        PhdProgramProcessState.createWithGivenStateDate(process, PhdIndividualProgramProcessState.SUSPENDED,
                userView.getPerson(), "", stateDate);

        process.cancelDebts(userView.getPerson());
View Full Code Here

    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) object;
        DateTime stateDate = bean.getStateDate().toDateTimeAtStartOfDay();

        PhdProgramProcessState.createWithGivenStateDate(process, PhdIndividualProgramProcessState.NOT_ADMITTED,
                userView.getPerson(), "", stateDate);

        process.cancelDebts(userView.getPerson());
View Full Code Here

        }
    }

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {
        PhdIndividualProgramProcessBean bean = (PhdIndividualProgramProcessBean) object;
        process.transferToAnotherProcess(bean.getDestiny(), userView.getPerson(), bean.getRemarks());

        return process;
    }
View Full Code Here

TOP

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

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.