Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Get a single Calendar object

  • Varagar


    First of all, thank you for your work! I have a little issue with iCal4j Connector.

    If I get a Google Calendar with
    "net.fortuna.ical4j.model.Calendar cal = store.getCollection(store.getPath()).getEvents();"
    I will have one Calendar object for one event.

    Would it not be logical that the whole calendar is in a Calendar object (that all the events are in a Calendar, and not Calendar)? For example a method like this :
    "net.fortuna.ical4j.model.Calendar cal = store.getCalendar(store.getPath());"

    I don't know if you'll understand me. If it is not the case, ask.

    Thanks for your help! ;)

  • Pascal Robert
    Pascal Robert

    It's one calendar object because this is how CalDAV works, eg on the CalDAV server, it's one file per event/todo. The reason is that for updating the object, you do a PUT on the calendar object URL, if it was a big calendar file with all the objects in the collection, you would have to update the whole calendar file even if you update only one event, not very efficient.