[CalendarServer-changes] [836]
CalendarServer/trunk/twistedcaldav/static.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Dec 15 08:30:34 PST 2006
Revision: 836
http://trac.macosforge.org/projects/calendarserver/changeset/836
Author: cdaboo at apple.com
Date: 2006-12-15 08:30:34 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
Make sure dropbox auto-provisions itself.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/static.py
Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py 2006-12-15 06:12:30 UTC (rev 835)
+++ CalendarServer/trunk/twistedcaldav/static.py 2006-12-15 16:30:34 UTC (rev 836)
@@ -459,18 +459,22 @@
return super(CalendarHomeFile, self).getChild(name)
-class ScheduleFile (CalDAVFile):
- def __init__(self, path, parent):
- super(ScheduleFile, self).__init__(path, principalCollections=parent.principalCollections())
- self._parent = parent
-
+class AutoProvisionCalDAVFile(CalDAVFile):
+ """
+ A class that makes a resource auto-provision itself when someone tries to locate it.
+ """
def provision(self):
provisionFile(self, self._parent)
def locateChild(self, path, segments):
self.provision()
- return super(ScheduleFile, self).locateChild(path, segments)
+ return super(AutoProvisionCalDAVFile, self).locateChild(path, segments)
+class ScheduleFile (AutoProvisionCalDAVFile):
+ def __init__(self, path, parent):
+ super(ScheduleFile, self).__init__(path, principalCollections=parent.principalCollections())
+ self._parent = parent
+
def createSimilarFile(self, path):
if path == self.fp.path:
return self
@@ -522,10 +526,10 @@
def __repr__(self):
return "<%s (calendar outbox collection): %s>" % (self.__class__.__name__, self.fp.path)
-class DropBoxHomeFile (DropBoxHomeResource, CalDAVFile):
+class DropBoxHomeFile (DropBoxHomeResource, AutoProvisionCalDAVFile):
def __init__(self, path, parent):
DropBoxHomeResource.__init__(self)
- CalDAVFile.__init__(self, path, principalCollections=parent.principalCollections())
+ AutoProvisionCalDAVFile.__init__(self, path, principalCollections=parent.principalCollections())
self._parent = parent
def provision(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061215/4d1129d4/attachment.html
More information about the calendarserver-changes
mailing list