[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - hub.py:1.5

Steve Alexander steve@cat-box.net
Wed, 19 Mar 2003 13:05:34 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv29463/src/zope/app/interfaces/services

Modified Files:
	hub.py 
Log Message:
Changed the hubIds service / ObjectHub implementation to use unicode
strings for paths, rather than tuples of unicode strings.
This is part of the ongoing work Albert and I are doing to standardize on
unicode strings for paths.



=== Zope3/src/zope/app/interfaces/services/hub.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/interfaces/services/hub.py:1.4	Mon Feb  3 11:01:11 2003
+++ Zope3/src/zope/app/interfaces/services/hub.py	Wed Mar 19 13:05:03 2003
@@ -130,8 +130,8 @@
         If there is no hub id, raise NotFoundError.
         """
 
-    def getLocation(hubid):
-        """Returns a location as a tuple of unicodes.
+    def getPath(hubid):
+        """Returns a location as a unicodes string path.
 
         If there is no location, raise NotFoundError.
         """
@@ -144,18 +144,18 @@
         the traversal service raises.
         """
 
-    def register(obj_or_loc):
-        """Returns a new hub id for the given location or the given
+    def register(path_or_object):
+        """Returns a new hub id for the given path or the given
         wrapped object if it is not already registered.
 
-        A hubId is an int. 0 is never a valid hubId.
+        A hubId is an int, but 0 is never a valid hubId.
 
         It also emits a HubIdObjectRegisteredEvent.  Raises an
-        ObjectHubError if the location was previously registered.
+        ObjectHubError if the path was previously registered.
         """
 
-    def unregister(obj_or_loc_or_hubid):
-        """Unregister an object by wrapped object, by location, or by hubid.
+    def unregister(path_or_object_or_hubid):
+        """Unregister an object by path, by wrapped object, or by hubid.
 
         It also emits a HubIdObjectUnregisteredEvent.
         If the hub id or location wasn't registered a
@@ -163,14 +163,14 @@
         """
 
     def numRegistrations():
-        """Returns the number of location<-->hubid registrations held.
+        """Returns the number of path<-->hubid registrations held.
         """
 
-    def getRegistrations(location='/'):
+    def iterRegistrations(path=u'/'):
         """Returns a sequence of the registrations at and within the
-        given location.
+        given path.
 
-        A registration a tuple (location, hib_id).
+        A registration a tuple (path, hubid).
         """