public ActionForward showSummariesCalendar(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
ExecutionCourse executionCourse = getExecutinCourseFromParameter(request);
SummariesCalendarBean summariesCalendarBean = new SummariesCalendarBean(executionCourse);
Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar =
new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(
NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE_AND_HOUR);
Set<Shift> associatedShifts = executionCourse.getAssociatedShifts();
for (Shift shift : associatedShifts) {
for (Lesson lesson : shift.getAssociatedLessonsSet()) {
for (YearMonthDay lessonDate : lesson.getAllLessonDates()) {
summariesCalendar.add(new NextPossibleSummaryLessonsAndDatesBean(lesson, lessonDate));
}
}
addExtraSummariesToSummariesCalendar(summariesCalendar, shift, summariesCalendarBean.getCalendarViewType());
}
request.setAttribute("showSummariesCalendarBean", summariesCalendarBean);
request.setAttribute("summariesCalendarResult", summariesCalendar);
return mapping.findForward("showSummariesCalendar");