[CMF-checkins] CVS: CMF/DCWorkflow - DCWorkflow.py:1.26
Yvo Schubbe
schubbe at web.de
Fri Jan 2 13:08:01 EST 2004
Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv1244/DCWorkflow
Modified Files:
DCWorkflow.py
Log Message:
- added __implements__ to DCWorkflow
- added 'comment' as explicit kw of doActionFor() to make verifyClass happy
- added 2 basic DCWorkflow tests
=== CMF/DCWorkflow/DCWorkflow.py 1.25 => 1.26 ===
--- CMF/DCWorkflow/DCWorkflow.py:1.25 Sat Nov 29 08:05:48 2003
+++ CMF/DCWorkflow/DCWorkflow.py Fri Jan 2 13:07:30 2004
@@ -26,11 +26,14 @@
from OFS.ObjectManager import bad_id
# CMFCore
-from Products.CMFCore.WorkflowCore import WorkflowException, \
- ObjectDeleted, ObjectMoved
-from Products.CMFCore.WorkflowTool import addWorkflowFactory
from Products.CMFCore.CMFCorePermissions import ManagePortal
+from Products.CMFCore.interfaces.portal_workflow \
+ import WorkflowDefinition as IWorkflowDefinition
from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.WorkflowCore import ObjectDeleted
+from Products.CMFCore.WorkflowCore import ObjectMoved
+from Products.CMFCore.WorkflowCore import WorkflowException
+from Products.CMFCore.WorkflowTool import addWorkflowFactory
# DCWorkflow
from utils import _dtmldir, modifyRolesForPermission
@@ -54,6 +57,9 @@
workflow definition.
UI methods are in WorkflowUIMixin.
'''
+
+ __implements__ = IWorkflowDefinition
+
meta_type = 'Workflow'
title = 'DC Workflow Definition'
_isAWorkflow = 1
@@ -250,11 +256,12 @@
return 0
security.declarePrivate('doActionFor')
- def doActionFor(self, ob, action, **kw):
+ def doActionFor(self, ob, action, comment='', **kw):
'''
Allows the user to request a workflow action. This method
must perform its own security checks.
'''
+ kw['comment'] = comment
sdef = self._getWorkflowStateOf(ob)
if sdef is None:
raise WorkflowException, 'Object is in an undefined state'
More information about the CMF-checkins
mailing list