You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by AmirRaminfar <fi...@gmail.com> on 2009/09/17 21:09:06 UTC

question about versioning and previewing data

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? 

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. 

-- 
View this message in context: http://www.nabble.com/question-about-versioning-and-previewing-data-tp25492229p25492229.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: question about versioning and previewing data

Posted by Michael Wechner <mi...@wyona.com>.
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