[CMF-checkins] CVS: Products/CMFCore -
ActionInformation.py:1.30.4.1 ActionProviderBase.py:1.34.4.1
ActionsTool.py:1.56.6.1 CMFCatalogAware.py:1.31.4.1
CachingPolicyManager.py:1.16.6.1 CatalogTool.py:1.65.2.1
ContentTypeRegistry.py:1.17.18.1 DiscussionTool.py:1.21.4.1
DynamicType.py:1.25.4.1 MemberDataTool.py:1.37.6.1
MembershipTool.py:1.54.2.1 PortalContent.py:1.50.4.1
PortalFolder.py:1.84.4.1 RegistrationTool.py:1.25.8.1
SkinsContainer.py:1.12.18.1 SkinsTool.py:1.33.6.1
TypesTool.py:1.91.4.1 URLTool.py:1.6.18.1
UndoTool.py:1.19.18.1 WorkflowTool.py:1.57.4.1
__init__.py:1.37.2.1 bridge.zcml:1.1.8.1 implements.zcml:1.1.8.1
Tres Seaver
tseaver at palladion.com
Fri Jul 15 18:41:48 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv16776/CMFCore
Modified Files:
Tag: tseaver-z3_interfaces-branch
ActionInformation.py ActionProviderBase.py ActionsTool.py
CMFCatalogAware.py CachingPolicyManager.py CatalogTool.py
ContentTypeRegistry.py DiscussionTool.py DynamicType.py
MemberDataTool.py MembershipTool.py PortalContent.py
PortalFolder.py RegistrationTool.py SkinsContainer.py
SkinsTool.py TypesTool.py URLTool.py UndoTool.py
WorkflowTool.py __init__.py bridge.zcml implements.zcml
Log Message:
Branch for Z3-ification of CMF interfaces
- All interfaces declared in the CMF are now Zope3-style interfaces
(the one remaining exception is to leave Zope2's
'webdav.WriteLockInterface' declared by CMFCore.PortalContent and
derivatives.).
TOOD
- Clean up XXX'es noted during this pass.
=== Products/CMFCore/ActionInformation.py 1.30 => 1.30.4.1 ===
--- Products/CMFCore/ActionInformation.py:1.30 Sun Jun 26 07:10:08 2005
+++ Products/CMFCore/ActionInformation.py Fri Jul 15 18:41:17 2005
@@ -25,10 +25,12 @@
from OFS.SimpleItem import SimpleItem
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from zope.interface import implements, implementedBy
+
from Expression import Expression
-from interfaces.portal_actions import Action as IAction
-from interfaces.portal_actions import ActionCategory as IActionCategory
-from interfaces.portal_actions import ActionInfo as IActionInfo
+from interfaces import IAction
+from interfaces import IActionCategory
+from interfaces import IActionInformation
from permissions import View
from utils import _checkPermission
from utils import _wwwdir
@@ -42,7 +44,7 @@
""" Group of Action objects.
"""
- __implements__ = (IActionCategory, OrderedFolder.__implements__)
+ implements(IActionCategory, implementedBy(OrderedFolder))
meta_type = 'CMF Action Category'
@@ -57,9 +59,9 @@
actions = []
for obj in self.objectValues():
- if IActionCategory.isImplementedBy(obj):
+ if IActionCategory.providedBy(obj):
actions.extend( obj.listActions() )
- elif IAction.isImplementedBy(obj):
+ elif IAction.providedBy(obj):
actions.append(obj)
return tuple(actions)
@@ -83,7 +85,7 @@
""" Reference to an action.
"""
- __implements__ = IAction
+ implements(IAction)
meta_type = 'CMF Action'
@@ -170,7 +172,7 @@
""" A lazy dictionary for Action infos.
"""
- __implements__ = IActionInfo
+ implements(IActionInformation)
__allow_access_to_unprotected_subobjects__ = 1
@@ -255,7 +257,7 @@
of the site. They can be filtered via their conditions.
"""
- __implements__ = IAction
+ implements(IAction)
_isActionInformation = 1
__allow_access_to_unprotected_subobjects__ = 1
=== Products/CMFCore/ActionProviderBase.py 1.34 => 1.34.4.1 ===
--- Products/CMFCore/ActionProviderBase.py:1.34 Mon Jun 20 13:19:57 2005
+++ Products/CMFCore/ActionProviderBase.py Fri Jul 15 18:41:17 2005
@@ -19,12 +19,14 @@
from Globals import DTMLFile
from Globals import InitializeClass
+from zope.interface import implements
+
from ActionInformation import ActionInfo
from ActionInformation import ActionInformation
from ActionInformation import getOAI
from exceptions import AccessControl_Unauthorized
from Expression import getExprContext
-from interfaces.portal_actions import ActionProvider as IActionProvider
+from interfaces import IActionProvider
from permissions import ManagePortal
from utils import _dtmldir
@@ -33,7 +35,7 @@
""" Provide ActionTabs and management methods for ActionProviders
"""
- __implements__ = IActionProvider
+ implements(IActionProvider)
security = ClassSecurityInfo()
=== Products/CMFCore/ActionsTool.py 1.56 => 1.56.6.1 ===
--- Products/CMFCore/ActionsTool.py:1.56 Mon Apr 11 06:43:44 2005
+++ Products/CMFCore/ActionsTool.py Fri Jul 15 18:41:17 2005
@@ -21,12 +21,14 @@
from OFS.ObjectManager import IFAwareObjectManager
from OFS.OrderedFolder import OrderedFolder
+from zope.interface import implements, implementedBy
+
from ActionInformation import ActionInformation
from ActionProviderBase import ActionProviderBase
from Expression import Expression
-from interfaces.portal_actions import ActionCategory as IActionCategory
-from interfaces.portal_actions import ActionProvider as IActionProvider
-from interfaces.portal_actions import portal_actions as IActionsTool
+from interfaces import IActionCategory
+from interfaces import IActionProvider
+from interfaces import IActionsTool
from permissions import ListFolderContents
from permissions import ManagePortal
from utils import _dtmldir
@@ -40,8 +42,9 @@
to the current user and context.
"""
- __implements__ = (IActionsTool, OrderedFolder.__implements__,
- ActionProviderBase.__implements__)
+ implements(IActionsTool,
+ implementedBy(OrderedFolder),
+ implementedBy(ActionProviderBase))
id = 'portal_actions'
meta_type = 'CMF Actions Tool'
@@ -178,12 +181,12 @@
# Include actions from specific tools.
for provider_name in self.listActionProviders():
provider = getattr(self, provider_name)
- if IActionProvider.isImplementedBy(provider):
+ if IActionProvider.providedBy(provider):
actions.extend( provider.listActionInfos(object=object) )
# Include actions from object.
if object is not None:
- if IActionProvider.isImplementedBy(object):
+ if IActionProvider.providedBy(object):
actions.extend( object.listActionInfos(object=object) )
# Reorganize the actions by category.
=== Products/CMFCore/CMFCatalogAware.py 1.31 => 1.31.4.1 ===
--- Products/CMFCore/CMFCatalogAware.py:1.31 Wed Jun 15 10:17:37 2005
+++ Products/CMFCore/CMFCatalogAware.py Fri Jul 15 18:41:17 2005
@@ -29,7 +29,7 @@
from utils import _getAuthenticatedUser
from utils import getToolByName
-from interfaces.IOpaqueItems import ICallableOpaqueItem
+from interfaces import ICallableOpaqueItem
class CMFCatalogAware(Base):
"""Mix-in for notifying portal_catalog and portal_workflow
@@ -148,7 +148,7 @@
self_base = aq_base(self)
for name in self_base.__dict__.keys():
obj = getattr(self_base, name)
- if ICallableOpaqueItem.isImplementedBy(obj):
+ if ICallableOpaqueItem.providedBy(obj):
items.append((obj.getId(), obj))
return tuple(items)
=== Products/CMFCore/CachingPolicyManager.py 1.16 => 1.16.6.1 ===
--- Products/CMFCore/CachingPolicyManager.py:1.16 Wed Mar 16 06:09:46 2005
+++ Products/CMFCore/CachingPolicyManager.py Fri Jul 15 18:41:17 2005
@@ -25,11 +25,12 @@
from Products.PageTemplates.Expressions import getEngine
from Products.PageTemplates.Expressions import SecureModuleImporter
+from zope.interface import implements
+
from permissions import ManagePortal
from permissions import View
from Expression import Expression
-from interfaces.CachingPolicyManager \
- import CachingPolicyManager as ICachingPolicyManager
+from interfaces import ICachingPolicyManager
from utils import _dtmldir
from utils import getToolByName
@@ -256,7 +257,7 @@
to them from skin methods.
"""
- __implements__ = ICachingPolicyManager
+ implements(ICachingPolicyManager)
id = 'caching_policy_manager'
meta_type = 'CMF Caching Policy Manager'
=== Products/CMFCore/CatalogTool.py 1.65 => 1.65.2.1 ===
--- Products/CMFCore/CatalogTool.py:1.65 Thu Jul 7 14:14:50 2005
+++ Products/CMFCore/CatalogTool.py Fri Jul 15 18:41:17 2005
@@ -28,10 +28,11 @@
from Products.ZCTextIndex.Lexicon import StopWordRemover
from Products.ZCTextIndex.ZCTextIndex import PLexicon
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
-from interfaces.portal_catalog \
- import IndexableObjectWrapper as IIndexableObjectWrapper
-from interfaces.portal_catalog import portal_catalog as ICatalogTool
+from interfaces import IIndexableObjectWrapper
+from interfaces import ICatalogTool
from permissions import AccessInactivePortalContent
from permissions import ManagePortal
from permissions import View
@@ -46,7 +47,7 @@
class IndexableObjectWrapper:
- __implements__ = IIndexableObjectWrapper
+ implements(IIndexableObjectWrapper)
def __init__(self, vars, ob):
self.__vars = vars
@@ -81,8 +82,9 @@
""" This is a ZCatalog that filters catalog queries.
"""
- __implements__ = (ICatalogTool, ZCatalog.__implements__,
- ActionProviderBase.__implements__)
+ implements(ICatalogTool,
+ implementedBy(ZCatalog),
+ implementedBy(ActionProviderBase))
id = 'portal_catalog'
meta_type = 'CMF Catalog'
=== Products/CMFCore/ContentTypeRegistry.py 1.17 => 1.17.18.1 ===
--- Products/CMFCore/ContentTypeRegistry.py:1.17 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/ContentTypeRegistry.py Fri Jul 15 18:41:17 2005
@@ -24,10 +24,10 @@
from OFS.SimpleItem import SimpleItem
from ZPublisher.mapply import mapply
-from interfaces.ContentTypeRegistry \
- import ContentTypeRegistry as IContentTypeRegistry
-from interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate as IContentTypeRegistryPredicate
+from zope.interface import implements
+
+from interfaces import IContentTypeRegistry
+from interfaces import IContentTypeRegistryPredicate
from permissions import ManagePortal
from utils import _dtmldir
from utils import getToolByName
@@ -39,7 +39,7 @@
Empty major or minor implies wildcard (all match).
"""
- __implements__ = IContentTypeRegistryPredicate
+ implements(IContentTypeRegistryPredicate)
major = minor = None
PREDICATE_TYPE = 'major_minor'
@@ -125,7 +125,7 @@
Predicate matching on filename extensions.
"""
- __implements__ = IContentTypeRegistryPredicate
+ implements(IContentTypeRegistryPredicate)
extensions = None
PREDICATE_TYPE = 'extension'
@@ -189,7 +189,7 @@
also be passed).
"""
- __implements__ = IContentTypeRegistryPredicate
+ implements(IContentTypeRegistryPredicate)
pattern = None
PREDICATE_TYPE = 'mimetype_regex'
@@ -245,7 +245,7 @@
and 'pattern' can also be passed).
"""
- __implements__ = IContentTypeRegistryPredicate
+ implements(IContentTypeRegistryPredicate)
pattern = None
PREDICATE_TYPE = 'name_regex'
@@ -319,7 +319,7 @@
Registry for rules which map PUT args to a CMF Type Object.
"""
- __implements__ = IContentTypeRegistry
+ implements(IContentTypeRegistry)
meta_type = 'Content Type Registry'
id = 'content_type_registry'
=== Products/CMFCore/DiscussionTool.py 1.21 => 1.21.4.1 ===
--- Products/CMFCore/DiscussionTool.py:1.21 Mon Jun 20 13:19:57 2005
+++ Products/CMFCore/DiscussionTool.py Fri Jul 15 18:41:17 2005
@@ -20,25 +20,26 @@
from Acquisition import Implicit
from AccessControl import ClassSecurityInfo
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import ReplyToItem
from permissions import View
-from interfaces.Discussions import OldDiscussable as IOldDiscussable
-from interfaces.portal_discussion \
- import oldstyle_portal_discussion as IOldstyleDiscussionTool
+from interfaces import IDiscussable
+from interfaces import IDiscussionTool
from utils import _dtmldir
from utils import getToolByName
from utils import UniqueObject
-class OldDiscussable(Implicit):
+class Discussable(Implicit):
"""
Adapter for PortalContent to implement "old-style" discussions.
"""
- __implements__ = IOldDiscussable
+ implements(IDiscussable)
_isDiscussable = 1
@@ -114,8 +115,8 @@
class DiscussionTool (UniqueObject, SimpleItem, ActionProviderBase):
- __implements__ = (IOldstyleDiscussionTool,
- ActionProviderBase.__implements__)
+ implements(IDiscussionTool,
+ implementedBy(ActionProviderBase))
id = 'portal_discussion'
meta_type = 'Oldstyle CMF Discussion Tool'
@@ -140,7 +141,7 @@
def getDiscussionFor(self, content):
'''Gets the PortalDiscussion object that applies to content.
'''
- return OldDiscussable( content ).__of__( content )
+ return Discussable( content ).__of__( content )
security.declarePublic('isDiscussionAllowedFor')
def isDiscussionAllowedFor(self, content):
@@ -154,6 +155,27 @@
if typeInfo:
return typeInfo.allowDiscussion()
return 0
+
+ def overrideDiscussionFor(self, content, allowDiscussion):
+ """ Override discussability for the given object or clear the setting.
+
+ o 'allowDiscussion' may be True, False, or None.
+
+ o If 'allowDiscussion' is None, then clear any overridden setting for
+ discussability, letting the site's default policy apply.
+
+ o Otherwise, set the override to match 'allowDiscussion'.
+
+ o Permission: PUblic XXX? Should be ManageContent, or something.
+ """
+ if allowDiscussion is None:
+ try:
+ del content.allowDiscussion
+ except (AttributeError, KeyError):
+ pass
+ else:
+ content.allowDiscussion = allowDiscussion
+
security.declarePrivate('listActions')
def listActions(self, info=None, object=None):
=== Products/CMFCore/DynamicType.py 1.25 => 1.25.4.1 ===
--- Products/CMFCore/DynamicType.py:1.25 Sat Jun 18 08:10:26 2005
+++ Products/CMFCore/DynamicType.py Fri Jul 15 18:41:17 2005
@@ -20,7 +20,9 @@
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
-from interfaces.Dynamic import DynamicType as IDynamicType
+from zope.interface import implements
+
+from interfaces import IDynamicType
from utils import getToolByName
@@ -30,7 +32,7 @@
a dynamic type property.
"""
- __implements__ = IDynamicType
+ implements(IDynamicType)
portal_type = None
=== Products/CMFCore/MemberDataTool.py 1.37 => 1.37.6.1 ===
--- Products/CMFCore/MemberDataTool.py:1.37 Fri Apr 15 13:29:19 2005
+++ Products/CMFCore/MemberDataTool.py Fri Jul 15 18:41:17 2005
@@ -24,10 +24,12 @@
from OFS.SimpleItem import SimpleItem
from ZPublisher.Converters import type_converters
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from exceptions import BadRequest
-from interfaces.portal_memberdata import MemberData as IMemberData
-from interfaces.portal_memberdata import portal_memberdata as IMemberDataTool
+from interfaces import IMemberData
+from interfaces import IMemberDataTool
from permissions import ManagePortal
from permissions import SetOwnProperties
from permissions import ViewManagementScreens
@@ -43,7 +45,8 @@
""" This tool wraps user objects, making them act as Member objects.
"""
- __implements__ = (IMemberDataTool, ActionProviderBase.__implements__)
+ implements(IMemberDataTool,
+ implementedBy(ActionProviderBase))
id = 'portal_memberdata'
meta_type = 'CMF Member Data Tool'
@@ -248,7 +251,7 @@
class MemberData (SimpleItem):
- __implements__ = IMemberData
+ implements(IMemberData)
security = ClassSecurityInfo()
=== Products/CMFCore/MembershipTool.py 1.54 => 1.54.2.1 ===
--- Products/CMFCore/MembershipTool.py:1.54 Fri Jul 8 09:40:19 2005
+++ Products/CMFCore/MembershipTool.py Fri Jul 15 18:41:17 2005
@@ -27,11 +27,12 @@
from OFS.Folder import Folder
from ZODB.POSException import ConflictError
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from exceptions import AccessControl_Unauthorized
from exceptions import BadRequest
-from interfaces.portal_membership \
- import portal_membership as IMembershipTool
+from interfaces import IMembershipTool
from permissions import AccessContentsInformation
from permissions import ChangeLocalRoles
from permissions import ListPortalMembers
@@ -53,7 +54,8 @@
different way.
"""
- __implements__ = (IMembershipTool, ActionProviderBase.__implements__)
+ implements(IMembershipTool,
+ implementedBy(ActionProviderBase))
id = 'portal_membership'
meta_type = 'CMF Membership Tool'
=== Products/CMFCore/PortalContent.py 1.50 => 1.50.4.1 ===
--- Products/CMFCore/PortalContent.py:1.50 Sat Jun 18 08:10:27 2005
+++ Products/CMFCore/PortalContent.py Fri Jul 15 18:41:17 2005
@@ -19,9 +19,11 @@
from Acquisition import aq_base
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
-from webdav.WriteLockInterface import WriteLockInterface
+from webdav.WriteLockInterface import WriteLockInterface # Still Z2!
-from interfaces.Contentish import Contentish
+from zope.interface import implements, implementedBy
+
+from interfaces import IContentish
from DynamicType import DynamicType
from CMFCatalogAware import CMFCatalogAware
from exceptions import NotFound
@@ -39,10 +41,10 @@
Derived classes must implement the interface described in
interfaces/DublinCore.py.
"""
+ __implements__ = (WriteLockInterface,)
- __implements__ = (Contentish,
- WriteLockInterface,
- DynamicType.__implements__)
+ implements(IContentish,
+ implementedBy(DynamicType))
isPortalContent = 1
_isPortalContent = 1 # More reliable than 'isPortalContent'.
=== Products/CMFCore/PortalFolder.py 1.84 => 1.84.4.1 ===
--- Products/CMFCore/PortalFolder.py:1.84 Tue Jun 21 12:39:12 2005
+++ Products/CMFCore/PortalFolder.py Fri Jul 15 18:41:17 2005
@@ -27,12 +27,14 @@
from OFS.OrderSupport import OrderSupport
from OFS.Folder import Folder
+from zope.interface import implements, implementedBy
+
from CMFCatalogAware import CMFCatalogAware
from DynamicType import DynamicType
from exceptions import AccessControl_Unauthorized
from exceptions import BadRequest
from exceptions import zExceptions_Unauthorized
-from interfaces.Folderish import Folderish as IFolderish
+from interfaces import IFolderish
from permissions import AddPortalContent
from permissions import AddPortalFolders
from permissions import ChangeLocalRoles
@@ -101,8 +103,9 @@
"""
meta_type = 'Portal Folder Base'
- __implements__ = (IFolderish, DynamicType.__implements__,
- Folder.__implements__)
+ implements(IFolderish,
+ implementedBy(DynamicType),
+ implementedBy(Folder))
security = ClassSecurityInfo()
@@ -532,8 +535,8 @@
meta_type = 'Portal Folder'
portal_type = 'Folder'
- __implements__ = (PortalFolderBase.__implements__,
- OrderSupport.__implements__)
+ implements(implementedBy(PortalFolderBase),
+ implementedBy(OrderSupport))
security = ClassSecurityInfo()
=== Products/CMFCore/RegistrationTool.py 1.25 => 1.25.8.1 ===
--- Products/CMFCore/RegistrationTool.py:1.25 Fri Oct 29 10:28:31 2004
+++ Products/CMFCore/RegistrationTool.py Fri Jul 15 18:41:17 2005
@@ -16,12 +16,14 @@
"""
import re
+from random import choice
from Globals import InitializeClass
from Globals import DTMLFile
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
-from random import choice
+
+from zope.interface import implements, implementedBy
from ActionProviderBase import ActionProviderBase
from permissions import AddPortalMember
@@ -33,8 +35,7 @@
from utils import getToolByName
from utils import _dtmldir
-from interfaces.portal_registration \
- import portal_registration as IRegistrationTool
+from interfaces import IRegistrationTool
class RegistrationTool(UniqueObject, SimpleItem, ActionProviderBase):
@@ -42,7 +43,8 @@
""" Create and modify users by making calls to portal_membership.
"""
- __implements__ = (IRegistrationTool, ActionProviderBase.__implements__)
+ implements(IRegistrationTool,
+ implementedBy(ActionProviderBase))
id = 'portal_registration'
meta_type = 'CMF Registration Tool'
=== Products/CMFCore/SkinsContainer.py 1.12 => 1.12.18.1 ===
--- Products/CMFCore/SkinsContainer.py:1.12 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/SkinsContainer.py Fri Jul 15 18:41:17 2005
@@ -19,14 +19,16 @@
from Acquisition import aq_base
from Globals import InitializeClass
+from zope.interface import implements
+
from exceptions import SkinPathError
-from interfaces.portal_skins import SkinsContainer as ISkinsContainer
+from interfaces import ISkinsContainer
from permissions import AccessContentsInformation
class SkinsContainer:
- __implements__ = ISkinsContainer
+ implements(ISkinsContainer)
security = ClassSecurityInfo()
=== Products/CMFCore/SkinsTool.py 1.33 => 1.33.6.1 ===
--- Products/CMFCore/SkinsTool.py:1.33 Thu Apr 7 12:38:46 2005
+++ Products/CMFCore/SkinsTool.py Fri Jul 15 18:41:17 2005
@@ -28,11 +28,13 @@
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from Products.PythonScripts.PythonScript import PythonScript
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from DirectoryView import base_ignore
from DirectoryView import ignore
from DirectoryView import ignore_re
-from interfaces.portal_skins import portal_skins as ISkinsTool
+from interfaces import ISkinsTool
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import View
@@ -59,8 +61,9 @@
""" This tool is used to supply skins to a portal.
"""
- __implements__ = (ISkinsTool, SkinsContainer.__implements__,
- ActionProviderBase.__implements__)
+ implements(ISkinsTool,
+ implementedBy(SkinsContainer),
+ implementedBy(ActionProviderBase))
id = 'portal_skins'
meta_type = 'CMF Skins Tool'
=== Products/CMFCore/TypesTool.py 1.91 => 1.91.4.1 ===
--- Products/CMFCore/TypesTool.py:1.91 Mon Jun 20 13:19:57 2005
+++ Products/CMFCore/TypesTool.py Fri Jul 15 18:41:17 2005
@@ -30,12 +30,14 @@
from zLOG import LOG, ERROR
import Products
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from exceptions import AccessControl_Unauthorized
from exceptions import BadRequest
from exceptions import zExceptions_Unauthorized
-from interfaces.portal_types import ContentTypeInformation as ITypeInformation
-from interfaces.portal_types import portal_types as ITypesTool
+from interfaces import ITypeInformation
+from interfaces import ITypesTool
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import View
@@ -438,7 +440,7 @@
Portal content factory.
"""
- __implements__ = ITypeInformation
+ implements(ITypeInformation)
meta_type = 'Factory-based Type Information'
security = ClassSecurityInfo()
@@ -554,7 +556,7 @@
Invokes a script rather than a factory to create the content.
"""
- __implements__ = ITypeInformation
+ implements(ITypeInformation)
meta_type = 'Scriptable Type Information'
security = ClassSecurityInfo()
@@ -632,7 +634,8 @@
Provides a configurable registry of portal content types.
"""
- __implements__ = (ITypesTool, ActionProviderBase.__implements__)
+ implements(ITypesTool,
+ implementedBy(ActionProviderBase))
id = 'portal_types'
meta_type = 'CMF Types Tool'
=== Products/CMFCore/URLTool.py 1.6 => 1.6.18.1 ===
--- Products/CMFCore/URLTool.py:1.6 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/URLTool.py Fri Jul 15 18:41:17 2005
@@ -22,20 +22,23 @@
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
from permissions import ManagePortal
from permissions import View
from utils import _dtmldir
from utils import UniqueObject
-from interfaces.portal_url import portal_url as IURLTool
+from interfaces import IURLTool
class URLTool(UniqueObject, SimpleItem, ActionProviderBase):
""" CMF URL Tool.
"""
- __implements__ = (IURLTool, ActionProviderBase.__implements__)
+ implements(IURLTool,
+ implementedBy(ActionProviderBase))
id = 'portal_url'
meta_type = 'CMF URL Tool'
=== Products/CMFCore/UndoTool.py 1.19 => 1.19.18.1 ===
--- Products/CMFCore/UndoTool.py:1.19 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/UndoTool.py Fri Jul 15 18:41:17 2005
@@ -20,11 +20,13 @@
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
+from zope.interface import implements, implementedBy
+
from ActionInformation import ActionInformation
from ActionProviderBase import ActionProviderBase
from exceptions import AccessControl_Unauthorized
from Expression import Expression
-from interfaces.portal_undo import portal_undo as IUndoTool
+from interfaces import IUndoTool
from permissions import ListUndoableChanges
from permissions import ManagePortal
from utils import _checkPermission
@@ -37,7 +39,8 @@
""" This tool is used to undo changes.
"""
- __implements__ = (IUndoTool, ActionProviderBase.__implements__)
+ implements(IUndoTool,
+ implementedBy(ActionProviderBase))
id = 'portal_undo'
meta_type = 'CMF Undo Tool'
=== Products/CMFCore/WorkflowTool.py 1.57 => 1.57.4.1 ===
--- Products/CMFCore/WorkflowTool.py:1.57 Tue Jul 5 23:28:55 2005
+++ Products/CMFCore/WorkflowTool.py Fri Jul 15 18:41:17 2005
@@ -25,8 +25,10 @@
from Globals import PersistentMapping
from OFS.Folder import Folder
+from zope.interface import implements, implementedBy
+
from ActionProviderBase import ActionProviderBase
-from interfaces.portal_workflow import portal_workflow as IWorkflowTool
+from interfaces import IWorkflowTool
from permissions import ManagePortal
from utils import _dtmldir
from utils import getToolByName
@@ -64,8 +66,8 @@
"""
id = 'portal_workflow'
meta_type = 'CMF Workflow Tool'
- __implements__ = (IWorkflowTool,
- ActionProviderBase.__implements__)
+ implements(IWorkflowTool,
+ implementedBy(ActionProviderBase))
_chains_by_type = None # PersistentMapping
_default_chain = ('default_workflow',)
=== Products/CMFCore/__init__.py 1.37 => 1.37.2.1 ===
--- Products/CMFCore/__init__.py:1.37 Tue Jul 12 22:51:00 2005
+++ Products/CMFCore/__init__.py Fri Jul 15 18:41:17 2005
@@ -32,6 +32,7 @@
import CachingPolicyManager
import CMFBTreeFolder
import utils
+import interfaces
from permissions import AddPortalFolders
from permissions import ManagePortal
@@ -144,6 +145,7 @@
TypesTool.FactoryTypeInformation,
permission=ManagePortal,
constructors=( TypesTool.manage_addFactoryTIForm, ),
+ interfaces=( interfaces.ITypeInformation, ),
icon='images/typeinfo.gif',
visibility=None)
@@ -151,6 +153,7 @@
TypesTool.ScriptableTypeInformation,
permission=ManagePortal,
constructors=( TypesTool.manage_addScriptableTIForm, ),
+ interfaces=( interfaces.ITypeInformation, ),
icon='images/typeinfo.gif',
visibility=None)
=== Products/CMFCore/bridge.zcml 1.1 => 1.1.8.1 ===
--- Products/CMFCore/bridge.zcml:1.1 Mon Jun 13 13:32:06 2005
+++ Products/CMFCore/bridge.zcml Fri Jul 15 18:41:17 2005
@@ -2,6 +2,7 @@
xmlns="http://namespaces.zope.org/five"
>
+<!--
<bridge
zope2=".interfaces.CachingPolicyManager.CachingPolicyManager"
package=".interfaces"
@@ -229,5 +230,6 @@
package=".interfaces"
name="ISyndicatable"
/>
+ -->
</configure>
=== Products/CMFCore/implements.zcml 1.1 => 1.1.8.1 ===
--- Products/CMFCore/implements.zcml:1.1 Mon Jun 13 13:32:06 2005
+++ Products/CMFCore/implements.zcml Fri Jul 15 18:41:17 2005
@@ -2,7 +2,7 @@
xmlns="http://namespaces.zope.org/five"
>
- <!-- ActionInformation -->
+ <!-- ActionInformation
<implements
class=".ActionInformation.ActionCategory"
@@ -23,29 +23,33 @@
class=".ActionInformation.ActionInformation"
interface=".interfaces.IAction"
/>
+ -->
- <!-- ActionProviderBase -->
+ <!-- ActionProviderBase
<implements
class=".ActionProviderBase.ActionProviderBase"
interface=".interfaces.IActionProvider"
/>
+ -->
- <!-- ActionsTool -->
+ <!-- ActionsTool
<implements
class=".ActionsTool.ActionsTool"
interface=".interfaces.IActionsTool"
/>
+ -->
- <!-- CachingPolicyManager -->
+ <!-- CachingPolicyManager
<implements
class=".CachingPolicyManager.CachingPolicyManager"
interface=".interfaces.ICachingPolicyManager"
/>
+ -->
- <!-- CatalogTool -->
+ <!-- CatalogTool
<implements
class=".CatalogTool.IndexableObjectWrapper"
@@ -56,8 +60,9 @@
class=".CatalogTool.CatalogTool"
interface=".interfaces.ICatalogTool"
/>
+ -->
- <!-- ContentTypeRegistry -->
+ <!-- ContentTypeRegistry
<implements
class=".ContentTypeRegistry.MajorMinorPredicate"
@@ -83,8 +88,9 @@
class=".ContentTypeRegistry.ContentTypeRegistry"
interface=".interfaces.IContentTypeRegistry"
/>
+ -->
- <!-- DiscussionTool -->
+ <!-- DiscussionTool
<implements
class=".DiscussionTool.OldDiscussable"
@@ -95,15 +101,17 @@
class=".DiscussionTool.DiscussionTool"
interface=".interfaces.IOldstyleDiscussionTool"
/>
+ -->
- <!-- DynamicType -->
+ <!-- DynamicType
<implements
class=".DynamicType.DynamicType"
interface=".interfaces.IDynamicType"
/>
+ -->
- <!-- MemberDataTool -->
+ <!-- MemberDataTool
<implements
class=".MemberDataTool.MemberDataTool"
@@ -114,50 +122,57 @@
class=".MemberDataTool.MemberData"
interface=".interfaces.IMemberData"
/>
+ -->
- <!-- MembershipTool -->
+ <!-- MembershipTool
<implements
class=".MembershipTool.MembershipTool"
interface=".interfaces.IMembershipTool"
/>
+ -->
- <!-- PortalContent -->
+ <!-- PortalContent
<implements
class=".PortalContent.PortalContent"
interface=".interfaces.IContentish"
/>
+ -->
- <!-- PortalFolder -->
+ <!-- PortalFolder
<implements
class=".PortalFolder.PortalFolder"
interface=".interfaces.IFolderish"
/>
+ -->
- <!-- RegistrationTool -->
+ <!-- RegistrationTool
<implements
class=".RegistrationTool.RegistrationTool"
interface=".interfaces.IRegistrationTool"
/>
+ -->
- <!-- SkinsContainer -->
+ <!-- SkinsContainer
<implements
class=".SkinsContainer.SkinsContainer"
interface=".interfaces.ISkinsContainer"
/>
+ -->
- <!-- SkinsTool -->
+ <!-- SkinsTool
<implements
class=".SkinsTool.SkinsTool"
interface=".interfaces.ISkinsTool"
/>
+ -->
- <!-- TypesTool -->
+ <!-- TypesTool
<implements
class=".TypesTool.FactoryTypeInformation"
@@ -173,26 +188,30 @@
class=".TypesTool.TypesTool"
interface=".interfaces.ITypesTool"
/>
+ -->
- <!-- UndoTool -->
+ <!-- UndoTool
<implements
class=".UndoTool.UndoTool"
interface=".interfaces.IUndoTool"
/>
+ -->
- <!-- URLTool -->
+ <!-- URLTool
<implements
class=".URLTool.URLTool"
interface=".interfaces.IURLTool"
/>
+ -->
- <!-- WorkflowTool -->
+ <!-- WorkflowTool
<implements
class=".WorkflowTool.WorkflowTool"
interface=".interfaces.IWorkflowTool"
/>
+ -->
</configure>
More information about the CMF-checkins
mailing list