Calendars ========= Some objects in Launchpad have calendars. Actually, currently only persons (and teams) have calendars, but it is planned to add them to products and projects as well. Calendaring code makes use of the SchoolBell library (Python package `schoolbell`), which comes from the SchoolTool project (www.schooltool.org). Launchpad calendars have some additional attributes such as title and owner, defined in the ILaunchpadCalendar interface (that extends schoolbell's IEditCalendar). Calendars are stored in the PostgreSQL database. Hooking up calendars to objects ------------------------------- Objects that have calendars can be adapted to ILaunchpadCalendar. There is an adapter registered for ICalendarOwner that returns the 'calendar' attribute of an object, so the simplest thing for adding a calendar to an object is to make sure this attribute exists, and declare that the object provides ICalendarOwner. There is a view named '+calendar' registered for ICalendarOwner, so if an object (e.g. a person) that has a calendar can be reached at a certain URL, accessing the calendar of that object is just a matter of going to URL + '/+calendar'. There is also a view named 'calendar' registered for the root object. This view provides a merged view of the calendars the user has subscribed to. There is a set of views available for ICalendar, and a traverser that interprets URL segments as dates. Interoperability with calendaring clients ----------------------------------------- Every calendar can be exported as an iCalendar file via HTTP. You can subscribe to these calendars from Mozilla Calendar (or Sunbird), Evolution, KOrganizer, Apple's iCal, etc. The get the URL for getting an iCalendar file just append '/calendar.ics' to the calendar URL, e.g. http://localhost:8085/foaf/persons/test/calendar/calendar.ics The ability to upload iCalendar files (and thus modify calendars stored in Launchpad from these calendaring clients) is not hooked up yet. There is an iCalendar parser in the schoolbell module, but the tricky part is to get Zope 3 traversal (which is heavily customized in Launchpad) to actually work for HTTP PUT requests. Security -------- All calendars are readable by everyone. Write access is restricted to the calendar owner. The calendar owner is taken from the calendar's parent: * if the calendar belongs to a team, then it is owned by the team's owner. * if the calendar belongs to a person, then it is owned by the person. * project and product calendars are owned by their respective owners. TODO ---- - Re-add recurring event support (it was disabled to make prototyping easier). SchoolBell interfaces currently define the recurrence rule as a single attribute providing one of four recurrence rule interfaces; perhaps it can be simulated with a property. Or perhaps SchoolBell's interfaces aren't general enough and could be changed to be more convenient. Talk to me (Marius Gedminas, ) if you have ideas. - Write and hook up the iCalendar upload view (HTTP PUT requests). Writing it should be easy -- use schoolbell.icalendar.read_icalendar(). Hooking it up is difficult (see the description above). * After discussion, it has been decided not to provide webcal:// write access. If you have any questions about the schoolbell library or calendaring in Launchpad, feel free to email Marius Gedminas .