public ActionForward prepareEditSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws FenixServiceException {
Professorship teacherLogged = ((Professorship) request.getAttribute("loggedTeacherProfessorship"));
DynaActionForm dynaActionForm = (DynaActionForm) form;
Summary summary = getSummaryFromParameter(request);
SummaryType summaryType;
if (summary.isExtraSummary()) {
summaryType = SummaryType.EXTRA_SUMMARY;
request.setAttribute("notShowLessonPlanningsAndSummaries", Boolean.TRUE);
} else {
summaryType = SummaryType.NORMAL_SUMMARY;
}
DateTimeFieldType[] dateTimeFieldTypes = { DateTimeFieldType.hourOfDay(), DateTimeFieldType.minuteOfHour() };
HourMinuteSecond time = summary.getSummaryHourHourMinuteSecond();
int[] timeArray = { time.getHour(), time.getMinuteOfHour() };
Partial timePartial = new Partial(dateTimeFieldTypes, timeArray);
SummariesManagementBean bean =
new SummariesManagementBean(summary.getTitle(), summary.getSummaryText(), summary.getStudentsNumber(),
summaryType, summary.getProfessorship(), summary.getTeacherName(), summary.getTeacher(),
summary.getShift(), summary.getLesson(), summary.getSummaryDateYearMonthDay(), summary.getRoom(),
timePartial, summary, teacherLogged, summary.getSummaryType(), summary.getTaught());
return goToSummaryManagementPageAgain(mapping, request, dynaActionForm, bean);
}