On Tue, Oct 30, 2012 at 10:28 AM, Mete Atamel <[email protected]> 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
>

Reply via email to