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: Generalize MicroKernelImpl#toJson method?
Date Tue, 30 Oct 2012 12:31:33 GMT
On Tue, Oct 30, 2012 at 10:28 AM, Mete Atamel <matamel@adobe.com> wrote:
> Hi,
>
> MicroKernelImpl has a toJson method that takes care of converting nodes to
> Json format. It'd be really useful if this method was a public static
> method in a separate class (JsonUtil#toJson?) so other MicroKernel
> implementations can use it as well. This is quite possible and I already
> made sure MicroKernel#toJson works with MongoMicroKernel. The only
> MicroKernelImpl specific part in MicroKernelImpl#toJson is when :hash is
> being checked and that requires the revision store but if revision store
> is provided as an argument to toJson method, toJson can skip the :hash
> check when revision store is null.

hmm, i don't like having a RevisionProvider parameter in a general
utility method.
RevisionProvider is implementation specific.

how about providing a callback which returns the content hash of a
NodeState instance? the callback could return null if it can't/doesn't
support it.

cheers
stefan

>
> -Mete
>

Mime
View raw message