Difference between DCWorkflow 0.5 and 0.5+
diff -Nur DCWorkflow/Default.py DCWorkflow-1.4.3+/Default.py
--- DCWorkflow/Default.py 2004-04-23 01:47:58.000000000 +0800
+++ DCWorkflow-1.4.3+/Default.py 2004-05-12 11:07:00.000000000 +0800
@@ -12,21 +12,22 @@
##############################################################################
""" Programmatically creates a workflow.
-$Id: Default.py,v 1.13.18.1 2004/04/22 17:47:58 sidnei Exp $
+$Id: Default.py,v 1.14.18.1 2004/05/12 10:59:36 yuppie Exp $
"""
-from Products.CMFCore.CMFCorePermissions import RequestReview, \
- ModifyPortalContent, \
- ReviewPortalContent
+from Products.CMFCore.CMFCorePermissions import AccessContentsInformation
+from Products.CMFCore.CMFCorePermissions import ModifyPortalContent
+from Products.CMFCore.CMFCorePermissions import RequestReview
+from Products.CMFCore.CMFCorePermissions import ReviewPortalContent
+from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.WorkflowTool import addWorkflowFactory
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
-from AccessControl.Permissions import view, access_contents_information
-p_access = access_contents_information
+p_access = AccessContentsInformation
p_modify = ModifyPortalContent
-p_view = view
-p_review = ReviewPortalContent
p_request = RequestReview
+p_review = ReviewPortalContent
+p_view = View
r_anon = 'Anonymous'
r_manager = 'Manager'
Binary files DCWorkflow/.Default.py.swp and DCWorkflow-1.4.3+/.Default.py.swp differ
diff -Nur DCWorkflow/States.py DCWorkflow-1.4.3+/States.py
--- DCWorkflow/States.py 2004-04-23 01:47:58.000000000 +0800
+++ DCWorkflow-1.4.3+/States.py 2004-05-12 11:09:53.000000000 +0800
@@ -12,7 +12,7 @@
##############################################################################
""" States in a web-configurable workflow.
-$Id: States.py,v 1.8.18.1 2004/04/22 17:47:58 sidnei Exp $
+$Id: States.py,v 1.9.18.1 2004/05/12 11:01:58 sidnei Exp $
"""
from string import join
@@ -97,16 +97,14 @@
_properties_form = DTMLFile('state_properties', _dtmldir)
def manage_properties(self, REQUEST, manage_tabs_message=None):
- '''
- '''
+ """Show state properties ZMI form."""
return self._properties_form(REQUEST,
management_view='Properties',
manage_tabs_message=manage_tabs_message,
)
def setProperties(self, title='', transitions=(), REQUEST=None, description=''):
- '''
- '''
+ """Set the properties for this State."""
self.title = str(title)
self.description = str(description)
self.transitions = tuple(map(str, transitions))
@@ -117,16 +115,14 @@
_variables_form = DTMLFile('state_variables', _dtmldir)
def manage_variables(self, REQUEST, manage_tabs_message=None):
- '''
- '''
+ """Show State variables ZMI form."""
return self._variables_form(REQUEST,
management_view='Variables',
manage_tabs_message=manage_tabs_message,
)
def getVariableValues(self):
- ''' get VariableValues for management UI
- '''
+ """Get VariableValues for management UI."""
vv = self.var_values
if vv is None:
return []
@@ -134,9 +130,9 @@
return vv.items()
def getWorkflowVariables(self):
- ''' get all variables that are available form
- workflow and not handled yet.
- '''
+ """Get all variables that are available from the workflow and
+ not handled yet.
+ """
wf_vars = self.getAvailableVarIds()
if self.var_values is None:
return wf_vars
@@ -147,8 +143,7 @@
return ret
def addVariable(self,id,value,REQUEST=None):
- ''' add a WorkflowVariable to State
- '''
+ """Add a WorkflowVariable to State."""
if self.var_values is None:
self.var_values = PersistentMapping()
@@ -158,8 +153,7 @@
return self.manage_variables(REQUEST, 'Variable added.')
def deleteVariables(self,ids=[],REQUEST=None):
- ''' delete a WorkflowVariable from State
- '''
+ """Delete a WorkflowVariable from State."""
vv = self.var_values
for id in ids:
if vv.has_key(id):
@@ -169,8 +163,7 @@
return self.manage_variables(REQUEST, 'Variables deleted.')
def setVariables(self, ids=[], REQUEST=None):
- ''' set values for Variables set by this state
- '''
+ """Set values for Variables set by this State."""
if self.var_values is None:
self.var_values = PersistentMapping()
@@ -187,17 +180,14 @@
_permissions_form = DTMLFile('state_permissions', _dtmldir)
def manage_permissions(self, REQUEST, manage_tabs_message=None):
- '''
- '''
-
+ """Present TTW UI for managing this State's permissions."""
return self._permissions_form(REQUEST,
management_view='Permissions',
manage_tabs_message=manage_tabs_message,
)
def setPermissions(self, REQUEST):
- '''
- '''
+ """Set the permissions in REQUEST for this State."""
pr = self.permission_roles
if pr is None:
self.permission_roles = pr = PersistentMapping()
@@ -214,8 +204,7 @@
return self.manage_permissions(REQUEST, 'Permissions changed.')
def setPermission(self, permission, acquired, roles):
- '''
- '''
+ """Set a permission for this State."""
pr = self.permission_roles
if pr is None:
self.permission_roles = pr = PersistentMapping()
--- DCWorkflow/Default.py 2004-04-23 01:47:58.000000000 +0800
+++ DCWorkflow-1.4.3+/Default.py 2004-05-12 11:07:00.000000000 +0800
@@ -12,21 +12,22 @@
##############################################################################
""" Programmatically creates a workflow.
-$Id: Default.py,v 1.13.18.1 2004/04/22 17:47:58 sidnei Exp $
+$Id: Default.py,v 1.14.18.1 2004/05/12 10:59:36 yuppie Exp $
"""
-from Products.CMFCore.CMFCorePermissions import RequestReview, \
- ModifyPortalContent, \
- ReviewPortalContent
+from Products.CMFCore.CMFCorePermissions import AccessContentsInformation
+from Products.CMFCore.CMFCorePermissions import ModifyPortalContent
+from Products.CMFCore.CMFCorePermissions import RequestReview
+from Products.CMFCore.CMFCorePermissions import ReviewPortalContent
+from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.WorkflowTool import addWorkflowFactory
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
-from AccessControl.Permissions import view, access_contents_information
-p_access = access_contents_information
+p_access = AccessContentsInformation
p_modify = ModifyPortalContent
-p_view = view
-p_review = ReviewPortalContent
p_request = RequestReview
+p_review = ReviewPortalContent
+p_view = View
r_anon = 'Anonymous'
r_manager = 'Manager'
Binary files DCWorkflow/.Default.py.swp and DCWorkflow-1.4.3+/.Default.py.swp differ
diff -Nur DCWorkflow/States.py DCWorkflow-1.4.3+/States.py
--- DCWorkflow/States.py 2004-04-23 01:47:58.000000000 +0800
+++ DCWorkflow-1.4.3+/States.py 2004-05-12 11:09:53.000000000 +0800
@@ -12,7 +12,7 @@
##############################################################################
""" States in a web-configurable workflow.
-$Id: States.py,v 1.8.18.1 2004/04/22 17:47:58 sidnei Exp $
+$Id: States.py,v 1.9.18.1 2004/05/12 11:01:58 sidnei Exp $
"""
from string import join
@@ -97,16 +97,14 @@
_properties_form = DTMLFile('state_properties', _dtmldir)
def manage_properties(self, REQUEST, manage_tabs_message=None):
- '''
- '''
+ """Show state properties ZMI form."""
return self._properties_form(REQUEST,
management_view='Properties',
manage_tabs_message=manage_tabs_message,
)
def setProperties(self, title='', transitions=(), REQUEST=None, description=''):
- '''
- '''
+ """Set the properties for this State."""
self.title = str(title)
self.description = str(description)
self.transitions = tuple(map(str, transitions))
@@ -117,16 +115,14 @@
_variables_form = DTMLFile('state_variables', _dtmldir)
def manage_variables(self, REQUEST, manage_tabs_message=None):
- '''
- '''
+ """Show State variables ZMI form."""
return self._variables_form(REQUEST,
management_view='Variables',
manage_tabs_message=manage_tabs_message,
)
def getVariableValues(self):
- ''' get VariableValues for management UI
- '''
+ """Get VariableValues for management UI."""
vv = self.var_values
if vv is None:
return []
@@ -134,9 +130,9 @@
return vv.items()
def getWorkflowVariables(self):
- ''' get all variables that are available form
- workflow and not handled yet.
- '''
+ """Get all variables that are available from the workflow and
+ not handled yet.
+ """
wf_vars = self.getAvailableVarIds()
if self.var_values is None:
return wf_vars
@@ -147,8 +143,7 @@
return ret
def addVariable(self,id,value,REQUEST=None):
- ''' add a WorkflowVariable to State
- '''
+ """Add a WorkflowVariable to State."""
if self.var_values is None:
self.var_values = PersistentMapping()
@@ -158,8 +153,7 @@
return self.manage_variables(REQUEST, 'Variable added.')
def deleteVariables(self,ids=[],REQUEST=None):
- ''' delete a WorkflowVariable from State
- '''
+ """Delete a WorkflowVariable from State."""
vv = self.var_values
for id in ids:
if vv.has_key(id):
@@ -169,8 +163,7 @@
return self.manage_variables(REQUEST, 'Variables deleted.')
def setVariables(self, ids=[], REQUEST=None):
- ''' set values for Variables set by this state
- '''
+ """Set values for Variables set by this State."""
if self.var_values is None:
self.var_values = PersistentMapping()
@@ -187,17 +180,14 @@
_permissions_form = DTMLFile('state_permissions', _dtmldir)
def manage_permissions(self, REQUEST, manage_tabs_message=None):
- '''
- '''
-
+ """Present TTW UI for managing this State's permissions."""
return self._permissions_form(REQUEST,
management_view='Permissions',
manage_tabs_message=manage_tabs_message,
)
def setPermissions(self, REQUEST):
- '''
- '''
+ """Set the permissions in REQUEST for this State."""
pr = self.permission_roles
if pr is None:
self.permission_roles = pr = PersistentMapping()
@@ -214,8 +204,7 @@
return self.manage_permissions(REQUEST, 'Permissions changed.')
def setPermission(self, permission, acquired, roles):
- '''
- '''
+ """Set a permission for this State."""
pr = self.permission_roles
if pr is None:
self.permission_roles = pr = PersistentMapping()