[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Workflow - WorkflowService.py:1.2.24.2 IWorkflowService.py:1.2.24.2
Ulrich Eck
ueck@net-labs.de
Wed, 4 Dec 2002 05:39:39 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Workflow
In directory cvs.zope.org:/tmp/cvs-serv20605
Modified Files:
Tag: sprintathon-wf-branch
WorkflowService.py IWorkflowService.py
Log Message:
clarify Interface
update WorkflowService configuration management
=== Zope3/lib/python/Zope/App/Workflow/WorkflowService.py 1.2.24.1 => 1.2.24.2 ===
--- Zope3/lib/python/Zope/App/Workflow/WorkflowService.py:1.2.24.1 Tue Dec 3 10:32:13 2002
+++ Zope3/lib/python/Zope/App/Workflow/WorkflowService.py Wed Dec 4 05:39:39 2002
@@ -51,6 +51,17 @@
getDefinition = ContextMethod(getDefinition)
+ def queryConfigurations(self, definition_name, default=None):
+ registry = self.__definitions.get(definition_name, default)
+ return ContextWrapper(registry, self)
+
+ queryConfigurations = ContextMethod(queryConfigurations)
+
+ def createConfigurationsFor(self, configuration):
+ return self.createConfigurations(configuration.definitionName)
+
+ createConfigurationsFor = ContextMethod(createConfigurationsFor)
+
#
############################################################
@@ -63,4 +74,17 @@
return None
return configuration.getDefinition()
+
+ def queryConfigurationsFor(self, configuration, default=None):
+ return self.queryConfigurations(configuration.definitionName, default)
+
+ queryConfigurationsFor = ContextMethod(queryConfigurationsFor)
+
+ def createConfigurations(self, definition_name):
+ registry = ConfigurationRegistry()
+ self.__definitions[definition_name] = registry
+ self._p_changed = 1
+ return registry
+
+ createConfigurations = ContextMethod(createConfigurations)
=== Zope3/lib/python/Zope/App/Workflow/IWorkflowService.py 1.2.24.1 => 1.2.24.2 ===
--- Zope3/lib/python/Zope/App/Workflow/IWorkflowService.py:1.2.24.1 Tue Dec 3 10:32:13 2002
+++ Zope3/lib/python/Zope/App/Workflow/IWorkflowService.py Wed Dec 4 05:39:39 2002
@@ -25,18 +25,18 @@
A workflow service manages the process definitions.
"""
- def getDefinitionNames():
+ def getProcessDefinitionNames():
"""Return the definition names.
Returns a sequence of names.
"""
- def getDefinition(name):
+ def getProcessDefinition(name):
"""Return the definition for name."""
# configuration
- def queryConfigurations(name):
+ def queryConfigurations(definition_name):
"""Return an IConfigurationRegistry for a process definition name."""
def createConfigurationsFor(configuration):