[Zope-dev] Generic filtering of objects

Robert Leftwich robert@leftfieldcorp.com
Thu, 11 Nov 1999 11:54:35 +1100


I have a requirement to be able to apply a user-definable filter to all the
views on the object database. Obviously this would be best applied at a low
a level as possible in order to minimise the impact on the application code
and to be made as generic as possible for maximum flexibility.
To save re-inventing the wheel, has anyone else had this requirement and if
so how did you implement it ?
If not, I would love to hear any suggestions on the best way to proceed. For
example, are there any hooks in the code to make this easier, can I leverage
some pre-existing code to do what I want e.g. the skip-unauthorised is
similar in concept to what I want, but it needs to work in all published
methods, not just the tree tag. Is the pluggable brain applicable ?, etc. It
seems to me that doing something with getattr/getitem would be the most
likely scenario, but acquisition might throw a spanner in the works at that
level.

TIA
Robert Leftwich