[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/uniqueid/__init__.py Made UniqueIdUtility persistent (duh!).

Gintautas Miliauskas gintas at pov.lt
Thu Aug 5 08:03:51 EDT 2004


Log message for revision 26910:
  Made UniqueIdUtility persistent (duh!).
  The ILocation interface is not stated to be implemented any more.  This made
  the utility go away from the main 'Add' menu.
  


Changed:
  U   Zope3/trunk/src/zope/app/uniqueid/__init__.py


-=-
Modified: Zope3/trunk/src/zope/app/uniqueid/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/uniqueid/__init__.py	2004-08-05 10:50:02 UTC (rev 26909)
+++ Zope3/trunk/src/zope/app/uniqueid/__init__.py	2004-08-05 12:03:51 UTC (rev 26910)
@@ -21,28 +21,28 @@
 $Id$
 """
 import random
+
+from BTrees import OIBTree, IOBTree
+from persistent import Persistent
+from ZODB.interfaces import IConnection
+
+from zope.app.container.contained import Contained
 from zope.app.uniqueid.interfaces import IUniqueIdUtility, IReference
 from zope.app.uniqueid.interfaces import UniqueIdRemovedEvent
 from zope.interface import implements
-from ZODB.interfaces import IConnection
-from BTrees import OIBTree, IOBTree
 from zope.app import zapi
-from zope.app.location.interfaces import ILocation
 from zope.security.proxy import trustedRemoveSecurityProxy
 from zope.event import notify
 
 
-class UniqueIdUtility(object):
+class UniqueIdUtility(Persistent, Contained):
     """This utility provides a two way mapping between objects and
     integer ids.
 
     IReferences to objects are stored in the indexes.
     """
-    implements(IUniqueIdUtility, ILocation)
+    implements(IUniqueIdUtility)
 
-    __parent__ = None
-    __name__ = None
-
     _v_nextid = None
 
     def __init__(self):



More information about the Zope3-Checkins mailing list