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

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


        } else {
            loggedProfessorship = AccessControl.getPerson().getProfessorshipByExecutionCourse(executionCourse);
        }

        if (loggedProfessorship == null) {
            throw new FenixActionException("error.summariesManagement.empty.loggedProfessorship");
        }

        request.setAttribute("loggedTeacherProfessorship", loggedProfessorship);
        request.setAttribute("loggedIsResponsible", loggedProfessorship.isResponsibleFor());
        request.setAttribute("executionCourse", executionCourse);
View Full Code Here


        Professorship loggedProfessorship = (Professorship) request.getAttribute("loggedTeacherProfessorship");
        ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        NextPossibleSummaryLessonsAndDatesBean nextSummaryDateBean = getNextSummaryDateBeanFromParameter(request);

        if (!executionCourse.getLessons().contains(nextSummaryDateBean.getLesson())) {
            throw new FenixActionException();
        }

        DynaActionForm dynaActionForm = (DynaActionForm) form;

        List<NextPossibleSummaryLessonsAndDatesBean> nextPossibleLessonsDates =
View Full Code Here

                    actionErrors.add("error", new ActionMessage("label.invalid.teacher.without.auth"));
                    saveErrors(request, actionErrors);
                    return prepareAssociateTeacher(mapping, form, request, response);
                }
            } catch (FenixServiceException e) {
                throw new FenixActionException(e);
            }
        } else {
            final ActionMessages actionErrors = new ActionErrors();
            actionErrors.add("error", new ActionMessage("label.invalid.teacher.number"));
            saveErrors(request, actionErrors);
View Full Code Here

        String property = null;

        // Figure out the error
        ActionForward forward = mapping.getInputForward();
        if (ex instanceof FenixActionException) {
            FenixActionException fenixActionException = (FenixActionException) ex;
            error = ((FenixActionException) ex).getError();
            property = ((FenixActionException) ex).getProperty();
            forward =
                    fenixActionException.getActionForward() != null ? fenixActionException.getActionForward() : mapping
                            .getInputForward();
        } else if (ex instanceof EmptyRequiredFieldServiceException) {
            error = new ActionError(ex.getMessage());
            property = error.getKey();
        } else {
View Full Code Here

                declarationDTO.addAmount(event, civilYear);
            }
        }

        if (!declarationDTO.getTotalAmount().isPositive()) {
            throw new FenixActionException("error.annual.irs.declaration.no.payments.for.civil.year", civilYear);
        }
    }
View Full Code Here

            error = new ActionError("error.noGroup");
            actionErrors.add("error.noGroup", error);
            saveErrors(request, actionErrors);
            return mapping.findForward("viewShiftsAndGroups");
        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }

        List shifts = infoSiteShifts.getShifts();

        if (shifts.size() == 0) {
View Full Code Here

            actionErrors3.add("error.GroupPropertiesShiftTypeChanged", error3);
            saveErrors(request, actionErrors3);
            return mapping.findForward("viewShiftsAndGroups");

        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }
        return mapping.findForward("viewShiftsAndGroups");
    }
View Full Code Here

                return mapping.findForward("chooseRegistration");
            }
        }

        if (registration == null) {
            throw new FenixActionException();
        } else {
            final Senior senior = ReadStudentSenior.run(registration);
            request.setAttribute("senior", senior);
            return mapping.findForward("show-form");
        }
View Full Code Here

                break;
            case ABANDON:
                ExecuteProcessActivity.run(getProcess(request), AbandonIndividualProgramProcess.class.getSimpleName(), bean);
                break;
            default:
                throw new FenixActionException();
            }
        } catch (final DomainException e) {
            addErrorMessage(request, e.getMessage(), e.getArgs());
            return managePhdIndividualProgramProcessState(mapping, actionForm, request, response);
        }
View Full Code Here

            actionErrors3.add("error.UnEnrollStudentGroupShift", error3);
            saveErrors(request, actionErrors3);
            return mapping.findForward("viewShiftsAndGroups");

        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }
        return mapping.findForward("viewShiftsAndGroups");
    }
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.