[Zope-Checkins] CVS: Zope2 - 010529-2.4-dropinindex.stx:1.1.2.1 010529-2.4-exreg.stx:1.1.2.1
Matthew T. Kromer
matt@digicool.com
Tue, 29 May 2001 08:42:19 -0400 (EDT)
Update of /cvs-repository/Zope2/doc/changenotes
In directory korak.digicool.com:/tmp/cvs-serv5028/changenotes
Added Files:
Tag: ajung-dropin-registry
010529-2.4-dropinindex.stx 010529-2.4-exreg.stx
Log Message:
Added change notes relating to plugin indexex and extended registry
--- Added File 010529-2.4-dropinindex.stx in package Zope2 ---
CHANGE
010529-2.4-dropinindex
DEVELOPMENT BRANCH TAG
ajung-dropin-registry
DESCRIPTION
This change modifies the catalog and ZCatalog to support dropin
index types.
AFFECTED MODULES
- Products/ZCatalog/Catalog
- Products/ZCatalog/ZCatalog
- Products/ZCatalog/ZCatalogIndexes
- Products/PluginIndexes/PluggableIndex
- Help/HelpSys.py
API CHANGES
Catalogs no longer have any knowledge of index types.
The Catalog base class had the method 'addIndex()' modified to
change the 'index_type' parameter from a string to an index object.
The signature of 'addIndex()' remains the same; 'addIndex(name,
index_type)'. 'addIndex()' will now raise an error if it is called
with a string argument for 'index_type'.
ZCatalogs now perform more work as a Catalog would; in particular,
it is not appropriate for another class to obtain the base Catalog
object and manipulate it directly without being closely related
to ZCatalog (ie ZCatalogIndexes and PluginIndexes).
The 'all_meta_types()' method of ZCatalog was removed. ZCatalog
will use ObjectManager's 'all_meta_types()' method.
ZCatalog gained new methods:
- addIndex(name, type)
- delIndex(name)
- clearIndex(name)
- addColumn(name, default_value)
- delColumn(name)
These methods call the underlying method of the same name on the
Catalog, with the exception of 'addIndex()'. The ZCatalog 'addIndex()'
performs as the old Catalog's 'addIndex()' in that the 'type' parameter
is the *name* of the index type to add. This type is found using
the 'meta_type' of an object which supports the interface
'Products.PluginIndexes.common.PluggableIndex.PluggableIndexInterface'.
ZCatalog's "Index" tab now goes to an object manager view of the
Indexes provided by a new class, ZCatalogIndexes. The ZCatalogIndexes
view of the indexes allows adding, removing, and reindexing, and
clearing of indexes through object-manager forms.
The help system initialization method now calls the ZCatalog
methods for manipulating indexes and columns rather than the underlying
Catalog's.
--- Added File 010529-2.4-exreg.stx in package Zope2 ---
CHANGE
010529-2.4-exreg
DEVELOPMENT BRANCH TAG
ajung-dropin-registry
DESCRIPTION
This change modifies the product registry to support additional
customizable object managers. This change allows ZCatalog to
support pluggable indexes.
AFFECTED MODULES
- App/ProductContext
- OFS/ObjectManager
API CHANGES
Product registration now accepts two additional arguments
to the 'context.registerClass()' method. These two arguments
are:
- visibility -- default is "Global"
- interfaces
Where visibility is a signal to object managers as to the applicability
of the object to be put in generic locations. The default visibility
is "Global". None should be specified if the object is not to
be globally visible. This parameter may gain other values in
the future.
Interfaces specifies the interface list that the class being registered
supports. If interfaces is not specified, it will be inspected from
the '__implements__' attribute of the 'instance_class' parameter, if
possible.
When an object manager constructs a list of objects that are eligible
to be inserted into the manager, it calls the 'all_meta_types()' method
of the object manager. The default 'all_meta_types()' method of
the base ObjectManager class has been modified to respect the
visibility setting of objects, and to accept one new parameter:
- interfaces
which is a list of interfaces to be searched for and objects which
support them will be included in the list, regardless of their
visibility, but *only* those objects which support the interfaces
will be included in the result set.
Additionally, the class 'IFAwareObjectManager' contains a single
method of 'all_meta_types()' which will aquire the attribute
'_product_interfaces' to determine the interface list, and then
call ObjectManager's 'all_meta_types()'.