示例#1
0
    def createNotification(self, id, action, guid=None):
        notification = NotificationSubscription(id)
        notification.action = action
        self._updateContent(notification)

        self._getNotificationManager()._setObject(id, notification)

        acquired_notification = self._getNotificationManager().findChild(id)
        self.notificationPermissions.setupNotification(acquired_notification)
        self.updateNotificationSubscriptions(notification)

        notification = self._getNotificationManager().findChild(id)
        notification.userRead = True
        notification.userWrite = True
        notification.userManage = True

        if guid:
            IGlobalIdentifier(notification).guid = guid

        return notification
示例#2
0
    def createNotification(self, id, action, guid=None):
        notification = NotificationSubscription(id)
        notification.action = action
        self._updateContent(notification)

        self._getNotificationManager()._setObject(id, notification)

        acquired_notification = self._getNotificationManager().findChild(id)
        self.notificationPermissions.setupNotification(acquired_notification)
        self.updateNotificationSubscriptions(notification)

        notification = self._getNotificationManager().findChild(id)
        notification.userRead = True
        notification.userWrite = True
        notification.userManage = True

        if guid:
            IGlobalIdentifier(notification).guid = guid

        return notification