jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Launay <sebastien.lau...@anyware-tech.com>
Subject Re: Jackrabbit temporal content
Date Thu, 26 Jun 2008 20:02:40 GMT
Hi,

In the same spirit of read-only versions, you can rely on
the labeling feature of a node (this is like tagging in SCM):
- create 3 versions of the content (A, B, C)
- label the version you want to use using 
VersionHistory#addVersionLabel(...)**
- retrieve the node with this label using 
VersionHistory#getVersionByLabel(...)
- when you want to switch to another version reuse 
VersionHistory#addVersionLabel(...)

And you still can edit your content (root version) without
compromising the labeled (active) version.

If you need to update the versions, you can also use the following
labels with Node#*restoreByLabel*(...) :
- "A" for the latest version A
- "B" for the latest version B
- "C" for the latest version C
- "active" for the version to be active

There is also the branching feature with Node#clone(...) but i do not
know if a label is local to a branch or global to the node.

--
S├ębastien

Tobias Bocanegra wrote:
> hi,
> i case your 'versions' are read-only, you could add your mixin to the
> nodes and then create a version. you could then retrieve the
> respective version that matches your timeframe and access the
> jcr:frozenNode transparently.
>
> regards, toby
>
> On 6/25/08, Wes <jackrabbit@wesware.securebeer.com> wrote:
>   
>> We are working on a project that has the requirement that content has a
>>  temporal quality in that it will become effective at a particular
>>  date/time and become expired at a future date/time.  All of the
>>  information also needs to be versioned and auditable.  Has anyone
>>  leveraged Jackrabbit to support this type of temporal processing?  My
>>  initial thought is this could be performed within the repository as a
>>  mixin on a node that would need temporal qualities.
>>
>>  As an example we have a node that has 3 differing temporal versions that
>>  should be active for during a particular time period.
>>  Version A :  1/1/2000 - 1/1/2001
>>  Version B :  1/1/2001 - 1/1/2002
>>  Version C :  1/1/2002 - present(12/12/9999)
>>
>>  There may also be an update to say Version B above in that we would have a
>>  new version for that time period.
>>  Version B1:  1/1/2001 - 1/1/2002
>>
>>  Any thoughts, pointers, suggestions?
>>
>>  Thanks
>>
>> Wes
>>
>>
>>     


Mime
View raw message