[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - IServiceManagerContainer.py:1.1.2.3

Paul Everitt paul@zope.com
Thu, 28 Feb 2002 14:56:37 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv4153

Modified Files:
      Tag: Zope-3x-branch
	IServiceManagerContainer.py 
Log Message:
Added unit tests for IServiceManagerContainer and added a query method
for IServiceManagerContainer.  Also clarified what the get method does
when there isn't a service manager.



=== Zope3/lib/python/Zope/ComponentArchitecture/IServiceManagerContainer.py 1.1.2.2 => 1.1.2.3 ===
 class IServiceManagerContainer(Interface):
 
-    def getServiceManager():
-        """Returns the service manager contained in this object."""
+    def getServiceManager(default=None):
+        """Returns the service manager contained in this object.
+
+        If there isn't a service manager, we return the default or
+        raise a component lookup error if no default was provided.
+        """
 
     def setServiceManager(sm):
         """Sets the service manager for this object."""
+
+    def hasServiceManager():
+        """Query to find out if the component defines a service manager."""
+