Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """DCWorkflow interfaces.
00014 
00015 $Id: interfaces.py 78745 2007-08-10 20:19:46Z mj $
00016 """
00017 
00018 from zope.interface import Interface, Attribute
00019 from zope.component.interfaces import IObjectEvent
00020 
00021 class IDCWorkflowDefinition(Interface):
00022 
00023     """Web-configurable workflow definition.
00024     """
00025 
00026 class ITransitionEvent(IObjectEvent):
00027     
00028     """An event that's fired upon a workflow transition.
00029     """
00030     
00031     workflow = Attribute(u"The workflow definition triggering the transition")
00032     old_state = Attribute(u"The state definition of the workflow state before the transition")
00033     new_state = Attribute(u"The state definition of the workflow state before after transition")
00034     transition = Attribute(u"The transition definition taking place. "
00035                             "May be None if this is the 'transition' to the initial state.")                                   
00036     status = Attribute(u"The status dict of the object.")
00037     kwargs = Attribute(u"Any keyword arguments passed to doActionFor() when the transition was invoked")
00038     
00039 class IBeforeTransitionEvent(ITransitionEvent):
00040     
00041     """An event fired before a workflow transition.
00042     """
00043     
00044 class IAfterTransitionEvent(ITransitionEvent):
00045     
00046     """An event that's fired after a workflow transition.
00047     """
00048