[CMF-checkins] SVN: CMF/branches/2.0/ - import CA functions
directly from zope.component (reducing zope.app dependencies)
Yvo Schubbe
y.2006_ at wcm-solutions.de
Thu Apr 6 06:47:29 EDT 2006
Log message for revision 66588:
- import CA functions directly from zope.component (reducing zope.app dependencies)
Changed:
U CMF/branches/2.0/CMFCore/browser/actions.py
U CMF/branches/2.0/CMFCore/browser/typeinfo.py
U CMF/branches/2.0/CMFCore/exportimport/cachingpolicymgr.py
U CMF/branches/2.0/CMFCore/exportimport/properties.py
U CMF/branches/2.0/CMFCore/fiveactionstool.py
U CMF/branches/2.0/DCWorkflow/browser/workflow.py
-=-
Modified: CMF/branches/2.0/CMFCore/browser/actions.py
===================================================================
--- CMF/branches/2.0/CMFCore/browser/actions.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/CMFCore/browser/actions.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -17,7 +17,7 @@
from xml.dom.minidom import parseString
-from zope.app import zapi
+from zope.component import queryMultiAdapter
from Products.CMFCore.ActionInformation import Action
from Products.CMFCore.ActionInformation import ActionCategory
@@ -96,7 +96,7 @@
node = child
break
- importer = zapi.queryMultiAdapter((obj, context), INode)
+ importer = queryMultiAdapter((obj, context), INode)
if importer is None:
return
Modified: CMF/branches/2.0/CMFCore/browser/typeinfo.py
===================================================================
--- CMF/branches/2.0/CMFCore/browser/typeinfo.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/CMFCore/browser/typeinfo.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -17,7 +17,7 @@
from xml.dom.minidom import parseString
-from zope.app import zapi
+from zope.component import queryMultiAdapter
from Products.CMFCore.TypesTool import FactoryTypeInformation
from Products.CMFCore.TypesTool import ScriptableTypeInformation
@@ -96,7 +96,7 @@
if meta_type != self.klass.meta_type:
continue
- importer = zapi.queryMultiAdapter((obj, context), IBody)
+ importer = queryMultiAdapter((obj, context), IBody)
if importer is None:
continue
Modified: CMF/branches/2.0/CMFCore/exportimport/cachingpolicymgr.py
===================================================================
--- CMF/branches/2.0/CMFCore/exportimport/cachingpolicymgr.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/CMFCore/exportimport/cachingpolicymgr.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -15,8 +15,8 @@
$Id$
"""
-from zope.app import zapi
from zope.component import adapts
+from zope.component import queryMultiAdapter
from Products.GenericSetup.interfaces import INode
from Products.GenericSetup.interfaces import ISetupEnviron
@@ -147,7 +147,7 @@
def _extractCachingPolicies(self):
fragment = self._doc.createDocumentFragment()
for policy_id, policy in self.context.listPolicies():
- exporter = zapi.queryMultiAdapter((policy, self.environ), INode)
+ exporter = queryMultiAdapter((policy, self.environ), INode)
if exporter:
fragment.appendChild(exporter.node)
return fragment
@@ -167,7 +167,7 @@
0, 0, 0, 0, '', '')
policy = self.context._policies[policy_id]
- importer = zapi.queryMultiAdapter((policy, self.environ), INode)
+ importer = queryMultiAdapter((policy, self.environ), INode)
if importer:
importer.node = child
Modified: CMF/branches/2.0/CMFCore/exportimport/properties.py
===================================================================
--- CMF/branches/2.0/CMFCore/exportimport/properties.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/CMFCore/exportimport/properties.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -15,8 +15,8 @@
$Id$
"""
-from zope.app import zapi
from zope.component import adapts
+from zope.component import queryMultiAdapter
from Products.GenericSetup.interfaces import IBody
from Products.GenericSetup.interfaces import ISetupEnviron
@@ -68,7 +68,7 @@
logger.info('Nothing to import.')
return
- importer = zapi.queryMultiAdapter((site, context), IBody)
+ importer = queryMultiAdapter((site, context), IBody)
if importer is None:
logger.warning('Import adapter misssing.')
return
@@ -81,7 +81,7 @@
site = context.getSite()
logger = context.getLogger('properties')
- exporter = zapi.queryMultiAdapter((site, context), IBody)
+ exporter = queryMultiAdapter((site, context), IBody)
if exporter is None:
logger.warning('Export adapter misssing.')
return
Modified: CMF/branches/2.0/CMFCore/fiveactionstool.py
===================================================================
--- CMF/branches/2.0/CMFCore/fiveactionstool.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/CMFCore/fiveactionstool.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -15,27 +15,27 @@
$Id$
"""
+import zope.thread
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
+from Products.Five import security
+from zope.app.publisher.interfaces.browser import IBrowserMenu
+from zope.app.publisher.browser.menu import getMenu
+from zope.component import getUtilitiesFor
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.Expression import Expression
from Products.CMFCore.utils import UniqueObject
-from zope.app import zapi
-from zope.app.publisher.interfaces.browser import IBrowserMenu
-from zope.app.publisher.browser.menu import getMenu
-
def _listMenuIds():
- return [id for id, utility in zapi.getUtilitiesFor(IBrowserMenu)]
+ return [id for id, utility in getUtilitiesFor(IBrowserMenu)]
-from Products.Five import security
-import zope.thread
class FiveActionsTool( UniqueObject, SimpleItem, ActionProviderBase ):
+
""" Links content to discussions.
"""
@@ -96,5 +96,4 @@
return tuple(actions)
-
InitializeClass( FiveActionsTool )
Modified: CMF/branches/2.0/DCWorkflow/browser/workflow.py
===================================================================
--- CMF/branches/2.0/DCWorkflow/browser/workflow.py 2006-04-06 10:47:06 UTC (rev 66587)
+++ CMF/branches/2.0/DCWorkflow/browser/workflow.py 2006-04-06 10:47:28 UTC (rev 66588)
@@ -17,7 +17,7 @@
from xml.dom.minidom import parseString
-from zope.app import zapi
+from zope.component import queryMultiAdapter
from Products.CMFCore.utils import getToolByName
from Products.GenericSetup.browser.utils import AddWithPresettingsViewBase
@@ -76,7 +76,7 @@
if not root.getAttribute('workflow_id') == obj_path[0]:
continue
- importer = zapi.queryMultiAdapter((obj, context), IBody)
+ importer = queryMultiAdapter((obj, context), IBody)
if importer is None:
continue
More information about the CMF-checkins
mailing list