You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2013/02/15 10:05:13 UTC

[jira] [Resolved] (OAK-626) Allow for setting orderable child nodes on the parent tree

     [ https://issues.apache.org/jira/browse/OAK-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela resolved OAK-626.
------------------------

    Resolution: Fixed

applied updated patch and added a few tests.
                
> 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, 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