jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject Re: question about versioning and previewing data
Date Thu, 17 Sep 2009 22:13:57 GMT
AmirRaminfar schrieb:
> hi all,
> I am creating a cms tool where I am using the versioning to label "live"
> snapshots for content that should be live on production. any versions after
> that snapshot is either in working mode or is not being used for some other
> reason. So let's say I have a node xyz with such history:
>
> 1.0
> 1.1
> 1.2 <--labeled as "live"
> 1.3
> 1.4 <--head
>
> To show the content I can looked for the "live" version and display that. Is
> this the right idea? Has not anybody else tried this? 
>   

you can introduce a property called for example "live-revision" which 
you set on the node itself

node.setProperty("live-revision", "1.2");

which means if the content of a node is being  requested  within the 
live environment, then
you will do the following

node.getRevision(node.getProperty("live-revision")).getInputStream()

and otherwise you just do

node.getInputStream()

in order to get the head

(please note this is pseudo-code, but it should give you a clue how to 
do it)
> One problem I am having is that when I load the node for version 1.2 all the
> properties are set. But the properties for the children are not set. I am
> not sure why this is. 
>
> Please let me know what your suggestions are. I am curious to know what
> other have used to have a preview server. 
>   

well, Yanel (http://www.yanel.org) is doing this out-of-the-box, whereas 
you can couple it with some configurable workflow.

Cheers

Michael


Mime
View raw message