public interface ResultHitWriter
JSONWriter. This is used in the standard servlet for the query builder to allow different output renderings. The appropriate
ResultHitWriteris selected by passing the desired name in the query using
p.hitwriter=NAMEas request parameter.
Implementations of this interface must be defined as an OSGi component
factory. The name of the factory must be the fully qualified name of this
interface plus "/" and a distinct short name of the renderer (that will be
used in request parameters to select it,
NAME above). For
example for a
ResultHitWriter under the name "damasset", the SCR
annotation would look like this:
void write(Hit hit, JSONWriter writer, Query query) throws RepositoryException, JSONException
JSONWriter. This will be called for each hit of the result page. The surrounding json structure is an array and each entry should be a simple object. The caller will have invoked the
writer.object()already and will call
writer.endObject()directly after this method returns.
hit- the result hit to render
writer- to output json
query- the original query; can be used to access custom parameters set in the predicate root group (
RepositoryException- in case access on the hit failed
JSONException- in case there is a problem with writing to the jsonwriter
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"