ServiceUtils.executeService( SessionUtils.getUserView(request), "CreateLesson", args);
try { ServiceUtils.executeService( SessionUtils.getUserView(request), "CreateLesson", args); } catch (CreateLesson.InvalidLoadException ex) {  if (ex.getMessage().endsWith("REACHED")) { actionErrors.add( "errors.shift.hours.limit.reached", new ActionError("errors.shift.hours.limit.reached")); } else { actionErrors.add( "errors.shift.hours.limit.exceeded", new ActionError("errors.shift.hours.limit.exceeded")); } saveErrors(request, actionErrors); return mapping.getInputForward(); }
	public ActionForward createLesson(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception {		DynaActionForm manageLessonForm = (DynaActionForm) form;		request.setAttribute("manageLessonForm", manageLessonForm);		DiaSemana weekDay =			new DiaSemana(				new Integer(					formDay2EnumerateDay(						(String) manageLessonForm.get("diaSemana"))));		Calendar inicio = Calendar.getInstance();		inicio.set(			Calendar.HOUR_OF_DAY,			Integer.parseInt((String) manageLessonForm.get("horaInicio")));		inicio.set(			Calendar.MINUTE,			Integer.parseInt((String) manageLessonForm.get("minutosInicio")));		inicio.set(Calendar.SECOND, 0);		Calendar fim = Calendar.getInstance();		fim.set(			Calendar.HOUR_OF_DAY,			Integer.parseInt((String) manageLessonForm.get("horaFim")));		fim.set(			Calendar.MINUTE,			Integer.parseInt((String) manageLessonForm.get("minutosFim")));		fim.set(Calendar.SECOND, 0);		InfoRoom infoSala = new InfoRoom();		infoSala.setNome((String) manageLessonForm.get("nomeSala"));		ActionErrors actionErrors =			checkTimeIntervalAndWeekDay(inicio, fim, weekDay);		if (actionErrors.isEmpty()) {			InfoRoom infoRoom = new InfoRoom();			infoRoom.setCapacidadeNormal(new Integer(0));			infoRoom.setCapacidadeExame(new Integer(0));			InfoLesson infoLesson = new InfoLesson();			infoLesson.setDiaSemana(weekDay);			infoLesson.setInicio(inicio);			infoLesson.setFim(fim);			InfoShift infoShift =				(InfoShift) (request.getAttribute(SessionConstants.SHIFT));			infoLesson.setInfoDisciplinaExecucao(				infoShift.getInfoDisciplinaExecucao());			infoLesson.setTipo(infoShift.getTipo());			infoLesson.setInfoSala(infoSala);			Object args[] = { infoLesson, infoShift };			ServiceUtils.executeService(				SessionUtils.getUserView(request),				"CreateLesson",				args);			return mapping.findForward("EditShift");		} else {			saveErrors(request, actionErrors);			return mapping.getInputForward();		}	}