[Zope] Custom Repository for Storing Objects

Dieter Maurer dieter@handshake.de
Thu, 9 Jan 2003 23:43:32 +0100


Sameer Maggon wrote at 2003-1-9 18:11 -0800:
 > I am a newbie to Zope and have just gone through the tutorials and a little
 > bit of ZopeBook. I have my own Custom Repository (RDBMS based) that has the
 > features like storing flat files, folders etc. It also has provisions for
 > user management. I have the XML APIs (lanuage is not a problem) for
 > interacting with the repository.
 > 
 > Can I store all the objects created in Zope in that repository?
The easiest way to integrate with a Custom Repository
would be to go along the RDBMS integration.

This would mean, the objects were not created in Zope at all
but directly in the Custom Repository.
Zope would provide views on the Custom Repository similar to
Z SQL Methods (and the associated search interfaces) for relational databases.

 > Further I also want that the authentication should also be done based on
 > that repository (its like the roles and users defined in the custom system).
 > Is it possible in Zope?
You would customize a User Folder.

There are (almost) hundreds of examples for such a task...

 > I can comprehend that I would need to develop some kind of an interface that
 > sits between the two for integration, but I wanted to know that whether it
 > is possible in Zope or not?
It is.

 > Its like when a user creates a folder or an object, the request is actually
 > send to a module and then that module stores the object in my repository
 > (may be the format is little bit changed) and vice-versa.
The interface would probably make the content of your
repository "URL-addressable" (see Z SQL Methods and especially
"direct traversal" in this context).
It would create proxy objects (maybe using acquisition)
to present/update/delete the objects in your repositiory.


Dieter