Preferences guiPreferences = ureq.getUserSession().getGuiPreferences();
guiPreferences.putAndSave(KalendarConfig.class, kalendar.getCalendarID(), config);
}
private Calendar buildCalendar(Kalendar kalendar) {
Calendar calendar = new Calendar();
// add standard propeties
calendar.getProperties().add(new ProdId("-//Ben Fortuna//iCal4j 1.0//EN"));
calendar.getProperties().add(Version.VERSION_2_0);
calendar.getProperties().add(CalScale.GREGORIAN);
for (Iterator<KalendarEvent> iter = kalendar.getEvents().iterator(); iter.hasNext();) {
KalendarEvent kEvent = iter.next();
VEvent vEvent = getVEvent(kEvent);
calendar.getComponents().add(vEvent);
}
return calendar;
}