Package org.fenixedu.academic.domain.exceptions

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


        values.add(process);
    }

    private void checkParameters(final ExecutionInterval executionInterval, final DateTime start, final DateTime end) {
        if (executionInterval == null) {
            throw new DomainException("error.SecondCycleCandidacyProcess.invalid.executionInterval");
        }

        if (start == null || end == null || start.isAfter(end)) {
            throw new DomainException("error.SecondCycleCandidacyProcess.invalid.interval");
        }
    }
View Full Code Here


    }

    public void editReceptionEmailMessage(SendReceptionEmailBean sendReceptionEmailBean) {
        if (StringUtils.isEmpty(sendReceptionEmailBean.getEmailSubject())
                || StringUtils.isEmpty(sendReceptionEmailBean.getEmailBody())) {
            throw new DomainException("error.reception.email.subject.and.body.must.not.be.empty");
        }

        setReceptionEmailSubject(sendReceptionEmailBean.getEmailSubject());
        setReceptionEmailBody(sendReceptionEmailBean.getEmailBody());
    }
View Full Code Here

    protected List run(String teacherID, String executionYearID) throws FenixServiceException {

        final Teacher teacher = FenixFramework.getDomainObject(teacherID);
        if (teacher == null) {
            throw new DomainException("error.noTeacher");
        }

        final ExecutionYear executionYear;
        if (Strings.isNullOrEmpty(executionYearID)) {
            executionYear = ExecutionYear.readCurrentExecutionYear();
View Full Code Here

    }

    @Atomic
    private void updatePersonPhoto(final PhotographUploadBean photo) throws FileNotFoundException, IOException {
        if (photo.getUsername() == null) {
            throw new DomainException("error.operatorPhotoUpload.null.username");
        }
        final Person person = Person.readPersonByUsername(photo.getUsername());
        if (person == null) {
            throw new DomainException("error.operatorPhotoUpload.invalid.username");
        }
        person.setPersonalPhoto(new Photograph(PhotoType.INSTITUTIONAL, ContentType.getContentType(photo.getContentType()),
                ByteStreams.toByteArray(photo.getFileInputStream())));
    }
View Full Code Here

    }

    private void checkParameters(ShiftDistribution shiftDistribution, ExecutionDegree executionDegree, Shift shift,
            Integer abstractStudentNumber) {
        if (shiftDistribution == null) {
            throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.shiftDistribution.cannot.be.null");
        }
        if (executionDegree == null) {
            throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.executionDegree.cannot.be.null");
        }
        if (shift == null) {
            throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.shift.cannot.be.null");
        }
        if (abstractStudentNumber == null) {
            throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.abstractStudentNumber.cannot.be.null");
        }
    }
View Full Code Here

        return getShiftDistribution().getExecutionYear() == executionYear;
    }

    @Override
    public void setShiftDistribution(ShiftDistribution shiftDistribution) {
        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.shiftDistribution");
    }
View Full Code Here

        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.shiftDistribution");
    }

    @Override
    public void setExecutionDegree(ExecutionDegree executionDegree) {
        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.executionDegree");
    }
View Full Code Here

        protected MobilityApplicationProcess executeActivity(MobilityApplicationProcess process, User userView, Object object) {
            ErasmusVacancyBean bean = (ErasmusVacancyBean) object;
            MobilityQuota quota = bean.getQuota();

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

            quota.delete();

            return process;
View Full Code Here

        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.executionDegree");
    }

    @Override
    public void setShift(Shift shift) {
        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.shiftName");
    }
View Full Code Here

        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.shiftName");
    }

    @Override
    public void setAbstractStudentNumber(Integer abstractStudentNumber) {
        throw new DomainException("error.candidacy.degree.ShiftDistributionEntry.cannot.modify.studentNumber");
    }
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.