Back to index

plone3  3.1.7
events.py
Go to the documentation of this file.
00001 from zope.interface import implements
00002 from zope.component.interfaces import ObjectEvent
00003 
00004 from interfaces import ITransitionEvent, IBeforeTransitionEvent, IAfterTransitionEvent
00005 
00006 class TransitionEvent(ObjectEvent):
00007     implements(ITransitionEvent)
00008     
00009     def __init__(self, obj, workflow, old_state, new_state, transition, status, kwargs):
00010         ObjectEvent.__init__(self, obj)
00011         self.workflow = workflow
00012         self.old_state = old_state
00013         self.new_state = new_state
00014         self.transition = transition
00015         self.status = status
00016         self.kwargs = kwargs
00017         
00018 class BeforeTransitionEvent(TransitionEvent):
00019     implements(IBeforeTransitionEvent)
00020     
00021 class AfterTransitionEvent(TransitionEvent):
00022     implements(IAfterTransitionEvent)