~launchpad-pqm/launchpad/devel

1064.1.19 by James Henstridge
merge from marius
1
Calendars
2
=========
3
1064.1.21 by James Henstridge
merge from marius
4
Some objects in Launchpad have calendars.  Actually, currently only persons
1064.1.19 by James Henstridge
merge from marius
5
(and teams) have calendars, but it is planned to add them to products and
1064.1.25 by James Henstridge
merge from Marius
6
projects as well.
1064.1.21 by James Henstridge
merge from marius
7
8
Calendaring code makes use of the SchoolBell library (Python package
9
`schoolbell`), which comes from the SchoolTool project (www.schooltool.org).
10
11
Launchpad calendars have some additional attributes such as title and owner,
12
defined in the ILaunchpadCalendar interface (that extends schoolbell's
13
IEditCalendar).  Calendars are stored in the PostgreSQL database.
14
1064.1.19 by James Henstridge
merge from marius
15
16
Hooking up calendars to objects
1064.1.21 by James Henstridge
merge from marius
17
-------------------------------
1064.1.19 by James Henstridge
merge from marius
18
1650.2.23 by James Henstridge
some of Salgado's review fixes
19
Objects that have calendars can be adapted to ILaunchpadCalendar.
20
There is an adapter registered for ICalendarOwner that returns the
21
'calendar' attribute of an object, so the simplest thing for adding a
22
calendar to an object is to make sure this attribute exists, and
23
declare that the object provides ICalendarOwner.
24
25
There is a view named '+calendar' registered for ICalendarOwner, so if
26
an object (e.g. a person) that has a calendar can be reached at a
27
certain URL, accessing the calendar of that object is just a matter of
28
going to URL + '/+calendar'.
29
30
There is also a view named 'calendar' registered for the root object.
31
This view provides a merged view of the calendars the user has
32
subscribed to.
1064.1.19 by James Henstridge
merge from marius
33
1064.1.21 by James Henstridge
merge from marius
34
There is a set of views available for ICalendar, and a traverser that
35
interprets URL segments as dates.
36
37
38
Interoperability with calendaring clients
39
-----------------------------------------
40
41
Every calendar can be exported as an iCalendar file via HTTP.  You can
42
subscribe to these calendars from Mozilla Calendar (or Sunbird), Evolution,
43
KOrganizer, Apple's iCal, etc.  The get the URL for getting an iCalendar file
44
just append '/calendar.ics' to the calendar URL, e.g.
45
46
   http://localhost:8085/foaf/persons/test/calendar/calendar.ics
47
48
The ability to upload iCalendar files (and thus modify calendars stored in
49
Launchpad from these calendaring clients) is not hooked up yet.  There is
50
an iCalendar parser in the schoolbell module, but the tricky part is to get
51
Zope 3 traversal (which is heavily customized in Launchpad) to actually
52
work for HTTP PUT requests.
53
54
55
Security
56
--------
57
1650.2.23 by James Henstridge
some of Salgado's review fixes
58
All calendars are readable by everyone.  Write access is restricted to
59
the calendar owner.  The calendar owner is taken from the calendar's
60
parent:
61
  * if the calendar belongs to a team, then it is owned by the team's
62
    owner.
63
  * if the calendar belongs to a person, then it is owned by the
64
    person.
65
  * project and product calendars are owned by their respective
66
    owners.
1064.1.19 by James Henstridge
merge from marius
67
1064.1.25 by James Henstridge
merge from Marius
68
69
TODO
70
----
71
1650.2.23 by James Henstridge
some of Salgado's review fixes
72
- Re-add recurring event support (it was disabled to make prototyping
73
  easier).  SchoolBell interfaces currently define the recurrence rule
74
  as a single attribute providing one of four recurrence rule
75
  interfaces; perhaps it can be simulated with a property.  Or perhaps
76
  SchoolBell's interfaces aren't general enough and could be changed
77
  to be more convenient.  Talk to me (Marius Gedminas,
1064.1.25 by James Henstridge
merge from Marius
78
  <marius@pov.lt>) if you have ideas.
79
1650.2.23 by James Henstridge
some of Salgado's review fixes
80
- Write and hook up the iCalendar upload view (HTTP PUT requests).
81
  Writing it should be easy -- use
82
  schoolbell.icalendar.read_icalendar().  Hooking it up is difficult
83
  (see the description above).
84
   * After discussion, it has been decided not to provide webcal://
85
     write access.
1064.1.25 by James Henstridge
merge from Marius
86
87
88
If you have any questions about the schoolbell library or calendaring in
89
Launchpad, feel free to email Marius Gedminas <marius@pov.lt>.
90