this.projectsCalendarLink = new ArrayList();
StringBuilder linkLabel;
final DateFormat sdf = new SimpleDateFormat("HH:mm");
for (final ExecutionCourse executionCourse : this.getExecutionCoursesWithProjects()) {
for (final Project project : executionCourse.getAssociatedProjects()) {
final CalendarLink calendarLinkBegin = new CalendarLink();
calendarLinkBegin.setObjectOccurrence(project.getBegin());
linkLabel = new StringBuilder(20);
linkLabel.append(executionCourse.getSigla());
linkLabel.append(" (").append(sdf.format(project.getBegin())).append(")");
linkLabel.append("<br/>")
.append(BundleUtil.getString(Bundle.APPLICATION, "label.coordinator.enrolmentBegin"));
calendarLinkBegin.setObjectLinkLabel(linkLabel.toString());
final CalendarLink calendarLinkEnd = new CalendarLink();
calendarLinkEnd.setObjectOccurrence(project.getEnd());
linkLabel = new StringBuilder(20);
linkLabel.append(executionCourse.getSigla());
linkLabel.append(" (").append(sdf.format(project.getEnd())).append(")");
linkLabel.append("<br/>").append(BundleUtil.getString(Bundle.APPLICATION, "label.delivery"));
calendarLinkEnd.setObjectLinkLabel(linkLabel.toString());
final Map<String, String> linkParameters = new HashMap<String, String>();
linkParameters.put("degreeCurricularPlanID", getDegreeCurricularPlanID().toString());
linkParameters.put("executionPeriodID", getExecutionPeriodID().toString());
linkParameters.put("executionCourseID", executionCourse.getExternalId().toString());
linkParameters.put("curricularYearID", getCurricularYearID().toString());
linkParameters.put("evaluationID", project.getExternalId().toString());
calendarLinkBegin.setLinkParameters(linkParameters);
calendarLinkEnd.setLinkParameters(linkParameters);
projectsCalendarLink.add(calendarLinkBegin);
projectsCalendarLink.add(calendarLinkEnd);
}
}
}