[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - CatalogPathAwareness.py:1.8 __init__.py:1.19

Chris McDonough chrism@zope.com
Fri, 12 Apr 2002 15:26:50 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv13270

Modified Files:
	CatalogPathAwareness.py __init__.py 
Log Message:
    Register CatalogPathAware (a bare subclass of CatalogPathAwareness
    .CatalogAware) as a
    ZClass base class.  Its reason for existence is to make the name
    that shows up in the ZClass Product list different than 'ZCatalog:
    CatalogAware', which is the name registered by
    CatalogAwareness.CatalogAware.  The fix should *really* be to
    change the product registry to keep the whole module/class path
    and to make the ZClass add UI show the whole path, but this is
    nontrivial, we don't want to spend a lot of time on ZClasses, and
    this works.

    Now when we tell people to use CatalogPathAware instead of CatalogAware,
    they will actually be able to do it without a lot of effort.

    The reason we can't replace CatalogAware with CatalogPathAware is
    backwards-compatibility and the desire to not force people to do
    data conversion on their existing instances.



=== Zope/lib/python/Products/ZCatalog/CatalogPathAwareness.py 1.7 => 1.8 ===
         return 'done!'
 
+class CatalogPathAware(CatalogAware):
+    """
+    This is a stub class that gets registered in __init__.py as a
+    ZClass base class.  Its reason for existance is to make the name
+    that shows up in the ZClass Product list different than 'ZCatalog:
+    CatalogAware', which is the name registered by
+    CatalogAwareness.CatalogAware.  The fix should *really* be to
+    change the product registry to keep the whole module/class path
+    and to make the ZClass add UI show the whole path, but this is
+    nontrivial, we don't want to spend a lot of time on ZClasses, and
+    this works.
+    """
 
 
 


=== Zope/lib/python/Products/ZCatalog/__init__.py 1.18 => 1.19 ===
 """ZCatalog product"""
 
-import ZCatalog, Catalog, CatalogPathAwareness,  ZClasses
+import ZCatalog, Catalog, CatalogAwareness, CatalogPathAwareness, ZClasses
 from Products.PluginIndexes.TextIndex import Vocabulary
 from ZClasses import createZClassForBase
 
 createZClassForBase( ZCatalog.ZCatalog , globals()
                    , 'ZCatalogBase', 'ZCatalog' )
-createZClassForBase( CatalogPathAwareness.CatalogAware, globals()
+createZClassForBase( CatalogAwareness.CatalogAware, globals()
                    , 'CatalogAwareBase', 'CatalogAware' )
+createZClassForBase( CatalogPathAwareness.CatalogPathAware, globals()
+                   , 'CatalogPathAwareBase', 'CatalogPathAware' )
 
 def initialize(context):
     context.registerClass(