[jira] [Comment Edited] (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 edited comment on OAK-3328 at 11/21/16 10:49 AM:
-

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 (the string instead of the tree) 
it does work though. How can i get the node name from the _NodeState_ without 
casting it to _SegmentNodeState_ ?


was (Author: iosonomarco):
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] [Comment Edited] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-19 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 edited comment on OAK-3328 at 11/19/16 6:25 PM:


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}

Is possible to extract the NodeDefinition from the NodeState (to check weather 
the node has the "IGNORE" property or not)? I tried but I don't seem to find a 
way to do it.
This way i can modify the method that defines the value for the _isReadOnly_ 
property. By the way, is that the right thing to do?

Marco.


was (Author: iosonomarco):
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}

Is possible to extract the NodeDefinition from the NodeState (to check weather 
the node has the "IGNORE" property or not)? I tried but I don't seem to find a 
way to do it.
This way i can modify the method that defines the value for the _readOnly_ 
property. By the way, 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] [Comment Edited] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-19 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 edited comment on OAK-3328 at 11/19/16 6:25 PM:


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}

Is possible to extract the NodeDefinition from the NodeState (to check weather 
the node has the "IGNORE" property or not)? I tried but I don't seem to find a 
way to do it.
This way i can modify the method that defines the value for the _readOnly_ 
property. By the way, is that the right thing to do?

Marco.


was (Author: iosonomarco):
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}

Is possible to extract the NodeDefinition from the NodeState (to check weather 
the node has the "IGNORE" property or not)?  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] [Comment Edited] (OAK-3328) checked-in state should only affect properties with OPV!=IGNORE

2016-11-19 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 edited comment on OAK-3328 at 11/19/16 6:22 PM:


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}

Is possible to extract the NodeDefinition from the NodeState (to check weather 
the node has the "IGNORE" property or not)?  Is that the right thing to do?

Marco.


was (Author: iosonomarco):
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] [Comment Edited] (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 edited comment on OAK-3328 at 11/17/16 3:44 PM:


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?
I also tried to find where to fix it, but I haven't been able to find a 
complete solution..

thanks, Marco.


was (Author: iosonomarco):
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)


[jira] [Comment Edited] (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 edited comment on OAK-3328 at 11/17/16 3:44 PM:


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?
I also tried to find how to fix it, but I haven't been able to find a complete 
solution..

thanks, Marco.


was (Author: iosonomarco):
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?
I also tried to find where to fix it, but I haven't been able to find a 
complete solution..

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)