Back to index

plone3  3.1.7
Classes | Functions
kss.demo.events Namespace Reference

Classes

class  KSSDemoRegistrationEvent
class  KSSDemoRegistryEvent

Functions

def dispatchRegistration

Class Documentation

class kss::demo::events::KSSDemoRegistrationEvent
Redispatch of registration for demo resource utilities

Definition at line 16 of file events.py.

class kss::demo::events::KSSDemoRegistryEvent
Redispatch of registration for demo registry utilities

Definition at line 20 of file events.py.


Function Documentation

def kss.demo.events.dispatchRegistration (   registration,
  event 
)
When a demo utility is registered, add it to the registry.
When a demo utility is registered,  
event handler registered for the particular component registered,
the registration and the event.

Definition at line 25 of file events.py.

00025 
00026 def dispatchRegistration(registration, event):
00027     """When a demo utility is registered, add it to the registry.
00028     When a demo utility is registered,  
00029     event handler registered for the particular component registered,
00030     the registration and the event.
00031     """
00032     component = registration.component
00033     # Only dispatch registration of the interesting utilities.
00034     if IKSSDemoResource.providedBy(component) or \
00035             IKSSSeleniumTestResource.providedBy(component):
00036         new_event = KSSDemoRegistrationEvent()
00037         handlers = zope.component.subscribers((component, registration, event, new_event), None)
00038         for handler in handlers:
00039             pass # getting them does the work
00040     if IKSSDemoRegistry.providedBy(component):
00041         new_event = KSSDemoRegistryEvent()
00042         handlers = zope.component.subscribers((component, registration, event, new_event), None)
00043         for handler in handlers:
00044             pass # getting them does the work