[CalendarServer-changes] [5567] CalendarServer/branches/users/wsanchez/transations/twistedcaldav/ static.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 4 19:15:41 PDT 2010
Revision: 5567
http://trac.macosforge.org/projects/calendarserver/changeset/5567
Author: glyph at apple.com
Date: 2010-05-04 19:15:38 -0700 (Tue, 04 May 2010)
Log Message:
-----------
Documentation (mostly for my own reference) for createCalendar and createCalendarCollection
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/transations/twistedcaldav/static.py
Modified: CalendarServer/branches/users/wsanchez/transations/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/transations/twistedcaldav/static.py 2010-05-05 00:05:15 UTC (rev 5566)
+++ CalendarServer/branches/users/wsanchez/transations/twistedcaldav/static.py 2010-05-05 02:15:38 UTC (rev 5567)
@@ -205,11 +205,19 @@
##
def createCalendar(self, request):
- #
- # request object is required because we need to validate against parent
- # resources, and we need the request in order to locate the parents.
- #
+ """
+ External API for creating a calendar. Verify that the parent is a
+ collection, exists, is I{not} a calendar collection; that this resource
+ does not yet exist, then create it.
+ @param request: the request used to look up parent resources to
+ validate.
+
+ @type request: L{twext.web2.iweb.IRequest}
+
+ @return: a deferred that fires when a calendar collection has been
+ created in this resource.
+ """
if self.fp.exists():
log.err("Attempt to create collection where file exists: %s" % (self.fp.path,))
raise HTTPError(StatusResponse(responsecode.NOT_ALLOWED, "File exists"))
@@ -237,7 +245,14 @@
parent.addCallback(_defer)
return parent
+
def createCalendarCollection(self):
+ """
+ Internal API for creating a calendar collection.
+
+ This will immediately create the collection without performing any
+ verification. For the normal API, see L{CalDAVFile.createCalendar}.
+ """
#
# Create the collection once we know it is safe to do so
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100504/b8622691/attachment.html>
More information about the calendarserver-changes
mailing list