jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Semantics of MicroKernel.getNodes()
Date Thu, 15 Mar 2012 10:05:57 GMT
On Thu, Mar 15, 2012 at 9:57 AM, Bart van der Schans
<b.vanderschans@onehippo.com> wrote:
> Hi,
>
> On Wed, Mar 14, 2012 at 2:54 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
>> Hi there,
>>
>> I'm looking at MicroKernel.getNodes(), and I believe the semantics might
>> perform non-optimal unless we get the property filtering right.
>>
>> A typical use case always is browsing a repository using a tree view.
>>
>> A tree view usually needs, given a node N:
>>
>> - all or a subset of all properties of node N
>>
>> - the set of child node names, and for each of these child nodes, a
>> predefined set of properties that will allow the caller to decorate the node
>> properly -- such as whether it's a container, and maybe the type).
>
> Not sure if it matters at all for this specific thread, but another
> very common use case with trees:
> - a check if node N has children or not

there's the system generated :childNodeCount property
and there's also the getChildNodeCount(String path, String revId) method.

cheers
stefan

>
> That check should/could be a lot more lightweight than fetching a list
> of child node names.
>
> Regards,
> Bart

Mime
View raw message