[CalendarServer-changes] [2687] CalendarServer/branches/users/sagen/xmpp/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jul 11 10:56:42 PDT 2008
Revision: 2687
http://trac.macosforge.org/projects/calendarserver/changeset/2687
Author: wsanchez at apple.com
Date: 2008-07-11 10:56:42 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
Move xmpp-uri from CalendarHomeFile to DirectoryCalendarHomeResource.
Modified Paths:
--------------
CalendarServer/branches/users/sagen/xmpp/twistedcaldav/directory/calendar.py
CalendarServer/branches/users/sagen/xmpp/twistedcaldav/static.py
Modified: CalendarServer/branches/users/sagen/xmpp/twistedcaldav/directory/calendar.py
===================================================================
--- CalendarServer/branches/users/sagen/xmpp/twistedcaldav/directory/calendar.py 2008-07-11 17:48:20 UTC (rev 2686)
+++ CalendarServer/branches/users/sagen/xmpp/twistedcaldav/directory/calendar.py 2008-07-11 17:56:42 UTC (rev 2687)
@@ -42,7 +42,10 @@
from twistedcaldav.schedule import ScheduleInboxResource, ScheduleOutboxResource
from twistedcaldav.directory.idirectory import IDirectoryService
from twistedcaldav.directory.resource import AutoProvisioningResourceMixIn
+from twistedcaldav.notify import getPubSubConfiguration, getPubSubPath
+from twistedcaldav.notify import getPubSubXMPPURI
+
# Use __underbars__ convention to avoid conflicts with directory resource types.
uidsResourceName = "__uids__"
@@ -247,6 +250,10 @@
"""
Calendar home collection resource.
"""
+ liveProperties = CalDAVFile.liveProperties + (
+ (customxml.calendarserver_namespace, "xmpp-uri"),
+ )
+
def __init__(self, parent, record):
"""
@param path: the path to the file which will back the resource.
@@ -316,6 +323,23 @@
def isCollection(self):
return True
+ def readProperty(self, property, request):
+ if type(property) is tuple:
+ qname = property
+ else:
+ qname = property.qname()
+
+ if qname == (customxml.calendarserver_namespace, "xmpp-uri"):
+ pubSubConfiguration = getPubSubConfiguration(config)
+ if pubSubConfiguration['enabled']:
+ return succeed(customxml.PubSubXMPPURIProperty(
+ getPubSubXMPPURI(self.url(), pubSubConfiguration)))
+ else:
+ return succeed(customxml.PubSubXMPPURIProperty())
+
+ return super(CalendarHomeFile, self).readProperty(property, request)
+
+
##
# ACL
##
Modified: CalendarServer/branches/users/sagen/xmpp/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/sagen/xmpp/twistedcaldav/static.py 2008-07-11 17:48:20 UTC (rev 2686)
+++ CalendarServer/branches/users/sagen/xmpp/twistedcaldav/static.py 2008-07-11 17:56:42 UTC (rev 2687)
@@ -70,12 +70,8 @@
from twistedcaldav.directory.resource import AutoProvisioningResourceMixIn
from twistedcaldav.log import Logger
from twistedcaldav.timezoneservice import TimezoneServiceResource
-
from twistedcaldav.cache import DisabledCacheNotifier, PropfindCacheMixin
-from twistedcaldav.notify import getPubSubConfiguration, getPubSubPath
-from twistedcaldav.notify import getPubSubXMPPURI
-
log = Logger()
class CalDAVFile (CalDAVResource, DAVFile):
@@ -562,10 +558,6 @@
"""
cacheNotifierFactory = DisabledCacheNotifier
- liveProperties = CalDAVFile.liveProperties + (
- (customxml.calendarserver_namespace, "xmpp-uri"),
- )
-
def __init__(self, path, parent, record):
"""
@param path: the path to the file which will back the resource.
@@ -609,23 +601,8 @@
return super(CalendarHomeFile, self).getChild(name)
- def readProperty(self, property, request):
- if type(property) is tuple:
- qname = property
- else:
- qname = property.qname()
- if qname == (customxml.calendarserver_namespace, "xmpp-uri"):
- pubSubConfiguration = getPubSubConfiguration(config)
- if pubSubConfiguration['enabled']:
- return succeed(customxml.PubSubXMPPURIProperty(
- getPubSubXMPPURI(self.url(), pubSubConfiguration)))
- else:
- return succeed(customxml.PubSubXMPPURIProperty())
- return super(CalendarHomeFile, self).readProperty(property, request)
-
-
class ScheduleFile (AutoProvisioningFileMixIn, CalDAVFile):
def __init__(self, path, parent):
super(ScheduleFile, self).__init__(path, principalCollections=parent.principalCollections())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080711/81c143d4/attachment.html
More information about the calendarserver-changes
mailing list