[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-12-13 Thread Marco Piovesana (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15745594#comment-15745594
 ] 

Marco Piovesana commented on OAK-3328:
--

Hi Marcel,
do you know, more less, how long does it take to know if the patch is accepted 
or rejected?

thanks, Marco.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
> Attachments: proposed_fix_for_OAK_3328-updated.patch, 
> proposed_fix_for_OAK_3328.patch
>
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-22 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15686670#comment-15686670
 ] 

Marcel Reutegger commented on OAK-3328:
---

Marco, thanks for the patch. The tests look good, but other classes contain a 
lot of unrelated changes, which makes it difficult to identify the changes you 
actually propose. Can you please attach a patch with only the required changes?

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
> Attachments: proposed_fix_for_OAK_3328.patch
>
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-22 Thread Marco Piovesana (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15686235#comment-15686235
 ] 

Marco Piovesana commented on OAK-3328:
--

Hi Marcel,
I think I've got a solution for the bug with the relative tests. I've attached 
it to the issue, is it ok? What should I do to propose it?
Let me know if the solution looks ok for you guys.

thanks, Marco.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
> Attachments: proposed_fix_for_OAK_3328.patch
>
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-21 Thread Marco Piovesana (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15683183#comment-15683183
 ] 

Marco Piovesana commented on OAK-3328:
--

I tried, this is what i did:
{code:java}
Tree parentTree = TreeFactory.createTree(this.parent.node);
Tree nodeTree = TreeFactory.createTree(this.node);
this.vMgr.getNodeTypeManager().getDefinition(parentTree, nodeTree);
{code}

but it fails because the generated _nodeTree_ has an empty value per the field 
"name". 
If I call _getDefinition_ using the node name it does work though. How can i 
get the node name from the _NodeState_ without casting it to _SegmentNodeState_ 
?

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-21 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15683030#comment-15683030
 ] 

Marcel Reutegger commented on OAK-3328:
---

Yes, this is the right place for the change. Have a look at 
VersionableState.getOPV(). There are two variants, one for child nodes and one 
for properties. It uses a ReadOnlyNodeTypeManager to get the flag. I'd say 
something similar should work for the VersionEditor as well.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-17 Thread Marco Piovesana (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15674325#comment-15674325
 ] 

Marco Piovesana commented on OAK-3328:
--

Hi Marcel,
thanks for the hint. I did try to look at the patch and modify 
_checkPrecondition_ method. I was able to modify the property but i still get 
an error when trying to save the session.

It fails inside the class _VersionEditor_ because of this check:
{code:java}
public void propertyChanged(PropertyState before, PropertyState after) 
throws CommitFailedException {
if(!this.isVersionable()) {
if(!this.isVersionProperty(after) && this.isReadOnly) {
throwCheckedIn("Cannot change property " + after.getName() + " 
on checked in node");
}
{code}

do you know how can i check the OPV settings of this property (or its parent 
node) to see if is set to "IGNORE"? Is that the right thing to do?

Marco.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-17 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15674072#comment-15674072
 ] 

Marcel Reutegger commented on OAK-3328:
---

So far there was no pressing need to fix this. The patch in OAK-3310 should 
give you a pretty good indication where the check would have to consider the 
OPV setting as well.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-17 Thread Marco Piovesana (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15674020#comment-15674020
 ] 

Marco Piovesana commented on OAK-3328:
--

Hi all,
i'm using oak to implement a functionality that relies on this behaviour. Is 
there any plan to resolve this bug in the near future?

thanks, Marco.

> checked-in state should only affect properties with OPV!=IGNORE
> ---
>
> Key: OAK-3328
> URL: https://issues.apache.org/jira/browse/OAK-3328
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>
> We currently (as of OAK-3310) protect all properties from changes when the 
> node is checked-in. According to the spec 
> (http://www.day.com/specs/jcr/2.0/15_Versioning.html#15.2.2%20Read-Only%20on%20Check-In),
>  this should only be the case when on-parent-version is != "IGNORE".
> (It seems this doesn't have TCK coverage)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)