[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services -
service.py:1.15
Jim Fulton
jim at zope.com
Tue Sep 2 17:47:18 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv16881/src/zope/app/interfaces/services
Modified Files:
service.py
Log Message:
Added ISite, which is a marker interface indicating that an object is
a site.
When an object is made into a site, ISite is declared for it.
Change to test whether something is a site by testing whether
it (declares it) implements ISite.
=== Zope3/src/zope/app/interfaces/services/service.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/interfaces/services/service.py:1.14 Sat Jun 21 17:22:10 2003
+++ Zope3/src/zope/app/interfaces/services/service.py Tue Sep 2 16:46:47 2003
@@ -21,7 +21,6 @@
from zope.component.interfaces import IServiceService
from zope.app.interfaces.services import registration
-
class ILocalService(registration.IRegisterable):
"""A local service isn't a local service if it doesn't implement this.
@@ -56,36 +55,23 @@
"""
-class IReadServiceManagerContainer(Interface):
-
- def getServiceManager():
- """Returns the service manager contained in this object.
+class IPossibleSite(Interface):
+ """An object that could be a site
+ """
- If there isn't a service manager, raise a component lookup.
+ def setSiteManager(sm):
+ """Sets the service manager for this object.
"""
- def queryServiceManager(default=None):
+ def getSiteManager():
"""Returns the service manager contained in this object.
- If there isn't a service manager, return the default.
+ If there isn't a service manager, raise a component lookup.
"""
- def hasServiceManager():
- """Query to find out if the component defines a service manager."""
-
-Read = IReadServiceManagerContainer
-
-class IWriteServiceManagerContainer(Interface):
-
- def setServiceManager(sm):
- """Sets the service manager for this object."""
-
-Write = IWriteServiceManagerContainer
-
-class IServiceManagerContainer(IReadServiceManagerContainer,
- IWriteServiceManagerContainer):
- pass
-
+class ISite(IPossibleSite):
+ """Marker interface to indicate that we have a site
+ """
class IBindingAware(Interface):
More information about the Zope3-Checkins
mailing list