Examples of PhdDomainOperationException


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

        if (bean.getNumberOfSemesters() == null) {
            throw new DomainException("error.phd.PhdProgramInformation.numberOfSemesters");
        }

        if (hasSomePhdProgramInformationBeanWithSameBeginDate(bean)) {
            throw new PhdDomainOperationException("error.phd.PhdProgramInformation.other.information.with.same.beginDate");
        }
    }
View Full Code Here

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

                String newStateDate = stateDate.toString("dd/MM/yyyy") + " - " + type.getLocalizedName();
                String actualStateDate =
                        phdProcessState.getStateDate().toString("dd/MM/yyyy") + " - "
                                + phdProcessState.getType().getLocalizedName();

                throw new PhdDomainOperationException("error.PhdProcessState.state.date.is.previous.of.actual.state.on.process",
                        newStateDate, actualStateDate);
            }
        }
    }
View Full Code Here

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

    public abstract PhdProgramProcess getProcess();

    @Atomic
    public void editStateDate(PhdProcessStateBean bean) {
        if (bean.getStateDate() == null) {
            throw new PhdDomainOperationException("error.PhdProcessState.state.date.required");
        }

        setStateDate(bean.getStateDate());
    }
View Full Code Here

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

    @Override
    protected PhdIndividualProgramProcess executeActivity(PhdIndividualProgramProcess process, User userView, Object object) {

        if (process.getThesisProcess() == null) {
            throw new PhdDomainOperationException("error.PhdIndividualProgramProcess.thesis.process.inexistent");
        }

        if (!process.getThesisProcess().isConcluded()) {
            throw new PhdDomainOperationException("error.PhdIndividualProgramProcess.thesis.process.is.not.concluded");
        }

        PhdProgramProcessState.createWithGivenStateDate(process, PhdIndividualProgramProcessState.CONCLUDED,
                userView.getPerson(), "", new DateTime());
View Full Code Here

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

        case WAITING_FOR_SCIENTIFIC_COUNCIL_RATIFICATION:
            if (mostRecentState != null) {
                stateDate = mostRecentState.getStateDate().plusMinutes(1);
            } else {
                if (process.getCandidacyDate() == null) {
                    throw new PhdDomainOperationException("error.phd.PhdCandidacyProcessState.candidacyDate.required");
                }

                stateDate = process.getCandidacyDate().toDateTimeAtStartOfDay();
            }

            break;
        case RATIFIED_BY_SCIENTIFIC_COUNCIL:
            if (process.getWhenRatified() == null) {
                throw new PhdDomainOperationException("error.phd.PhdCandidacyProcessState.whenRatified.required");
            }

            stateDate = process.getWhenRatified().toDateTimeAtStartOfDay();
            break;
        case CONCLUDED:
            if (process.getWhenStartedStudies() == null) {
                throw new PhdDomainOperationException("error.phd.PhdCandidacyProcessState.whenStartedStudies.required");
            }

            stateDate = process.getWhenStartedStudies().toDateTimeAtStartOfDay();
            break;
        case REJECTED:
View Full Code Here

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

        List<PhdProgramCandidacyProcessState> nextPossibleStates = PhdProgramCandidacyProcessState.getPossibleNextStates(process);

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

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

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

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

    }

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

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

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

    }
View Full Code Here

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

        PublicPresentationSeminarState mostRecentState = process.getMostRecentState();

        switch (type) {
        case WAITING_FOR_COMMISSION_CONSTITUTION:
            if (process.getPresentationRequestDate() == null) {
                throw new PhdDomainOperationException(
                        "error.phd.seminar.PublicPresentationSeminarState.presentationRequestDate.required");
            }

            stateDate = process.getPresentationRequestDate().toDateTimeAtStartOfDay();
            break;
        case COMMISSION_WAITING_FOR_VALIDATION:
            stateDate = mostRecentState.getStateDate().plusMinutes(1);
            break;
        case COMMISSION_VALIDATED:
            stateDate = mostRecentState.getStateDate().plusMinutes(1);
            break;
        case PUBLIC_PRESENTATION_DATE_SCHEDULED:
            stateDate = mostRecentState.getStateDate().plusMinutes(1);
            break;
        case REPORT_WAITING_FOR_VALIDATION:
            if (process.getMostRecentStateByType(PublicPresentationSeminarProcessStateType.REPORT_WAITING_FOR_VALIDATION) != null) {
                stateDate = mostRecentState.getStateDate().plusMinutes(1);
                break;
            }

            if (process.getPresentationDate() == null) {
                throw new PhdDomainOperationException(
                        "error.phd.seminar.PublicPresentationSeminarState.presentationDate.required");
            }

            stateDate = process.getPresentationDate().toDateTimeAtStartOfDay();
            break;
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");
            }

            if (getRegistryCode() == null) {

                PhdDiplomaRequest diplomaRequest = getPhdIndividualProgramProcess().getDiplomaRequest();
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.