[Zope-Checkins]
SVN: Zope/branches/philikon-local-components/lib/python/OFS/
Make ObjectManager an IPossibleSite.
Philipp von Weitershausen
philikon at philikon.de
Tue Mar 7 11:28:47 EST 2006
Log message for revision 65859:
Make ObjectManager an IPossibleSite.
Changed:
U Zope/branches/philikon-local-components/lib/python/OFS/ObjectManager.py
U Zope/branches/philikon-local-components/lib/python/OFS/interfaces.py
-=-
Modified: Zope/branches/philikon-local-components/lib/python/OFS/ObjectManager.py
===================================================================
--- Zope/branches/philikon-local-components/lib/python/OFS/ObjectManager.py 2006-03-07 16:27:21 UTC (rev 65858)
+++ Zope/branches/philikon-local-components/lib/python/OFS/ObjectManager.py 2006-03-07 16:28:46 UTC (rev 65859)
@@ -46,6 +46,7 @@
from ZODB.POSException import ConflictError
from zope.interface import implements
+from zope.component.interfaces import ComponentLookupError
import CopySupport
from interfaces import IObjectManager
@@ -166,6 +167,19 @@
isPrincipiaFolderish=1
+ # IPossibleSite API
+
+ _components = None
+
+ def getSiteManager(self):
+ if self._components is None:
+ raise ComponentLookupError('No component registry defined.')
+ return self._components
+
+ def setSiteManager(self, components):
+ self._components = components
+
+
def __class_init__(self):
try: mt=list(self.meta_types)
except: mt=[]
Modified: Zope/branches/philikon-local-components/lib/python/OFS/interfaces.py
===================================================================
--- Zope/branches/philikon-local-components/lib/python/OFS/interfaces.py 2006-03-07 16:27:21 UTC (rev 65858)
+++ Zope/branches/philikon-local-components/lib/python/OFS/interfaces.py 2006-03-07 16:28:46 UTC (rev 65859)
@@ -28,6 +28,7 @@
from webdav.interfaces import IDAVResource
from zope.app.traversing.interfaces import IContainmentRoot
+from zope.app.component.interfaces import IPossibleSite
class IOrderedContainer(Interface):
@@ -476,13 +477,12 @@
# not synced with ZopeBook API Reference;
# based on OFS.ObjectManager.ObjectManager
class IObjectManager(IZopeObject, ICopyContainer, INavigation, IManageable,
- IAcquirer, IPersistent, IDAVCollection, ITraversable):
-
+ IAcquirer, IPersistent, IDAVCollection, ITraversable,
+ IPossibleSite):
"""Generic object manager
This interface provides core behavior for collections of heterogeneous
- objects.
- """
+ objects."""
meta_types = Tuple(
title=u"Meta types",
More information about the Zope-Checkins
mailing list