[Zope] FileSystemSite aware product
Alexis Roda
alexis.roda at urv.es
Wed Sep 1 11:26:42 EDT 2004
Hi,
I have a container product and I would like to write the corresponding
FSxxx adapter. It would be nice if I could map the object as a folder on
the filesystem.
I've got this working, but I find my solution too complex. It would be
nice if someone could give a better way.
I map the object to a file "name.xxx" (which stores some object
properties) and a folder "_name.xxx" (which is hidden to FSSite and acts
as the real container). In the product I define three classes:
* XxxSurrogate(DirectoryViewSurrogate, Xxx), Xxx is the original, non
FS, product class.
* XxxView(DirectoryView) on which I override __of__ so it returns a
XxxSurrogate for the directory "_name.xxx".
* FSXxx(FSObject) which parses "name.xxx" and creates instances of XxxView.
What I don't like from that solution are the XxxSurrogate and XxxView
classes. Does FileSystemSite provide some way to acomplish that in a
simpler way?
Thanks in advance
--
////
(@ @)
----------------------------oOO----(_)----OOo--------------------------
<> Ojo por ojo y el mundo acabara ciego
/\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain)
-----------------------------------------------------------------------
More information about the Zope
mailing list