Hi
It seems there are some uncorrelated actions involving lifecycle, doc
versioning, version fields incrementation, publishing, etc.
Maybe it is needed to clear the issues.
/About versioning:/
- there are two separate features which do not depend on each other,
though they are related in some ways:
- jcr - document versioning that is creating snapshots of documents
(like in svn/cvs etc)
- versioning component which handles version fields incrementation
(minor_version, major_version) by some rules.
/Behaviour:/
When a document is saved and a version incrementation will be performed,
also a snapshot is created. This is
hardcoded for now - it might be good to externalize to some EP config.
/Implementation:/
If the client code wants a snapshot to be created it specify this as
document context data entry before document
being saved with normal /saveDocument/ method:
currentDocument.putContextData(
VersioningDocument.CREATE_SNAPSHOT_ON_SAVE_KEY,
true);
For instance this is set from DocumentVersioningBean when an
incrementation option is selected. Probably it'll be
better to be set it in a core listener depending on the versioning
rules, but this means calling core listeners before
creating document snapshot and might lead to document alteration before
freezing (need investigation though).
Also the "saveDocumentAsNewVersion" is deprecated since it's
functionality is covered by using the above param.
/About Lifecycle:
/The lifecycle is not altered in any way by the versioning component -
should it be?! But it is considered in versioning rules.
/About Publishing:/
When a document is published a Proxy is created pointing to a snapshot
of the document - this is a frozen version of the document, but not the
current document, is that so? (narcis?)
Dragos
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm