Examples of PhdDomainOperationException


Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

        List<PhdCandidacyFeedbackStateType> possibleNextStates = PhdCandidacyFeedbackStateType.getPossibleNextStates(type);

        if (!possibleNextStates.contains(type)) {
            String description = buildExpectedStatesDescription(possibleNextStates);

            throw new PhdDomainOperationException("error.phd.candidacy.feedbackRequest.PhdCandidacyFeedbackState.invalid.state",
                    type.getLocalizedName(), description);
        }

        return new PhdCandidacyFeedbackState(process, type, person, remarks, stateDate);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

        if (!bean.getRequestType().equals(getAcademicServiceRequestType())) {
            throw new DomainException("error.PhdStudentReingressionRequest.type.not.supported");
        }

        if (!isValidRequest(bean)) {
            throw new PhdDomainOperationException(
                    "error.PhdStudentReingressionRequest.phd.individual.program.process.must.be.flunked.or.suspended");
        }

        super.init(bean);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

        }
    }

    protected void assertPayedEvents() {
        if (getPhdIndividualProgramProcess().hasInsuranceDebtsCurrently()) {
            throw new PhdDomainOperationException("DocumentRequest.registration.has.not.payed.insurance.fees");
        }

        if (getPhdIndividualProgramProcess().hasAdministrativeOfficeFeeAndInsuranceDebtsCurrently(getAdministrativeOffice())) {
            throw new PhdDomainOperationException("DocumentRequest.registration.has.not.payed.administrative.office.fees");
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

    }

    protected void assertPayedEvents(final ExecutionYear executionYear) {
        if (executionYear != null) {
            if (getPhdIndividualProgramProcess().hasInsuranceDebts(executionYear)) {
                throw new PhdDomainOperationException("DocumentRequest.registration.has.not.payed.insurance.fees");
            }

            if (getPhdIndividualProgramProcess().hasAdministrativeOfficeFeeAndInsuranceDebts(getAdministrativeOffice(),
                    executionYear)) {
                throw new PhdDomainOperationException("DocumentRequest.registration.has.not.payed.administrative.office.fees");
            }
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

    }

    private void checkType(final PhdIndividualProgramProcess process, final PhdIndividualProgramProcessState type) {
        final PhdIndividualProgramProcessState currentType = process.getActiveState();
        if (currentType != null && currentType.equals(type)) {
            throw new PhdDomainOperationException("error.PhdProgramProcessState.equals.previous.state", type.getLocalizedName());
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

        PhdProgramProcessState mostRecentState = process.getMostRecentState();

        switch (type) {
        case CANDIDACY:
            if (process.getCandidacyProcess().getCandidacyDate() == null) {
                throw new PhdDomainOperationException("error.phd.PhdProgramProcessState.candidacyDate.required");
            }

            stateDate = process.getCandidacyProcess().getCandidacyDate().toDateTimeAtStartOfDay();
            break;
        case WORK_DEVELOPMENT:

            if (process.getMostRecentStateByType(PhdIndividualProgramProcessState.WORK_DEVELOPMENT) != null) {
                stateDate = mostRecentState.getStateDate().plusMinutes(1);
                break;
            }

            if (process.getWhenStartedStudies() == null) {
                throw new PhdDomainOperationException("error.phd.PhdProgramProcessState.whenStartedStudies.required");
            }

            stateDate = process.getWhenStartedStudies().toDateTimeAtStartOfDay();
            break;
        case THESIS_DISCUSSION:

            if (process.getMostRecentStateByType(PhdIndividualProgramProcessState.THESIS_DISCUSSION) != null) {
                stateDate = mostRecentState.getStateDate().plusMinutes(1);
                break;
            }

            if (process.getThesisProcess().getWhenThesisDiscussionRequired() == null) {
                throw new PhdDomainOperationException("error.phd.PhdProgramProcessState.whenThesisDiscussionRequired.required");
            }

            stateDate = process.getThesisProcess().getWhenThesisDiscussionRequired().toDateTimeAtStartOfDay();
            break;
        case TRANSFERRED:
            stateDate = mostRecentState.getStateDate().plusMinutes(1);
            break;
        case CONCLUDED:
            if (process.getLastConclusionProcess() == null) {
                throw new PhdDomainOperationException("error.phd.PhdProgramProcessState.conclusionProcess.required");
            }

            stateDate = process.getLastConclusionProcess().getConclusionDate().toDateTimeAtStartOfDay();
            break;
        case CANCELLED:
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

        List<PhdIndividualProgramProcessState> stateList = PhdIndividualProgramProcessState.getPossibleNextStates(process);

        if (!stateList.contains(type)) {
            String expectedStateDescription = buildExpectedStatesDescription(stateList);

            throw new PhdDomainOperationException("error.phd.PhdIndividualProgramProcess.invalid.next.state",
                    type.getLocalizedName(), expectedStateDescription);
        }

        return new PhdProgramProcessState(process, type, person, remarks, stateDate);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

    protected void internalChangeState(AcademicServiceRequestBean academicServiceRequestBean) {
        try {
            verifyIsToProcessAndHasPersonalInfo(academicServiceRequestBean);
            verifyIsToDeliveredAndIsPayed(academicServiceRequestBean);
        } catch (DomainException e) {
            throw new PhdDomainOperationException(e.getKey(), e, e.getArgs());
        }

        super.internalChangeState(academicServiceRequestBean);
        if (academicServiceRequestBean.isToProcess()) {
            if (!getPhdIndividualProgramProcess().isConcluded()) {
                throw new PhdDomainOperationException(
                        "error.phdDiplomaSupplement.registration.not.submited.to.conclusion.process");
            }

            if (getRegistryCode() == null) {
                getRegistryDiplomaRequest().getRegistryCode().addDocumentRequest(this);
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

    public EctsGraduationGradeConversionTable getGraduationConversionTable() {
        try {
            return EctsTableIndex.getGraduationGradeConversionTable(getPhdIndividualProgramProcess().getPhdProgram().getDegree(),
                    getRequestedCycle(), getConclusionYear().getAcademicInterval(), getProcessingDate());
        } catch (NoEctsComparabilityTableFound e) {
            throw new PhdDomainOperationException("error.no.ects.comparability.found");
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.exceptions.PhdDomainOperationException

                throw new DomainException("error.net.sourceforge.fenixedu.domain.phd.ThesisSubject.name.required", args1);
            }
        }

        if (!name.hasContent(MultiLanguageString.en)) {
            throw new PhdDomainOperationException(
                    "error.net.sourceforge.fenixedu.domain.phd.ThesisSubject.name.in.english.required");
        }

        if (teacher == null) {
            throw new PhdDomainOperationException("error.net.sourceforge.fenixedu.domain.phd.ThesisSubject.teacher.required");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.