Package org.fenixedu.academic.service.services.exceptions

Examples of org.fenixedu.academic.service.services.exceptions.FenixServiceException


                result.add(degreeModuleScope);
            }
        }

        if (result.isEmpty()) {
            throw new FenixServiceException("error.invalidCurricularCourseScope");
        }

        return result;
    }
View Full Code Here


    private List<Space> readRooms(final List<String> roomIDs) throws FenixServiceException {
        final List<Space> result = new ArrayList<Space>();
        for (final String roomID : roomIDs) {
            final Space room = (Space) FenixFramework.getDomainObject(roomID);
            if (room == null) {
                throw new FenixServiceException("error.noRoom");
            }
            result.add(room);
        }
        return result;
    }
View Full Code Here

public class ReadStudentCurricularPlan {

    @Atomic
    public static InfoStudentCurricularPlan run(final String studentCurricularPlanID) throws FenixServiceException {
        if (studentCurricularPlanID == null) {
            throw new FenixServiceException("Persistence layer error");
        }

        final StudentCurricularPlan studentCurricularPlan = FenixFramework.getDomainObject(studentCurricularPlanID);
        if (studentCurricularPlan == null) {
            throw new NonExistingServiceException();
View Full Code Here

        if (registration == null) {
            throw new StudentNotFoundServiceException();
        }
        if (registration.getPayedTuition() == null || registration.getPayedTuition().equals(Boolean.FALSE)) {
            throw new FenixServiceException("error.exception.notAuthorized.student.warningTuition");
        }

        final Shift shift = FenixFramework.getDomainObject(shiftId);
        if (shift == null) {
            throw new ShiftNotFoundServiceException();
View Full Code Here

        if (registration == null || !selectedShift.getExecutionCourse().hasAttendsFor(registration.getStudent())) {
            throw new StudentNotFoundServiceException();
        }

        if (registration.getPayedTuition() == null || registration.getPayedTuition().equals(Boolean.FALSE)) {
            throw new FenixServiceException("error.exception.notAuthorized.student.warningTuition");
        }

        final Shift shiftFromStudent = findShiftOfSameTypeForSameExecutionCourse(registration, selectedShift);

        if (selectedShift != shiftFromStudent) {
View Full Code Here

    public List<InfoShowOccupation> run(final Registration registration, final SchoolClass schoolClass,
            final ExecutionCourse executionCourse) throws FenixServiceException {

        if (registration == null) {
            throw new FenixServiceException("error.readClassTimeTableByStudent.noStudent");
        }

        if (schoolClass == null) {
            throw new FenixServiceException("error.readClassTimeTableByStudent.noSchoolClass");
        }

        final Set<ExecutionCourse> attendingExecutionCourses =
                registration.getAttendingExecutionCoursesForCurrentExecutionPeriod();
View Full Code Here

    protected void run(Registration registration, String executionCourseId) throws FenixServiceException {

        ServiceMonitoring.logService(this.getClass(), registration, executionCourseId);

        if (registration == null) {
            throw new FenixServiceException("error.registration.not.exist");
        }
        registration.addAttendsTo(readExecutionCourse(executionCourseId));
    }
View Full Code Here

        registration.addAttendsTo(readExecutionCourse(executionCourseId));
    }

    private ExecutionCourse readExecutionCourse(String executionCourseId) throws FenixServiceException {
        if (Strings.isNullOrEmpty(executionCourseId)) {
            throw new FenixServiceException("errors.notSelected.executionCourse");
        }
        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseId);
        if (executionCourse == null) {
            throw new FenixServiceException("error.executionCourse.not.exist");
        }
        return executionCourse;
    }
View Full Code Here

        return result;
    }

    private void checkStudentRestrictionsForShiftsEnrolments(Registration registration) throws FenixServiceException {
        if (registration == null) {
            throw new FenixServiceException("errors.impossible.operation");
        }

        if (registration.getPayedTuition() == null || registration.getPayedTuition().equals(Boolean.FALSE)) {
            if (!registration.getInterruptedStudies()) {
                throw new FenixServiceException("error.exception.notAuthorized.student.warningTuition");
            }
        }

        if (registration.getFlunked()) {
            throw new FenixServiceException("error.exception.notAuthorized.student.warningTuition");
        }
    }
View Full Code Here

    @Atomic
    public static void run(final Registration registration, String[] externalEnrolmentIDs) throws FenixServiceException {
        for (final String externalEnrolmentID : externalEnrolmentIDs) {
            final ExternalEnrolment externalEnrolment = getExternalEnrolmentByID(registration, externalEnrolmentID);
            if (externalEnrolment == null) {
                throw new FenixServiceException("error.DeleteExternalEnrolments.externalEnrolmentID.doesnot.belong.to.student");
            }
            externalEnrolment.delete();
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.service.services.exceptions.FenixServiceException

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.