[Zope3-checkins] CVS: Zope3/src/zope/app/workflow - configure.zcml:1.11 definition.py:1.6 globalimportexport.py:1.5 instance.py:1.11 service.py:1.13

Philipp von Weitershausen philikon at philikon.de
Fri Feb 27 11:51:08 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/workflow
In directory cvs.zope.org:/tmp/cvs-serv22977/workflow

Modified Files:
	configure.zcml definition.py globalimportexport.py instance.py 
	service.py 
Log Message:
Centralized the workflow interfaces and browser views in
zope.app.workflow.


=== Zope3/src/zope/app/workflow/configure.zcml 1.10 => 1.11 ===
--- Zope3/src/zope/app/workflow/configure.zcml:1.10	Sat Feb 14 18:35:59 2004
+++ Zope3/src/zope/app/workflow/configure.zcml	Fri Feb 27 11:50:37 2004
@@ -4,138 +4,143 @@
    i18n_domain="zope"
    >
 
-<!-- Workflow Permissions -->
+  <!-- Workflow Permissions -->
 
-<permission 
-  id="zope.workflow.ManageProcessDefinitions" 
-  title="[manage-workflow-processdefinitions-permission]
-         Manage Workflow ProcessDefinitions"
-  />
-
-<permission 
-  id="zope.workflow.CreateProcessInstances"
-  title="[create-workflow-processinstances-permission]
-         Create Workflow ProcessInstances"
-  />
-
-<permission
-  id="zope.workflow.UseProcessInstances"
-  title="[use-workflow-processinstances-permission]
-         Use Workflow ProcessInstances"
-  />
-
-
-<!-- Workflow Service -->
-
-<content class="zope.app.workflow.service.WorkflowService">
-  <factory
-      id="WorkflowService"
-      permission="zope.ManageServices"
-      />
-  <require
-      permission="zope.View"
-      interface="zope.app.interfaces.workflow.IWorkflowService"
-        attributes="queryRegistrations queryRegistrationsFor
-                    listRegistrationNames"
+  <permission 
+      id="zope.workflow.ManageProcessDefinitions" 
+      title="[manage-workflow-processdefinitions-permission]
+             Manage Workflow ProcessDefinitions"
       />
-  <implements 
-     interface="zope.app.interfaces.annotation.IAttributeAnnotatable" 
-     />
-</content>
 
-<serviceType 
-  id="Workflows"
-  interface="zope.app.interfaces.workflow.IWorkflowService"
-  />
+  <permission 
+      id="zope.workflow.CreateProcessInstances"
+      title="[create-workflow-processinstances-permission]
+             Create Workflow ProcessInstances"
+      />
 
+  <permission
+      id="zope.workflow.UseProcessInstances"
+      title="[use-workflow-processinstances-permission]
+             Use Workflow ProcessInstances"
+      />
 
-<!-- Workflow Process Definition 
-     This is only a generic placeholder for
-     future Process Definition implementations -->
 
-<content class="zope.app.workflow.definition.ProcessDefinition">
-  <factory
-      id="ProcessDefinition"
-      permission="zope.ManageServices"
-      />
-  <require
-      permission="zope.ManageServices"
-      interface="zope.app.interfaces.workflow.IProcessDefinition" 
-      />
-  <implements 
-      interface="zope.app.interfaces.annotation.IAttributeAnnotatable" 
+  <!-- Workflow Service -->
+
+  <content class="zope.app.workflow.service.WorkflowService">
+    <factory
+        id="WorkflowService"
+        permission="zope.ManageServices"
+        />
+    <require
+        permission="zope.View"
+        interface="zope.app.workflow.interfaces.IWorkflowService"
+        attributes="queryRegistrations queryRegistrationsFor
+                    listRegistrationNames"
+        />
+    <implements 
+       interface="zope.app.interfaces.annotation.IAttributeAnnotatable" 
+       />
+  </content>
+
+  <serviceType 
+      id="Workflows"
+      interface="zope.app.workflow.interfaces.IWorkflowService"
       />
-</content>
 
 
-<!-- Process Definition Registration -->
+  <!-- Workflow Process Definition 
+       This is only a generic placeholder for
+       future Process Definition implementations -->
+
+  <content class="zope.app.workflow.definition.ProcessDefinition">
+    <factory
+        id="ProcessDefinition"
+        permission="zope.ManageServices"
+        />
+    <require
+        permission="zope.ManageServices"
+        interface="zope.app.workflow.interfaces.IProcessDefinition" 
+        />
+    <implements 
+        interface="zope.app.interfaces.annotation.IAttributeAnnotatable" 
+        />
+  </content>
+
+
+  <!-- Process Definition Registration -->
+
+  <content class="zope.app.workflow.service.ProcessDefinitionRegistration">
+    <factory
+        id="ProcessDefinitionRegistration"
+        permission="zope.ManageServices"
+        />
+    <require
+        permission="zope.ManageServices"
+        interface="zope.app.workflow.interfaces.IProcessDefinitionRegistration"
+        set_schema="zope.app.workflow.interfaces.IProcessDefinitionRegistration"
+        />
+    <require
+        permission="zope.ManageServices"
+        interface="zope.app.interfaces.container.IAddNotifiable"
+        />
+    <require
+        permission="zope.ManageServices"
+        interface="zope.app.interfaces.container.IRemoveNotifiable"
+        />
+  </content>
+
+  <vocabulary
+     name="ProcessDefinitions"
+     factory=".service.ProcessDefinitionVocabulary"
+     />
 
-<content class="zope.app.workflow.service.ProcessDefinitionRegistration">
-  <factory
-      id="ProcessDefinitionRegistration"
-      permission="zope.ManageServices"
-      />
-  <require
-      permission="zope.ManageServices"
-      interface="zope.app.interfaces.workflow.IProcessDefinitionRegistration"
-      set_schema="zope.app.interfaces.workflow.IProcessDefinitionRegistration"
-      />
-  <require
-      permission="zope.ManageServices"
-      interface="zope.app.interfaces.container.IAddNotifiable"
-      />
-  <require
-      permission="zope.ManageServices"
-      interface="zope.app.interfaces.container.IRemoveNotifiable"
-      />
-</content>
+  <content class=".service.ProcessDefinitionVocabulary">
+      <allow interface="zope.schema.interfaces.IVocabulary"/>
+      <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
+  </content>
 
-<vocabulary
-   name="ProcessDefinitions"
-   factory=".service.ProcessDefinitionVocabulary" />
+  <content class=".service.ProcessDefinitionTerm">
+      <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
+  </content>
 
-<content class=".service.ProcessDefinitionVocabulary">
-  <allow interface="zope.schema.interfaces.IVocabulary"/>
-  <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
-</content>
 
-<content class=".service.ProcessDefinitionTerm">
-  <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
-</content>
+  <!-- Process Instance Container -->
 
+  <content class="zope.app.workflow.definition.ProcessDefinitionElementContainer">
 
-<!-- Process Instance Container -->
+    <implements interface="zope.app.interfaces.container.IContentContainer" />
 
-<content class="zope.app.workflow.definition.ProcessDefinitionElementContainer">
+    <implements
+       interface="zope.app.interfaces.annotation.IAttributeAnnotatable"
+       />
 
-  <implements interface="zope.app.interfaces.container.IContentContainer" />
+    <require
+        permission="zope.View"
+        interface="zope.app.interfaces.container.IReadContainer"
+        />
 
-  <implements
-     interface="zope.app.interfaces.annotation.IAttributeAnnotatable"
-     />
+    <require
+        permission="zope.workflow.ManageProcessDefinitions"
+        interface="zope.app.interfaces.container.IWriteContainer"
+        />
+  </content>
 
-  <require
-      permission="zope.View"
-      interface="zope.app.interfaces.container.IReadContainer"
+  <adapter
+      factory="zope.app.workflow.instance.ProcessInstanceContainerAdapter"
+      provides="zope.app.workflow.interfaces.IProcessInstanceContainer"
+      for="zope.app.interfaces.annotation.IAnnotatable"
       />
 
-  <require
-      permission="zope.workflow.ManageProcessDefinitions"
-      interface="zope.app.interfaces.container.IWriteContainer"
+  <!-- Workflow Import/Export Utility -->
+  <utility
+      component=".globalimportexport.globalImportExport" 
+      provides="zope.app.workflow.interfaces.IProcessDefinitionImportExport"
+      permission="zope.workflow.ManageProcessDefinitions" 
       />
-</content>
-
-<adapter factory="zope.app.workflow.instance.ProcessInstanceContainerAdapter"
-         provides="zope.app.interfaces.workflow.IProcessInstanceContainer"
-         for="zope.app.interfaces.annotation.IAnnotatable" />
 
-<!-- Workflow Import/Export Utility -->
-<utility
-    component=".globalimportexport.globalImportExport" 
-    provides="zope.app.interfaces.workflow.IProcessDefinitionImportExport"
-    permission="zope.workflow.ManageProcessDefinitions" 
-    />
+  <include package=".stateful" />
 
-<include package=".stateful" />
+  <include package=".browser" />
 
 </configure>


=== Zope3/src/zope/app/workflow/definition.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/workflow/definition.py:1.5	Fri Feb 20 11:57:33 2004
+++ Zope3/src/zope/app/workflow/definition.py	Fri Feb 27 11:50:37 2004
@@ -20,33 +20,25 @@
 from types import StringTypes
 from persistent import Persistent
 from persistent.dict import PersistentDict
-from zope.app.interfaces.workflow import IProcessDefinitionElementContainer
-from zope.app.interfaces.workflow import IProcessDefinition
+from zope.app.workflow.interfaces import IProcessDefinitionElementContainer
+from zope.app.workflow.interfaces import IProcessDefinition
 from zope.interface import implements
 from zope.app.container.contained import Contained, setitem, uncontained
 
 class ProcessDefinition(Persistent, Contained):
-
     __doc__ = IProcessDefinition.__doc__
 
     implements(IProcessDefinition)
 
     name = None
 
-    ############################################################
-    # Implementation methods for interface
-    # zope.app.interfaces.workflow.IProcessDefinition
-
     def createProcessInstance(self, definition_name):
+        """See zope.app.workflow.interfaces.IProcessDefinition"""
         return None
 
-    #
-    ############################################################
-
 class ProcessDefinitionElementContainer(Persistent, Contained):
     """ See IProcessDefinitionElementContainer.
     """
-
     implements(IProcessDefinitionElementContainer)
 
     def __init__(self):


=== Zope3/src/zope/app/workflow/globalimportexport.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/workflow/globalimportexport.py:1.4	Sat Jun  7 09:23:46 2003
+++ Zope3/src/zope/app/workflow/globalimportexport.py	Fri Feb 27 11:50:37 2004
@@ -19,9 +19,10 @@
 
 from zope.interface.implementor import ImplementorRegistry
 from zope.proxy import removeAllProxies
-from zope.app.interfaces.workflow import IProcessDefinition
-from zope.app.interfaces.workflow import IGlobalProcessDefinitionImportExport
 from zope.interface import implements, providedBy
+
+from zope.app.workflow.interfaces import IProcessDefinition
+from zope.app.workflow.interfaces import IGlobalProcessDefinitionImportExport
 
 from StringIO import StringIO
 


=== Zope3/src/zope/app/workflow/instance.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/workflow/instance.py:1.10	Fri Feb 20 11:57:33 2004
+++ Zope3/src/zope/app/workflow/instance.py	Fri Feb 27 11:50:37 2004
@@ -22,7 +22,7 @@
 from zope.proxy import removeAllProxies
 
 from zope.app.interfaces.annotation import IAnnotatable, IAnnotations
-from zope.app.interfaces.workflow \
+from zope.app.workflow.interfaces \
      import IProcessInstance, IProcessInstanceContainer
 
 from zope.interface import implements
@@ -41,16 +41,9 @@
         self._pd_name = pd_name
         self._status = None
 
-    ############################################################
-    # Implementation methods for interface
-    # zope.app.interfaces.workflow.IProcessInstance
-
     processDefinitionName = property(lambda self: self._pd_name)
 
     status = property(lambda self: self._status)
-
-    #
-    ############################################################
 
     ## should probably have a method "getProcessDefinition"
 


=== Zope3/src/zope/app/workflow/service.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/workflow/service.py:1.12	Fri Feb 20 11:57:33 2004
+++ Zope3/src/zope/app/workflow/service.py	Fri Feb 27 11:50:37 2004
@@ -24,9 +24,9 @@
 from zope.app.interfaces.services.registration import INameComponentRegistry
 from zope.app.interfaces.services.registration import IRegistered
 from zope.app.interfaces.services.service import ISimpleService
-from zope.app.interfaces.workflow import IProcessDefinition
-from zope.app.interfaces.workflow import IProcessDefinitionRegistration
-from zope.app.interfaces.workflow import IWorkflowService
+from zope.app.workflow.interfaces import IProcessDefinition
+from zope.app.workflow.interfaces import IProcessDefinitionRegistration
+from zope.app.workflow.interfaces import IWorkflowService
 from zope.app.services.registration import NameComponentRegistry
 from zope.app.services.registration import NamedComponentRegistration
 from zope.app.services.servicenames import Workflows
@@ -42,19 +42,12 @@
     """A Local WorkflowService.
     """
 
-
 class WorkflowService(Persistent, NameComponentRegistry, Contained):
-
     __doc__ = IWorkflowService.__doc__
-
     implements(ILocalWorkflowService, ISimpleService)
 
-    ############################################################
-    # Implementation methods for interface
-    # zope.app.interfaces.workflow.IWorkflowService
-
     def getProcessDefinitionNames(self):
-        'See IWorkflowService'
+        """See zope.app.workflow.interfaces.IWorkflowService"""
         definition_names = {}
         for name in self.listRegistrationNames():
             registry = self.queryRegistrations(name)
@@ -66,11 +59,8 @@
                 definition_names[name] = 0
         return definition_names.keys()
 
-
-
-
     def getProcessDefinition(self, name):
-        'See IWorkflowService'
+        """See zope.app.workflow.interfaces.IWorkflowService"""
         pd = self.queryActiveComponent(name)
         if pd is not None:
             return pd
@@ -79,30 +69,20 @@
             return service.getProcessDefinition(name)
         raise KeyError, name
 
-
-
     def queryProcessDefinition(self, name, default=None):
-        'See IWorkflowService'
+        """See zope.app.workflow.interfaces.IWorkflowService"""
         try:
             return self.getProcessDefinition(name)
         except KeyError:
             return default
 
-
-
     def createProcessInstance(self, definition_name):
+        """See zope.app.workflow.interfaces.IWorkflowService"""
         pd = self.getProcessDefinition(definition_name)
         return pd.createProcessInstance(definition_name)
 
-
-    #
-    ############################################################
-
-
 class ProcessDefinitionRegistration(NamedComponentRegistration):
-
     __doc__ = IProcessDefinitionRegistration.__doc__
-
     implements(IProcessDefinitionRegistration)
 
     serviceType = Workflows
@@ -134,18 +114,14 @@
         adapter.removeUsage(getPath(self))
         super(ProcessDefinitionRegistration, self).removeNotify(event)
 
-
 class ProcessDefinitionTerm:
-
     implements(ITokenizedTerm)
 
     def __init__(self, name):
         self.value = name
         self.token = name
 
-
-class ProcessDefinitionVocabulary(object):
-
+class ProcessDefinitionVocabulary:
     implements(IVocabulary, IVocabularyTokenized)
 
     def __init__(self, context):




More information about the Zope3-Checkins mailing list