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

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


    public static void run(String externalId, String name, String nameEn, String acronym, DegreeType degreeType,
            Double ectsCredits, GradeScale gradeScale, String prevailingScientificArea, ExecutionYear executionYear)
            throws FenixServiceException {
        check(RolePredicates.SCIENTIFIC_COUNCIL_PREDICATE);
        if (externalId == null || name == null || nameEn == null || acronym == null || degreeType == null || ectsCredits == null) {
            throw new InvalidArgumentsServiceException();
        }

        final Degree degreeToEdit = FenixFramework.getDomainObject(externalId);

        if (degreeToEdit == null) {
View Full Code Here


            DegreeCurricularPlanState degreeCurricularPlanState, GradeScale gradeScale, String executionYearID)
            throws FenixServiceException {
        check(RolePredicates.SCIENTIFIC_COUNCIL_PREDICATE);

        if (dcpId == null || name == null || curricularStage == null) {
            throw new InvalidArgumentsServiceException();
        }

        final DegreeCurricularPlan dcpToEdit = FenixFramework.getDomainObject(dcpId);
        if (dcpToEdit == null) {
            throw new FenixServiceException("error.degreeCurricularPlan.no.existing.degreeCurricularPlan");
View Full Code Here

    public static void run(DegreeOfficialPublication degreeOfficialPublication, DegreeSpecializationArea degreeSpecializationArea)
            throws FenixServiceException {
        check(RolePredicates.SCIENTIFIC_COUNCIL_PREDICATE);

        if (degreeOfficialPublication == null || degreeSpecializationArea == null) {
            throw new InvalidArgumentsServiceException();
        }

        degreeSpecializationArea.delete();
    }
View Full Code Here

    public static void run(DegreeOfficialPublication degreeOfficialPublication, String area, String name)
            throws FenixServiceException {
        check(RolePredicates.SCIENTIFIC_COUNCIL_PREDICATE);

        if (degreeOfficialPublication == null || area == null || name == null) {
            throw new InvalidArgumentsServiceException();
        }

        DegreeSpecializationArea specializationArea =
                new DegreeSpecializationArea(degreeOfficialPublication, new MultiLanguageString(area));
        specializationArea.setName(new MultiLanguageString(name));
View Full Code Here

        Set<String> allStudentsUsernames = new HashSet<String>(studentUsernames);
        allStudentsUsernames.add(studentUsername);
        Integer result = strategy.enrolmentPolicyNewGroup(grouping, allStudentsUsernames.size(), shift);

        if (result.equals(Integer.valueOf(-1))) {
            throw new InvalidArgumentsServiceException();
        }
        if (result.equals(Integer.valueOf(-2))) {
            throw new NonValidChangeServiceException();
        }
        if (result.equals(Integer.valueOf(-3))) {
View Full Code Here

            searchBean.setTeacher(Teacher.readByIstId(searchBean.getTeacherId()));
        }

        CurricularCourse curricularCourse = searchBean.getCurricularCourse();
        if (curricularCourse == null) {
            throw new InvalidArgumentsServiceException("error.noCurricularCourse");
        }

        Collection<MarkSheet> markSheets =
                curricularCourse.searchMarkSheets(searchBean.getExecutionPeriod(), searchBean.getTeacher(),
                        searchBean.getEvaluationDate(), searchBean.getMarkSheetState(), searchBean.getMarkSheetType());
View Full Code Here

    @Atomic
    public static void run(MarkSheet markSheet, Teacher responsibleTeacher, Date evaluationDate) throws FenixServiceException {

        if (markSheet == null) {
            throw new InvalidArgumentsServiceException("error.noMarkSheet");
        }
        markSheet.editNormal(responsibleTeacher, evaluationDate);
    }
View Full Code Here

    @Atomic
    public static void run(MarkSheetManagementEditBean markSheetManagementEditBean) throws FenixServiceException {

        MarkSheet markSheet = markSheetManagementEditBean.getMarkSheet();
        if (markSheet == null) {
            throw new InvalidArgumentsServiceException("error.noMarkSheet");
        }

        if (markSheet.getMarkSheetState() == MarkSheetState.NOT_CONFIRMED) {
            editNormalMarkSheet(markSheetManagementEditBean);

        } else if (markSheet.getMarkSheetState() == MarkSheetState.RECTIFICATION_NOT_CONFIRMED) {
            editRectificationMarkSheet(markSheetManagementEditBean);

        } else {
            throw new InvalidArgumentsServiceException("error.markSheet.invalid.state");
        }
    }
View Full Code Here

public class ConfirmMarkSheet {

    @Atomic
    public static void run(MarkSheet markSheet, Person person) throws InvalidArgumentsServiceException {
        if (markSheet == null) {
            throw new InvalidArgumentsServiceException();
        }
        markSheet.confirm(person);
    }
View Full Code Here

    }

    @Atomic(mode = TxMode.WRITE)
    public static void merge(ExecutionCourse executionCourseTo, ExecutionCourse executionCourseFrom) throws FenixServiceException {
        if (executionCourseFrom == null) {
            throw new InvalidArgumentsServiceException();
        }

        if (executionCourseTo == null) {
            throw new InvalidArgumentsServiceException();
        }

        ServiceMonitoring.logService(MergeExecutionCourses.class, executionCourseTo.getExternalId(),
                executionCourseFrom.getExternalId());
View Full Code Here

TOP

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

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.