[Zope-CMF] Staging content

Dieter Maurer dieter@handshake.de
Tue, 11 Feb 2003 19:16:49 +0100

Mark Gibson wrote at 2003-2-11 10:06 -0700:
 > ....
 > > 
 > > "revise", "cancelRevision" and "publish" have associated scripts
 > > which perform the create/remove/store the revision copy.
 > > The copy is stored in the "Revision" attribute of revised object.
 > > "becomeRevision" is an automatic transistion which fires when
 > > the object has a parent and it is the "Revision" attribute of the
 > > parent.
 > I can't follow your last sentence above.  When is "becomeRevision" fired,
 > and for which objects?
The "revise" transition brings the original object into state
"underRevision" and copies it to a new object which is stored
as its 'Revision' attribute.

The new object is then brought into its initial state ("new").
As the condition for "becomeRevision" is true (the new object
is the "Revision" attribute of its parent),
this automatic transition fires and bring the copy into
state "isRevision".

 > Does this have to do with folderish objects?
No. The copy is just used as "Revision" attribute.

 > So, you store revisions of an object as a property of that object?
Its not a property (in Zope's sense) but an attribute (more precisely
a "member") (in Python's sense).

 > If 
 > you can make sense of my diagram:
 >    Object  Attributes:
 >    MyDoc
 >         -> title
 >         -> body
 >         -> body_type
 >         -> Revision    Attributes:
 >                     -> title
 >                     -> body
 >                     -> body_type
 > What about Folderish Object?  Do you just clone the folder and it's 
 > contents, and make it the Revision attribute of the revised object?
I use "_getCopy" for the cloning.