You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "De Georges, Adrien" <Ad...@experian.com> on 2011/03/14 11:00:47 UTC
Problem using OPV ignore on versioned node
Hello everybody,
Sorry to bother you again. But if somebody has some idea on this urgent
point, it will be very helpful.
Thanks a lot
Adrien
-----Original Message-----
From: De Georges, Adrien [mailto:Adrien.DeGeorges@experian.com]
Sent: 11 March 2011 14:58
To: users@jackrabbit.apache.org
Subject: [USERs-JACKRABBIT] Problem using OPV ignore on versioned node
Hi everyone,
I am a new user of this mailing list.
I am working on a project where JackRabbit 2.2.1 is used.
Recently I add a problem with versionable nodes and I can't find a
solution to fix it.
I have a node which is checked-in (jcr:checkOut is false). I want to add
a property without incrementing the version of the parent node (without
checkout/checkin).
I saw in the JCR specification (jsr-283 page 299) that during a checkin:
If a node X becomes read-only then:
* For every permissible property P of X where the property
definition applying to P has an OPV other than IGNORE, P cannot be
added, removed or have its value changed.
* ...
So I tried to use the OPV attribute defining my node type.
Here is an extract of my cnd file.
//The base object type : versionable and with a non versionable property
[exp:baseObject] > exp:versionablecontent
- ownerGuid (string) = 'test' mandatory autocreated ignore
This property is well created with the default value 'test' and the
on-parent-version is set to 5 (I think it is the IGNORE value). But when
I try to modify this property (setProperty) a VersionException is
triggered (because the node is checked in).
Does somebody has any idea to fix my problem, please?
Thanks in advance
Best regards.
Adrien DE GEORGES
Information in this e-mail and any attachments is confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient. Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free.
Companies Act information: Registered name: Experian Limited. Registered office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, United Kingdom. Place of registration: England and Wales. Registered number: 653331
Re: Problem using OPV ignore on versioned node
Posted by anjan <po...@gmail.com>.
Hi Adrien, sorry to post on an old thread. But we also have similar
requirement and I wanted to know what approach you have taken for this OPV
issue.
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/USERs-JACKRABBIT-Problem-using-OPV-ignore-on-versioned-node-tp3348191p4661609.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: Problem using OPV ignore on versioned node
Posted by Alexander Klimetschek <ak...@adobe.com>.
On 14.03.11 15:11, "De Georges, Adrien" <Ad...@experian.com>
wrote:
>Thanks Alex for your reply.
>But, in fact the OPV attribute should allow to modify a such property
>without checking in the parent.
>I found an opened issue in JCR issue tracker :
>https://issues.apache.org/jira/browse/JCR-639
I checked the JCR 2.0 spec again, and I think you are right - it is
actually quite clear: the read-only state should only apply to items with
OPV != IGNORE (Section 15.2.2,
http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on
%20Check-In ).
So JCR-639 is a valid bug, I added a note.
>So unfortunately, I guess I will have to find another solution.
Yes, until the bug is fixed :-)
However, the use case seems to be very seldom (hence no real interest in
this bug AFAICS). Often you do have a versionable node that is always
checked out (and ACLs governing write access) and only checked-in +
immediately checked-out when you "create a version" in your application.
In that case you don't run into this issue, and the OPV=IGNORE children
will simply not be copied to the new version.
Regards,
Alex
--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel
RE: Problem using OPV ignore on versioned node
Posted by "De Georges, Adrien" <Ad...@experian.com>.
Thanks Alex for your reply.
But, in fact the OPV attribute should allow to modify a such property
without checking in the parent.
I found an opened issue in JCR issue tracker :
https://issues.apache.org/jira/browse/JCR-639
So unfortunately, I guess I will have to find another solution.
Regards,
Adrien
-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@adobe.com]
Sent: 14 March 2011 12:27
To: users@jackrabbit.apache.org
Subject: Re: Problem using OPV ignore on versioned node
On 14.03.11 11:00, "De Georges, Adrien" <Ad...@experian.com>
wrote:
>[exp:baseObject] > exp:versionablecontent
>
>- ownerGuid (string) = 'test' mandatory autocreated ignore
>
>
>This property is well created with the default value 'test' and the
>on-parent-version is set to 5 (I think it is the IGNORE value). But
when
>I try to modify this property (setProperty) a VersionException is
>triggered (because the node is checked in).
AFAIK, the OnParentVersion only dictates what to do on versioning =
checkin of a node, if the child node or property should be copied to the
version node or not.
To modify the "head" of a versioned node (such as setting any property
on
it), the node always has to be checked out.
Regards,
Alex
--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel
Information in this e-mail and any attachments is confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient. Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free.
Companies Act information: Registered name: Experian Limited. Registered office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, United Kingdom. Place of registration: England and Wales. Registered number: 653331
Re: Problem using OPV ignore on versioned node
Posted by Alexander Klimetschek <ak...@adobe.com>.
On 14.03.11 11:00, "De Georges, Adrien" <Ad...@experian.com>
wrote:
>[exp:baseObject] > exp:versionablecontent
>
>- ownerGuid (string) = 'test' mandatory autocreated ignore
>
>
>This property is well created with the default value 'test' and the
>on-parent-version is set to 5 (I think it is the IGNORE value). But when
>I try to modify this property (setProperty) a VersionException is
>triggered (because the node is checked in).
AFAIK, the OnParentVersion only dictates what to do on versioning =
checkin of a node, if the child node or property should be copied to the
version node or not.
To modify the "head" of a versioned node (such as setting any property on
it), the node always has to be checked out.
Regards,
Alex
--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel