Examples of PhdDomainOperationException


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

        List<PublicPresentationSeminarProcessStateType> possibleNextStates =
                PublicPresentationSeminarProcessStateType.getPossibleNextStates(process);

        if (!possibleNextStates.contains(type)) {
            String expectedStatesDescription = buildExpectedStatesDescription(possibleNextStates);
            throw new PhdDomainOperationException("error.phd.seminar.PublicPresentationSeminarState.invalid.next.state",
                    type.getLocalizedName(), expectedStatesDescription);
        }

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

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

        if (beginPeriod == null) {
            throw new DomainException("phd.PhdProgramContextPeriod.beginPeriod.cannot.be.null");
        }

        if (endPeriod != null && !endPeriod.isAfter(beginPeriod)) {
            throw new PhdDomainOperationException(
                    "error.net.sourceforge.fenixedu.domain.phd.PhdProgramContextPeriod.endPeriod.is.after.of.beginPeriod");
        }

        checkOverlaps(phdProgram, beginPeriod, endPeriod);
    }
View Full Code Here

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

            if (period == this) {
                continue;
            }

            if (period.overlaps(beginPeriod, endPeriod)) {
                throw new PhdDomainOperationException(
                        "error.net.sourceforge.fenixedu.domain.phd.PhdProgramContextPeriod.period.is.overlaping.another");
            }
        }
    }
View Full Code Here

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

    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

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

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

        if (!process.hasRegistryDiplomaRequest()) {
            throw new PhdDomainOperationException("error.phdDiploma.registryDiploma.must.be.requested");
        }

        PhdRegistryDiplomaRequest phdRegistryDiploma = process.getRegistryDiplomaRequest();

        if (phdRegistryDiploma.isPayedUponCreation() && !phdRegistryDiploma.getEvent().isPayed()) {
            throw new PhdDomainOperationException("error.phdDiploma.registryDiploma.must.be.payed");
        }
    }
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().isConclusionProcessed()) {
                throw new PhdDomainOperationException("error.registryDiploma.registrationNotSubmitedToConclusionProcess");
            }

            if (isPayable() && !isPayed()) {
                throw new PhdDomainOperationException("AcademicServiceRequest.hasnt.been.payed");
            }

            getAdministrativeOffice().getCurrentRectorateSubmissionBatch().addDocumentRequest(this);

            if (getLastGeneratedDocument() == null) {
View Full Code Here

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

        this.init(bean);

        PhdRegistryDiplomaRequest registryDiplomaRequest = getPhdIndividualProgramProcess().getRegistryDiplomaRequest();

        if (registryDiplomaRequest == null) {
            throw new PhdDomainOperationException("error.PhdFinalizationCertificateRequest.registry.diploma.request.none");
        }

        RectorateSubmissionBatch rectorateSubmissionBatch = registryDiplomaRequest.getRectorateSubmissionBatch();

        if (rectorateSubmissionBatch == null) {
            throw new PhdDomainOperationException(
                    "error.PhdFinalizationCertificateRequest.registry.diploma.submission.batch.not.sent");
        }

    }
View Full Code Here

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

        if (!bean.getPhdIndividualProgramProcess().isBolonha()) {
            return;
        }

        if (getPhdIndividualProgramProcess().getRegistryDiplomaRequest() == null) {
            throw new PhdDomainOperationException("error.PhdFinalizationCertificateRequest.registry.diploma.not.requested");
        }

    }
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()) {
            PhdRegistryDiplomaRequest registryDiplomaRequest = getPhdIndividualProgramProcess().getRegistryDiplomaRequest();

            if (registryDiplomaRequest == null) {
                throw new PhdDomainOperationException("error.PhdFinalizationCertificateRequest.registry.diploma.request.none");
            }

            RectorateSubmissionBatch rectorateSubmissionBatch = registryDiplomaRequest.getRectorateSubmissionBatch();

            if (rectorateSubmissionBatch == null) {
                throw new PhdDomainOperationException(
                        "error.PhdFinalizationCertificateRequest.registry.diploma.submission.batch.not.sent");
            }

            if (!rectorateSubmissionBatch.isSent() && !rectorateSubmissionBatch.isReceived()) {
                throw new PhdDomainOperationException(
                        "error.PhdFinalizationCertificateRequest.registry.diploma.submission.batch.not.sent");
            }

            if (!getPhdIndividualProgramProcess().isConcluded()) {
                throw new PhdDomainOperationException(
                        "error.PhdFinalizationCertificateRequest.phd.process.not.submited.to.conclusion.process");
            }

            if (getLastGeneratedDocument() == null) {
                generateDocument();
View Full Code Here

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

    }

    private void checkType(final PhdCandidacyFeedbackRequestProcess process, final PhdCandidacyFeedbackStateType type) {
        final PhdCandidacyFeedbackStateType currentType = process.getActiveState();
        if (currentType != null && currentType.equals(type)) {
            throw new PhdDomainOperationException("error.PhdCandidacyProcessState.equals.previous.state", type.getLocalizedName());
        }
    }
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.