Integer newShiftCode = new Integer(newShiftString); Object args[] = { objectCode, studentGroupCode, groupPropertiesCode, newShiftCode };  try { ServiceManagerServiceFactory.executeService(userView, "EnrollStudentGroupShift", args); } catch (ExistingServiceException e) { ActionErrors actionErrors = new ActionErrors(); ActionError error = null; error = new ActionError("error.noGroupProperties"); actionErrors.add("error.noGroupProperties", error); saveErrors(request, actionErrors); return prepareViewExecutionCourseProjects(mapping, form, request, response); } catch (InvalidArgumentsServiceException e) { ActionErrors actionErrors = new ActionErrors(); ActionError error = null; error = new ActionError("error.noGroup"); actionErrors.add("error.noGroup", error); saveErrors(request, actionErrors); return viewShiftsAndGroups(mapping, form, request, response);  } catch (InvalidSituationServiceException e) { ActionErrors actionErrors = new ActionErrors(); ActionError error = null; error = new ActionError("error.noShift"); actionErrors.add("error.noShift", error); saveErrors(request, actionErrors); return viewShiftsAndGroups(mapping, form, request, response);  } catch (InvalidChangeServiceException e) { ActionErrors actionErrors = new ActionErrors(); ActionError error = null; error = new ActionError("error.enrollStudentGroupShift"); actionErrors.add("error.enrollStudentGroupShift", error); saveErrors(request, actionErrors); return viewShiftsAndGroups(mapping, form, request, response);  } catch (FenixServiceException e) { throw new FenixActionException(e); }  return viewShiftsAndGroups(mapping, form, request, response);
    public ActionForward enrollStudentGroupShift(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException,            FenixFilterException {        HttpSession session = request.getSession(false);        Integer objectCode = getObjectCode(request);        DynaActionForm enrollStudentGroupForm = (DynaActionForm) form;        UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW);        String studentGroupCodeString = request.getParameter("studentGroupCode");        Integer studentGroupCode = new Integer(studentGroupCodeString);        String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");        Integer groupPropertiesCode = new Integer(groupPropertiesCodeString);        String newShiftString = (String) enrollStudentGroupForm.get("shift");        if (newShiftString.equals("")) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("errors.invalid.insert.studentGroupShift");            actionErrors.add("errors.invalid.insert.studentGroupShift", error);            saveErrors(request, actionErrors);            return prepareEnrollStudentGroupShift(mapping, form, request, response);        }        Integer newShiftCode = new Integer(newShiftString);        Object args[] = { objectCode, studentGroupCode, groupPropertiesCode, newShiftCode };        try {            ServiceManagerServiceFactory.executeService(userView, "EnrollStudentGroupShift", args);        } catch (ExistingServiceException e) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noGroupProperties");            actionErrors.add("error.noGroupProperties", error);            saveErrors(request, actionErrors);            return prepareViewExecutionCourseProjects(mapping, form, request, response);        } catch (InvalidArgumentsServiceException e) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noGroup");            actionErrors.add("error.noGroup", error);            saveErrors(request, actionErrors);            return viewShiftsAndGroups(mapping, form, request, response);        } catch (InvalidSituationServiceException e) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noShift");            actionErrors.add("error.noShift", error);            saveErrors(request, actionErrors);            return viewShiftsAndGroups(mapping, form, request, response);        } catch (InvalidChangeServiceException e) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.enrollStudentGroupShift");            actionErrors.add("error.enrollStudentGroupShift", error);            saveErrors(request, actionErrors);            return viewShiftsAndGroups(mapping, form, request, response);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        return viewShiftsAndGroups(mapping, form, request, response);    }