Package org.fenixedu.academic.ui.struts.action.exceptions

Examples of org.fenixedu.academic.ui.struts.action.exceptions.FenixActionException


        @Atomic
        TeacherAuthorization create() throws FenixActionException {

            User user = User.findByUsername(getUsername());
            if (user == null) {
                throw new FenixActionException("label.invalid.username");
            }
            final Person person = user.getPerson();

            if (person.getTeacher() == null) {
                new Teacher(person);
View Full Code Here


                }
                lastOpenYear = state.getStateDate().getYear();

            }
            if (!yearWithinWorkingDevelopmentPeriod) {
                throw new FenixActionException("error.chosen.year.not.within.working.period");
            }

            PhdGratuityEvent.create(getProcess(request), year, process.getWhenFormalizedRegistration().toDateTimeAtMidnight());

            return prepare(mapping, actionForm, request, response);
View Full Code Here

        try {
            UnEnrollStudentFromShift.runUnEnrollStudentFromShift(registration, shiftId);

        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }

        return start(mapping, form, request, response);
    }
View Full Code Here

        request.setAttribute("infoExecutionDegreeId", infoExecutionDegreeIdString);
        Boolean result = new Boolean(false);
        try {
            result = ReadCoordinationResponsibility.runReadCoordinationResponsibility(infoExecutionDegreeIdString, userView);
        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }

        request.setAttribute("isResponsible", result);

        return mapping.findForward("addCoordinator");
View Full Code Here

            ActionErrors actionErrors = new ActionErrors();
            actionErrors.add("unknownTeacher", new ActionError("error.nonExistingTeacher"));
            saveErrors(request, actionErrors);
            return prepareAddCoordinator(mapping, form, request, response);
        } catch (InvalidArgumentsServiceException e) {
            throw new FenixActionException(e);
        } catch (ExistingServiceException e) {
            ActionErrors actionErrors = new ActionErrors();
            actionErrors.add("existingCoordinator", new ActionError("error.existingTeacher"));
            saveErrors(request, actionErrors);
            return prepareAddCoordinator(mapping, form, request, response);
View Full Code Here

        String infoExecutionDegreeIdString = request.getParameter("infoExecutionDegreeId");
        request.setAttribute("infoExecutionDegreeId", infoExecutionDegreeIdString);
        try {
            RemoveCoordinators.runRemoveCoordinators(infoExecutionDegreeIdString, coordinators);
        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }

        return viewTeam(mapping, form, request, response);
    }
View Full Code Here

    private void checkArguments(HttpServletRequest request, DismissalBean dismissalBean) throws FenixActionException {
        if (dismissalBean.getDismissalType() == DismissalType.CURRICULAR_COURSE_CREDITS) {
            if (!dismissalBean.hasAnyDismissals() && !dismissalBean.hasAnyOptionalDismissals()) {
                addActionMessage("error", request, "error.studentDismissal.curricularCourse.required");
                throw new FenixActionException();
            }
        } else if (dismissalBean.getDismissalType() == DismissalType.CURRICULUM_GROUP_CREDITS) {
            if (dismissalBean.getCourseGroup() == null) {
                addActionMessage("error", request, "error.studentDismissal.curriculumGroup.required");
                throw new FenixActionException();
            }
        } else {
            if (dismissalBean.getCurriculumGroup() == null) {
                addActionMessage("error", request, "error.studentDismissal.curriculumGroup.required");
                throw new FenixActionException();
            }
        }
    }
View Full Code Here

        if (plan != null) {
            studentEnrolmentBean.setStudentCurricularPlan(plan);
            studentEnrolmentBean.setExecutionPeriod(ExecutionSemester.readActualExecutionSemester());
            return showExecutionPeriodEnrolments(studentEnrolmentBean, mapping, actionForm, request, response);
        } else {
            throw new FenixActionException();
        }
    }
View Full Code Here

            infoCurricularCourse = ReadCurricularCourseByID.run(courseID);
        } catch (NonExistingServiceException e) {

        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }

        if (infoCurricularCourse != null) {
            request.setAttribute("infoCurricularCourse", infoCurricularCourse);
        }
View Full Code Here

        if (method == "syncClasses") {
            return getClassCalendar(user, validity, request);
        } else if (method == "syncExams") {
            return getExamsCalendar(user, validity, request);
        } else {
            throw new FenixActionException("unexpected.syncing.method");
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.ui.struts.action.exceptions.FenixActionException

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.