Package org.fenixedu.academic.domain.exceptions

Examples of org.fenixedu.academic.domain.exceptions.DomainException


            if (StringUtils.isEmpty(degreeType)) {
                degreeType = request.getParameter("degreeType");
            }

            if (StringUtils.isEmpty(degreeType)) {
                throw new DomainException("error.selection.noDegreeType");
            }

            Collection<InfoDegreeCurricularPlan> degreeCurricularPlans =
                    ReadActiveDegreeCurricularPlansByDegreeType.runForAcademicAdmin(DegreeType.valueOf(degreeType));
            List<InfoExecutionPeriod> executionPeriods = ReadNotClosedExecutionPeriods.run();
View Full Code Here


    @Override
    protected void checkParameters(final Person person, final IndividualCandidacyProcess process,
            final IndividualCandidacyProcessBean bean) {
        if (hasValidStandaloneIndividualCandidacy(bean, process.getCandidacyExecutionInterval())) {
            throw new DomainException("error.StandaloneIndividualCandidacy.person.already.has.candidacy", process
                    .getCandidacyExecutionInterval().getName());
        }

        LocalDate candidacyDate = bean.getCandidacyDate();
        checkParameters(person, process, candidacyDate);
View Full Code Here

        for (final CurricularCourse curricularCourse : curricularCourses) {
            total += curricularCourse.getEctsCredits(executionSemester);
        }

        if (!MaximumNumberOfEctsInStandaloneCurriculumGroup.allowEctsCheckingDefaultValue(total)) {
            throw new DomainException("error.StandaloneIndividualCandidacy.ects.credits.above.maximum",
                    String.valueOf(MaximumNumberOfEctsInStandaloneCurriculumGroup.MAXIMUM_DEFAULT_VALUE));
        }
    }
View Full Code Here

        }
    }

    private void checkParameters(final StandaloneIndividualCandidacyResultBean bean) {
        if (isAccepted() && bean.getState() != IndividualCandidacyState.ACCEPTED && getRegistration() != null) {
            throw new DomainException("error.StandaloneIndividualCandidacy.cannot.change.state.from.accepted.candidacies");
        }
    }
View Full Code Here

    @Override
    public Registration createRegistration(final DegreeCurricularPlan degreeCurricularPlan, final CycleType cycleType,
            final Ingression ingression) {

        if (getRegistration() != null) {
            throw new DomainException("error.IndividualCandidacy.person.with.registration",
                    degreeCurricularPlan.getPresentationName());
        }

        if (!degreeCurricularPlan.isEmpty()) {
            throw new DomainException("error.StandaloneIndividualCandidacy.dcp.must.be.empty");
        }

        if (hasActiveRegistration(degreeCurricularPlan)) {
            final Registration registration = getStudent().getActiveRegistrationFor(degreeCurricularPlan);
            setRegistration(registration);
View Full Code Here

                }
            });
        }

        if (hasCredits) {
            throw new DomainException("error.remove.professorship");
        }
        return Boolean.TRUE;
    }
View Full Code Here

    }

    @Override
    protected void checkParameters(final CandidacyProcess process) {
        if (process == null || process.getCandidacyPeriod() == null) {
            throw new DomainException("error.StandaloneIndividualCandidacyProcess.invalid.candidacy.process");
        }
    }
View Full Code Here

        check();
    }

    private void check() {
        if (getApplicationPeriod() == null) {
            throw new DomainException("error.erasmus.vacancy.candidacy.period.must.not.be.null");
        }

        if (getDegree() == null) {
            throw new DomainException("error.erasmus.vacancy.degree.must.not.be.null");
        }

        if (getMobilityAgreement().getUniversityUnit() == null) {
            throw new DomainException("error.erasmus.vacancy.university.unit.must.not.be.null");
        }

        if (getNumberOfOpenings() == null) {
            throw new DomainException("error.erasmus.vacancy.number.of.vacancies.must.not.be.null");
        }
    }
View Full Code Here

        return !getApplicationsSet().isEmpty();
    }

    public void delete() {
        if (isQuotaAssociatedWithAnyApplication()) {
            throw new DomainException("error.mobility.quota.is.associated.with.applications");
        }

        setMobilityAgreement(null);
        setDegree(null);
        setApplicationPeriod(null);
View Full Code Here

        }
    }

    private void checkParameters(final String name, final String code, final String acronym) {
        if (StringUtils.isEmpty(name)) {
            throw new DomainException("error.curricularCourse.invalid.name");
        }
        if (StringUtils.isEmpty(code)) {
            throw new DomainException("error.curricularCourse.invalid.code");
        }
        if (StringUtils.isEmpty(acronym)) {
            throw new DomainException("error.curricularCourse.invalid.acronym");
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.exceptions.DomainException

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.