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

angela edited comment on OAK-626 at 2/14/13 4:05 PM:
-----------------------------------------------------

patch without test-cases for solution 2) that in addition removes the hack on 
TreeUtil.
no extra checks yet that validate if calling either method related to children 
ordering
is actually 'valid'. tests will follow once we reach consensus.
                
      was (Author: anchela):
    patch without test-cases... i can create those
if we agree on how to do it.
                  
> Allow for setting orderable child nodes on the parent tree
> ----------------------------------------------------------
>
>                 Key: OAK-626
>                 URL: https://issues.apache.org/jira/browse/OAK-626
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: angela
>         Attachments: OAK-626.patch
>
>
> currently the only way to enforce orderable child nodes is to call
> Tree#orderBefore. IMHO this doesn't properly reflect the fact that
> the requirement for ordered child nodes is defined by the primary
> node type of the parent rather than by the child nodes.
> i see 2 different ways how we could implement this:
> 1) the tree evaluates it's primary type and sets the OAK_CHILD_ORDER
>    property accordingly
> 2) we extend the Tree interface and delegate the responsibility to the
>    API caller -> patch attached that also removes the hack on TreeUtil
> in case of 2) we should/could adjust oak-jcr to call this method upon
> adding child nodes or changing the primary type instead of calling a
> fake-reorder that currently asserts that the child order is stable.
> open question regarding 2:
> should oak-core verify if the primary type mandates orderable child
> nodes upon reorder or calling the new method? should it be allowed
> to have the OAK_CHILD_ORDER property if the children are not orderable?
> should calling reorder fail in that case?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to