Package org.fenixedu.academic.domain.phd

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


        candidacyBean.setCollaborationType(PhdIndividualProgramCollaborationType.NONE);
        candidacyBean.setExecutionYear(getExecutionYear());
        candidacyBean.setFocusArea((getProcessBean().getPhdProgram().getPhdProgramFocusAreasSet().size() == 1) ? getProcessBean()
                .getPhdProgram().getPhdProgramFocusAreasSet().iterator().next() : null);

        final PhdIndividualProgramProcess individualProcess =
                (PhdIndividualProgramProcess) CreateNewProcess.run(PhdIndividualProgramProcess.class, candidacyBean);

        return individualProcess;
    }
View Full Code Here


        @Override
        protected PhdProgramCandidacyProcess executeActivity(PhdProgramCandidacyProcess process, User userView, Object object) {
            final Object[] values = (Object[]) object;
            final PhdProgramCandidacyProcessBean bean = readBean(values);
            final Person person = readPerson(values);
            final PhdIndividualProgramProcess individualProgramProcess = readPhdIndividualProgramProcess(values);
            final PhdProgramCandidacyProcess result =
                    new PhdProgramCandidacyProcess(bean, person, bean.getMigratedProcess(), individualProgramProcess);
            result.createState(bean.getState(), person, "");
            return result;
        }
View Full Code Here

    }

    private PhdParticipant[] getOrCreateParticipantsToNofify() {

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

        init(guider, documentType, remarks, content, filename, uploader);
    }

    private void init(PhdParticipant guider, PhdIndividualProgramDocumentType documentType, String remarks, byte[] content,
            String filename, Person uploader) {
        PhdIndividualProgramProcess process = guider.getIndividualProcess();

        checkParameters(guider, documentType);
        super.init(process, documentType, remarks, content, filename, uploader);

        setPhdGuider(guider);
View Full Code Here

        throw new DomainException("phd.candidacy.PhdGuiderAcceptanceLetter.invalid.type");
    }

    @Override
    public boolean isAccessible(User user) {
        PhdIndividualProgramProcess process = (PhdIndividualProgramProcess) getPhdProgramProcess();

        if (!process.getCandidacyProcess().isPublicCandidacy()) {
            return super.isAccessible(user);
        }

        if (!process.getCandidacyProcess().getPublicPhdCandidacyPeriod().isOpen()) {
            return super.isAccessible(user);
        }

        return true;
    }
View Full Code Here

        getMostRecentState().delete();
    }

    public void checkJuryPresidentNotGuider(final PhdThesisJuryElementBean bean) {
        final PhdIndividualProgramProcess process = getIndividualProgramProcess();

        for (PhdParticipant processParticipant : process.getParticipantsSet()) {
            if (processParticipant == bean.getParticipant()) {
                if (process.isGuider(processParticipant) || process.isAssistantGuider(processParticipant)) {
                    throw new DomainException("error.PhdThesisProcess.president.cannot.be.guider.or.assistantguider");
                }

                break;
            }

            if (processParticipant.isFor(retrievePersonFromParticipantBean(bean))) {
                if (process.isGuider(processParticipant) || process.isAssistantGuider(processParticipant)) {
                    throw new DomainException("error.PhdThesisProcess.president.cannot.be.guider.or.assistantguider");
                }
            }
        }
    }
View Full Code Here

        if (!bean.isReporter()) {
            return;
        }

        final PhdIndividualProgramProcess process = getIndividualProgramProcess();

        for (PhdParticipant processParticipant : process.getParticipantsSet()) {
            if (processParticipant == bean.getParticipant()) {
                if (process.isGuider(processParticipant) || process.isAssistantGuider(processParticipant)) {
                    throw new DomainException("error.PhdThesisProcess.reporter.cannot.be.guider.or.assistantguider");
                }

                break;
            }

            if (processParticipant.isFor(retrievePersonFromParticipantBean(bean))) {
                if (process.isGuider(processParticipant) || process.isAssistantGuider(processParticipant)) {
                    throw new DomainException("error.PhdThesisProcess.reporter.cannot.be.guider.or.assistantguider");
                }
            }
        }
View Full Code Here

        setDiplomaSupplement(PhdDiplomaSupplementRequest.create(bean));
    }

    private void checkParameters(final PhdDocumentRequestCreateBean bean) {
        PhdIndividualProgramProcess process = bean.getPhdIndividualProgramProcess();
        if (process.hasRegistryDiplomaRequest()) {
            throw new PhdDomainOperationException("error.registryDiploma.alreadyRequested");
        }

        if (!process.isBolonha()) {
            return;
        }

        if (process.hasDiplomaRequest()) {
            throw new PhdDomainOperationException("error.registryDiploma.alreadyHasDiplomaRequest");
        }

    }
View Full Code Here

        this();
        init(conclusionProcessBean, responsible);
    }

    protected void init(final PhdConclusionProcessBean conclusionProcessBean, Person responsible) {
        PhdIndividualProgramProcess process = conclusionProcessBean.getPhdIndividualProgramProcess();
        LocalDate conclusionDate = conclusionProcessBean.getConclusionDate();
        PhdThesisFinalGrade grade = conclusionProcessBean.getGrade();
        BigDecimal thesisEctsCredits = conclusionProcessBean.getThesisEctsCredits();
        BigDecimal studyPlanEctsCredits = conclusionProcessBean.getStudyPlanEctsCredits();

        if (!process.isConcluded()) {
            throw new DomainException("error.phd.PhdConclusionProcess.process.is.not.concluded");
        }

        if (responsible == null) {
            throw new DomainException("error.phd.PhdConclusionProcess.responsible.is.required");
        }

        if (conclusionDate == null) {
            throw new DomainException("error.phd.PhdConclusionProcess.conclusionDate.is.required");
        }

        if (grade == null) {
            throw new DomainException("error.phd.PhdConclusionProcess.grade.is.required");
        }

        if (process.getRegistration() != null && !process.getRegistration().isRegistrationConclusionProcessed()) {
            throw new DomainException("error.phd.PhdConclusionProcess.registration.must.be.concluded.first");
        }

        if (thesisEctsCredits == null) {
            throw new DomainException("error.phd.PhdConclusionProcess.thesisEctsCredits.is.required");
        }

        if (!process.getCandidacyProcess().isStudyPlanExempted()) {
            if (studyPlanEctsCredits == null) {
                throw new DomainException("error.phd.PhdConclusionProcess.studyPlanEctsCredits.is.required");
            }
        }

        setResponsible(responsible);
        setConclusionDate(conclusionDate);
        setVersion(process.getLastConclusionProcess() != null ? process.getLastConclusionProcess().getVersion() + 1 : 1);
        setPhdProcess(process);
        setWhenCreated(new DateTime());
        setFinalGrade(grade);
        setThesisEctsCredits(thesisEctsCredits);
        setStudyPlanEctsCredits(studyPlanEctsCredits);
View Full Code Here

            getRootDomainObject().getInstitutionUnit().getRegistryCodeGenerator().createRegistryFor(this);
        }
    }

    private void checkParameters(final PhdDocumentRequestCreateBean bean) {
        PhdIndividualProgramProcess process = bean.getPhdIndividualProgramProcess();

        if (process.hasDiplomaRequest()) {
            throw new PhdDomainOperationException("error.phdDiploma.alreadyHasDiplomaRequest");
        }

        checkRegistryDiplomaRequest(process);
    }
View Full Code Here

TOP

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

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.