[Zope3-checkins] SVN: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/interfaces.py ITranstionEventUser interface

Julien Anguenot ja at nuxeo.com
Tue Oct 12 06:30:01 EDT 2004


Log message for revision 27993:
  ITranstionEventUser interface


Changed:
  U   Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/interfaces.py


-=-
Modified: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/interfaces.py
===================================================================
--- Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/interfaces.py	2004-10-12 10:29:22 UTC (rev 27992)
+++ Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/interfaces.py	2004-10-12 10:29:59 UTC (rev 27993)
@@ -24,6 +24,8 @@
 from zope.app.container.constraints import ContainerTypesConstraint
 from zope.app.container.constraints import ItemTypePrecondition
 
+from zope.app.event.interfaces import IObjectEvent
+
 from zope.app.workflow.interfaces import IWorkflowEvent
 from zope.app.workflow.interfaces import IProcessDefinition
 from zope.app.workflow.interfaces import IProcessInstance, IPIAdapter
@@ -57,7 +59,6 @@
     """This event is published after the transition. This is important for
     objects that might change permissions when changing the status."""
 
-
 class IState(Interface):
     """Interface for state of a stateful workflow process definition."""
     # TODO: Should at least have a title, if not a value as well
@@ -70,7 +71,6 @@
         default=None,
         required=False)
 
-
 class IStatefulStatesContainer(IProcessDefinitionElementContainer):
     """Container that stores States."""
 
@@ -78,9 +78,9 @@
         """Add a state"""
 
     __setitem__.precondition = ItemTypePrecondition(IState)
-    
 
 
+
 class IStateContained(IContained):
     """Interface for state of a stateful workflow process definition."""
 
@@ -92,13 +92,13 @@
 class ITransition(Interface):
     """Stateful workflow transition."""
 
-    sourceState = zope.schema.Choice( 
+    sourceState = zope.schema.Choice(
         title=_(u"Source State"),
         description=_(u"Name of the source state."),
         vocabulary=u"Workflow State Names",
         required=True)
 
-    destinationState = zope.schema.Choice( 
+    destinationState = zope.schema.Choice(
         title=_(u"Destination State"),
         description=_(u"Name of the destination state."),
         vocabulary=u"Workflow State Names",
@@ -122,7 +122,6 @@
         default=CheckerPublic,
         required=True)
 
-
     triggerMode = zope.schema.Choice(
         title=_(u"Trigger Mode"),
         description=_(u"How the Transition is triggered (Automatic/Manual)"),
@@ -221,11 +220,6 @@
     def fireTransition(id):
         """Fire a outgoing transitions."""
 
-
-
-
-
-
 class IContentProcessRegistry(Interface):
     """Content Type <-> Process Definitions Registry
 
@@ -259,3 +253,12 @@
         This method reads in all the interfaces this object implements and
         finds then the corresponding process names using the
         IContentProcessRegistry."""
+
+####################################################################
+
+class ITransitionEventUserTriggered(IObjectEvent):
+    """ Transition event triggered by user interface
+    """
+
+    kwargs = Attribute('Mapping containing information coming from the form')
+    form_action = Attribute('Form action')



More information about the Zope3-Checkins mailing list