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

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


    @Atomic
    public static void run(StudentCurricularPlan studentCurricularPlan, String[] creditsIDs) throws FenixServiceException {
        for (String creditsID : creditsIDs) {
            Credits credits = getCreditsByID(studentCurricularPlan, creditsID);
            if (credits == null) {
                throw new FenixServiceException();
            }
            credits.delete();
        }
    }
View Full Code Here


        check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE);
        final ExecutionSemester executionSemester = FenixFramework.getDomainObject(executionPeriodId);
        final ExecutionCourse executionCourse = executionSemester.getExecutionCourseByInitials(executionCourseInitials);

        if (executionCourse == null) {
            throw new FenixServiceException("error.noExecutionCourse");
        }
        executionCourse.setComment(comment);
    }
View Full Code Here

    @Atomic
    public static List<InfoShowOccupation> run(Registration registration, ExecutionSemester executionSemester)
            throws FenixServiceException {

        if (registration == null) {
            throw new FenixServiceException("error.service.readStudentTimeTable.noStudent");
        }
        if (executionSemester == null) {
            executionSemester = ExecutionSemester.readActualExecutionSemester();
        }
View Full Code Here

    }

    private CompetenceCourse readCompetenceCourse(String competenceCourseID) throws FenixServiceException {
        final CompetenceCourse competenceCourse = FenixFramework.getDomainObject(competenceCourseID);
        if (competenceCourse == null) {
            throw new FenixServiceException("error.noCompetenceCourse");
        }
        return competenceCourse;
    }
View Full Code Here

    @Atomic
    public static void run(String curricularRuleID) throws FenixServiceException {
        final CurricularRule curricularRule = FenixFramework.getDomainObject(curricularRuleID);
        if (curricularRule == null) {
            throw new FenixServiceException("error.noCurricularRule");
        }
        curricularRule.delete();
    }
View Full Code Here

    private static void moveEnrolments(final OptionalCurricularCoursesLocationBean bean) throws FenixServiceException {
        for (final EnrolmentLocationBean line : bean.getEnrolmentBeans()) {
            final CurriculumGroup curriculumGroup = line.getCurriculumGroup(bean.getStudentCurricularPlan());
            if (curriculumGroup == null) {
                throw new FenixServiceException("error.MoveCurriculumLines.invalid.curriculumGroup");
            }
            bean.getStudentCurricularPlan().convertEnrolmentToOptionalEnrolment(line.getEnrolment(), curriculumGroup,
                    line.getOptionalCurricularCourse());
        }
    }
View Full Code Here

    @Atomic
    public static Registration run(String studentUsername) throws FenixServiceException {
        check(RolePredicates.STUDENT_PREDICATE);
        final Registration registration = Registration.readByUsername(studentUsername);
        if (registration == null) {
            throw new FenixServiceException("error.noStudent");
        }
        return registration;
    }
View Full Code Here

                BundleUtil.getString(Bundle.APPLICATION, "title.enrolments") + "-"
                        + getFileName(Calendar.getInstance().getTime());
        try {
            exportToXls(filename.replace(" ", "_"));
        } catch (IOException e) {
            throw new FenixServiceException();
        }
    }
View Full Code Here

public class AssociateCurricularCoursesToExecutionCourse {

    @Atomic
    public static void run(String executionCourseId, List<String> curricularCourseIds) throws FenixServiceException {
        if (executionCourseId == null) {
            throw new FenixServiceException("nullExecutionCourseId");
        }

        if (curricularCourseIds != null && !curricularCourseIds.isEmpty()) {
            ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseId);
View Full Code Here

    @Atomic
    public static InfoExecutionCourse run(String executionCourseOID) throws FenixServiceException {

        if (executionCourseOID == null) {
            throw new FenixServiceException("nullId");
        }

        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseOID);
        return InfoExecutionCourse.newInfoFromDomain(executionCourse);
    }
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.