[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful -
xmlimportexport.py:1.11
Jim Fulton
jim at zope.com
Sat Mar 6 11:51:08 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/workflow/stateful
Modified Files:
xmlimportexport.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/workflow/stateful/xmlimportexport.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/workflow/stateful/xmlimportexport.py:1.10 Fri Mar 5 17:09:23 2004
+++ Zope3/src/zope/app/workflow/stateful/xmlimportexport.py Sat Mar 6 11:50:37 2004
@@ -18,7 +18,7 @@
from xml.sax import parse
from xml.sax.handler import ContentHandler
-from zope.component import getAdapter, getService
+from zope.component import getService
from zope.configuration.name import resolve
from zope.interface import implements
from zope.proxy import removeAllProxies
@@ -82,7 +82,7 @@
startPermissions = noop
def startWorkflow(self, attrs):
- dc = getAdapter(self.context, IZopeDublinCore)
+ dc = IZopeDublinCore(self.context)
dc.title = attrs.get('title', u'')
def startSchema(self, attrs):
@@ -113,11 +113,11 @@
name = attrs['name'].encode(encoding)
if name == 'INITIAL':
state = self.context.getState('INITIAL')
- dc = getAdapter(state, IZopeDublinCore)
+ dc = IZopeDublinCore(state)
dc.title = attrs.get('title', u'')
else:
state = State()
- dc = getAdapter(state, IZopeDublinCore)
+ dc = IZopeDublinCore(state)
dc.title = attrs.get('title', u'')
self.context.addState(name, state)
@@ -135,7 +135,7 @@
permission = permission,
triggerMode = attrs['triggerMode'].encode(encoding)
)
- dc = getAdapter(trans, IZopeDublinCore)
+ dc = IZopeDublinCore(trans)
dc.title = attrs.get('title', u'')
self.context.addTransition(name, trans)
@@ -175,7 +175,7 @@
return self.process_definition
def getDublinCore(self, obj):
- return getAdapter(obj, IZopeDublinCore)
+ return IZopeDublinCore(obj)
def getPermissionId(self, permission):
if isinstance(permission, str):
More information about the Zope3-Checkins
mailing list