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

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


            return mapping.findForward("createCandidacyStepOne");
        }

        PhdIndividualProgramProcess phdProcess = hashCode.getIndividualProgramProcess();

        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean();
        bean.setCandidacyHashCode(hashCode);

        request.setAttribute("candidacyBean", bean);
        request.setAttribute("individualProgramProcess", phdProcess);
        canEditCandidacy(request, bean.getCandidacyHashCode());
        canEditPersonalInformation(request, hashCode.getPerson());

        PersonBean personBean = new PersonBean(phdProcess.getPerson());
        initPersonBean(personBean, phdProcess.getPerson());
        request.setAttribute("personBean", personBean);
View Full Code Here


    }

    public ActionForward prepareEditPersonalInformation(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);
        bean.setPersonBean(new PersonBean(person));

        /* TODO: UGLY HACK DUE TO PENDING VALIDATION DATA FOR PERSON */
        initPersonBean(bean.getPersonBean(), person);

        request.setAttribute("candidacyBean", bean);

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

    }

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

        final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
        canEditPersonalInformation(request, bean.getPersonBean().getPerson());
        request.setAttribute("candidacyBean", bean);
        return mapping.findForward("editPersonalInformation");
    }
View Full Code Here

public class ActivePhdProgramsOnExecutionYearProvider extends AbstractDomainObjectProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        PhdProgramCandidacyProcessBean bean = (PhdProgramCandidacyProcessBean) source;

        if (bean.getExecutionYear() == null) {
            return Collections.EMPTY_LIST;
        }

        List<PhdProgram> phdProgramsList = new ArrayList<PhdProgram>();

        for (PhdProgram phdProgram : AcademicAccessRule.getPhdProgramsAccessibleToFunction(
                AcademicOperationType.MANAGE_PHD_PROCESSES, Authenticate.getUser()).collect(Collectors.toSet())) {
            if (phdProgram.isActive(bean.getExecutionYear())) {
                phdProgramsList.add(phdProgram);
            }
        }

        return phdProgramsList;
View Full Code Here

    // Create Candidacy Steps

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

        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean();
        bean.setState(PhdProgramCandidacyProcessState.STAND_BY_WITH_MISSING_INFORMATION);
        bean.setPersonBean(new PersonBean());
        bean.setChoosePersonBean(new ChoosePersonBean());

        request.setAttribute("createCandidacyBean", bean);
        request.setAttribute("persons", Collections.emptyList());

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

    }

    public ActionForward searchPerson(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        final PhdProgramCandidacyProcessBean bean = getCreateCandidacyProcessBean();
        request.setAttribute("createCandidacyBean", bean);

        final ChoosePersonBean choosePersonBean = getCreateCandidacyProcessBean().getChoosePersonBean();
        if (!choosePersonBean.hasPerson()) {
            if (choosePersonBean.isFirstTimeSearch()) {
                final Collection<Person> persons = Person.findPersonByDocumentID(choosePersonBean.getIdentificationNumber());
                choosePersonBean.setFirstTimeSearch(false);
                if (showSimilarPersons(choosePersonBean, persons)) {
                    RenderUtils.invalidateViewState();
                    return mapping.findForward("searchPerson");
                }
            }
            bean.setPersonBean(new PersonBean(choosePersonBean.getName(), choosePersonBean.getIdentificationNumber(),
                    choosePersonBean.getDocumentType(), choosePersonBean.getDateOfBirth()));

            return mapping.findForward("createCandidacy");

        } else {
            bean.setPersonBean(new PersonBean(bean.getChoosePersonBean().getPerson()));
            return mapping.findForward("createCandidacy");
        }

    }
View Full Code Here

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

    public ActionForward manageStates(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean(getProcess(request));
        request.setAttribute("processBean", bean);

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

        return mapping.findForward("manageStates");
    }

    public ActionForward addState(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        try {
            PhdProgramCandidacyProcessBean bean = getRenderedObject("processBean");
            ExecuteProcessActivity.run(getProcess(request), org.fenixedu.academic.domain.phd.candidacy.activities.AddState.class,
                    bean);
        } catch (PhdDomainOperationException e) {
            addErrorMessage(request, e.getKey(), e.getArgs());
        }
View Full Code Here

        return mapping.findForward("manageStates");
    }

    public ActionForward removeLastState(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdProgramCandidacyProcessBean bean = getRenderedObject("processBean");
        try {
            ExecuteProcessActivity.run(getProcess(request),
                    org.fenixedu.academic.domain.phd.candidacy.activities.RemoveLastState.class, bean);
        } catch (final DomainException e) {
            addErrorMessage(request, e.getKey(), e.getArgs());
View Full Code Here

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

    public ActionForward prepareEditProcessAttributes(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean(getProcess(request));
        request.setAttribute("processBean", bean);

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

TOP

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

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.