[Zope] FTP/WebDAV & PUT_factory() & PUT()

sean.upton@uniontrib.com sean.upton@uniontrib.com
Tue, 11 Dec 2001 13:22:54 -0800


While the list seems to be on the subject, I had a few quick questions...

1. What are the use cases for PUT() vs. PUT_factory?  Does PUT() call the
PUT_factory() to get an object then set it in the odb, or does PUT() call
the PUT_factory() to get an object, set it in the odb, then call that
object's PUT() method?  Or do I have this all wrong?

2a. I want to do something fancy/tricky, like I have a container/folderish
class instance called 'MyDocument' that really wasn't a document at all, but
a container that contained a ParsedXML document with the actual document
data.  Suppose that you wanted to FTP put (replace or create) 'MyDocument',
but actually have PUT() use the PUT() method of the ParsedXML doc inside
'MyDocument' (or failing parsing, upload it into a file object inside
'MyDocument' instead).  If I understand correctly, PUT_factory() alone
wouldn't do enough here; I would actually need to override PUT() as well.

2b. While on the subject, can one FTP put over an object subclassed from
ObjectManager?

3. If I understand correctly, PUT_factory() could be used to determine the
type that a document gets created as, trigger a CMF workflow state, or
something equally as useful, but only for objects that do not already exist
in the context/location of the ftp PUT - Is this right?  

Sean

=========================
Sean Upton
Senior Programmer/Analyst
SignOnSanDiego.com
The San Diego Union-Tribune
619.718.5241
sean.upton@uniontrib.com
=========================