[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/browser -
definition.py:1.3 instance.py:1.3
Jim Fulton
jim at zope.com
Sat Mar 6 11:51:07 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/workflow/browser
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/workflow/browser
Modified Files:
definition.py instance.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/workflow/browser/definition.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/workflow/browser/definition.py:1.2 Wed Mar 3 15:20:34 2004
+++ Zope3/src/zope/app/workflow/browser/definition.py Sat Mar 6 11:50:36 2004
@@ -17,7 +17,7 @@
"""
__metaclass__ = type
-from zope.component import getAdapter, getView, getUtility
+from zope.component import getView, getUtility
from zope.app.traversing import traverse
from zope.app.interfaces.services.registration import IRegistered
from zope.app.workflow.interfaces import IProcessDefinitionImportExport
=== Zope3/src/zope/app/workflow/browser/instance.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/workflow/browser/instance.py:1.2 Fri Mar 5 17:09:23 2004
+++ Zope3/src/zope/app/workflow/browser/instance.py Sat Mar 6 11:50:36 2004
@@ -15,7 +15,6 @@
$Id$
"""
-from zope.component import getAdapter
from zope.schema import getFieldNames
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
@@ -43,7 +42,7 @@
def removeObjects(self, ids):
"""Remove objects specified in a list of object ids"""
- container = getAdapter(self.context, IProcessInstanceContainer)
+ container = IProcessInstanceContainer(self.context)
for id in ids:
container.__delitem__(id)
@@ -51,7 +50,7 @@
def listContentInfo(self):
return map(self._extractContentInfo,
- getAdapter(self.context, IProcessInstanceContainer).items())
+ IProcessInstanceContainer(self.context).items())
contents = ViewPageTemplateFile('instancecontainer_main.pt')
contentsMacros = contents
@@ -80,7 +79,7 @@
def getProcessInstanceInfo(self, pi_name):
info = {}
- pi = getAdapter(self.context, IProcessInstanceContainer)[pi_name]
+ pi = IProcessInstanceContainer(self.context)[pi_name]
info['status'] = pi.status
# temporary
@@ -95,7 +94,7 @@
return info
def _fireTransition(self, pi_name, id):
- pi = getAdapter(self.context, IProcessInstanceContainer)[pi_name]
+ pi = IProcessInstanceContainer(self.context)[pi_name]
pi.fireTransition(id)
More information about the Zope3-Checkins
mailing list