Пример #1
0
def publishModified(ob, event):
    publisher = getModelChangePublisher()

    fromMaintWindow = False
    if hasattr(event, 'triggered_by_maint_window') and event.triggered_by_maint_window:
        fromMaintWindow = True
    publisher.publishModified(ob, fromMaintWindow)
 def afterSetUp(self):
     super(TestPublishModelChanges, self).afterSetUp()
     
     self.publisher = getModelChangePublisher()
     from zope.component import getGlobalSiteManager
     # register the component
     gsm = getGlobalSiteManager()
     queue = DummyQueuePublisher()
     gsm.registerUtility(queue, IQueuePublisher)
     self.queue = queue
     # create a dummy device
     self.device = self.dmd.Devices.createInstance('testDevice')
     self.publisher.publishAdd(self.device)
    def afterSetUp(self):
        super(TestPublishModelChanges, self).afterSetUp()

        self.publisher = getModelChangePublisher()
        from zope.component import getGlobalSiteManager
        # register the component
        gsm = getGlobalSiteManager()
        queue = DummyQueuePublisher()
        gsm.registerUtility(queue, IQueuePublisher)
        self.queue = queue
        # create a dummy device
        self.device = self.dmd.Devices.createInstance('testDevice')
        self.publisher.publishAdd(self.device)
 def afterSetUp(self):
     super(TestPublishEvents, self).afterSetUp()
     self.publisher = getModelChangePublisher()
     # create a dummy device
     self.device = self.dmd.Devices.createInstance('testDevice')
     self.publisher.publishAdd(self.device)
Пример #5
0
 def afterSetUp(self):
     super(TestPublishEvents, self).afterSetUp()
     self.publisher = getModelChangePublisher()
     # create a dummy device
     self.device = self.dmd.Devices.createInstance('testDevice')
     self.publisher.publishAdd(self.device)
Пример #6
0
def publishObjectMove(ob, event):
    publisher = getModelChangePublisher()
    publisher.moveObject(ob, event.fromOrganizer, event.toOrganizer)
Пример #7
0
def publishRemoveEdge(ob, event):
    publisher = getModelChangePublisher()
    publisher.removeFromOrganizer(ob, event.organizer)
Пример #8
0
def publishAddEdge(ob, event):
    publisher = getModelChangePublisher()
    publisher.addToOrganizer(ob, event.organizer)
Пример #9
0
def publishModified(ob, event):
    publisher = getModelChangePublisher()
    publisher.publishModified(ob)
Пример #10
0
def publishRemove(ob, event):
    publisher = getModelChangePublisher()
    publisher.publishRemove(ob)
Пример #11
0
def publishObjectMove(ob, event):
    publisher = getModelChangePublisher()
    publisher.moveObject(ob, event.fromOrganizer,
                         event.toOrganizer)
Пример #12
0
def publishRemoveEdge(ob, event):
    publisher = getModelChangePublisher()
    publisher.removeFromOrganizer(ob, event.organizer)
Пример #13
0
def publishAddEdge(ob, event):
    publisher = getModelChangePublisher()
    publisher.addToOrganizer(ob, event.organizer)
Пример #14
0
def publishRemove(ob, event):
    publisher = getModelChangePublisher()
    publisher.publishRemove(ob)
Пример #15
0
def publishAdd(ob, event):
    publisher = getModelChangePublisher()
    publisher.publishAdd(ob)