[CalendarServer-changes] [6080] CalendarServer/trunk/txcaldav/calendarstore/postgres.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Aug 13 16:30:51 PDT 2010
Revision: 6080
http://trac.macosforge.org/projects/calendarserver/changeset/6080
Author: sagen at apple.com
Date: 2010-08-13 16:30:51 -0700 (Fri, 13 Aug 2010)
Log Message:
-----------
Store notificationtype property on notification objects
Modified Paths:
--------------
CalendarServer/trunk/txcaldav/calendarstore/postgres.py
Modified: CalendarServer/trunk/txcaldav/calendarstore/postgres.py
===================================================================
--- CalendarServer/trunk/txcaldav/calendarstore/postgres.py 2010-08-13 23:30:21 UTC (rev 6079)
+++ CalendarServer/trunk/txcaldav/calendarstore/postgres.py 2010-08-13 23:30:51 UTC (rev 6080)
@@ -72,8 +72,8 @@
from twistedcaldav.notifications import NotificationRecord
from twistedcaldav.query.sqlgenerator import sqlgenerator
from twistedcaldav.index import IndexedSearchException
+from twistedcaldav.customxml import NotificationType
-
v1_schema = getModule(__name__).filePath.sibling(
"postgres_schema_v1.sql").getContent()
@@ -1298,6 +1298,7 @@
def setData(self, uid, xmltype, xmldata):
+ self.properties()[PropertyName(*NotificationType.qname())] = NotificationType(xmltype)
return self._txn.execSQL(
"""
update NOTIFICATION set NOTIFICATION_UID = %s, XML_TYPE = %s,
@@ -1436,8 +1437,9 @@
self._txn.execSQL(
"insert into NOTIFICATION (NOTIFICATION_HOME_RESOURCE_ID, NOTIFICATION_UID, XML_TYPE, XML_DATA) "
"values (%s, %s, %s, %s)", [self._resourceID, uid, xmltype, xmldata])
+ notificationObject = self.notificationObjectWithUID(uid)
+ notificationObject.properties()[PropertyName(*NotificationType.qname())] = NotificationType(xmltype)
-
def removeNotificationObjectWithName(self, name):
self.removeNotificationObjectWithUID(self._nameToUID(name))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100813/1afb8c7b/attachment.html>
More information about the calendarserver-changes
mailing list