com.day.cq.search.writer
Class SelectivePropHitWriter

java.lang.Object
  extended by com.day.cq.search.writer.SelectivePropHitWriter
All Implemented Interfaces:
ResultHitWriter

public class SelectivePropHitWriter
extends Object
implements ResultHitWriter

SelectivePropHitWriter writes selective node properties.


Constructor Summary
SelectivePropHitWriter()
           
 
Method Summary
 void write(Hit hit, JSONWriter writer, Query query)
          Writes a given Hit into the JSONWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectivePropHitWriter

public SelectivePropHitWriter()
Method Detail

write

public void write(Hit hit,
                  JSONWriter writer,
                  Query query)
           throws RepositoryException,
                  JSONException
Description copied from interface: ResultHitWriter
Writes a given Hit into the 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.

Specified by:
write in interface ResultHitWriter
Parameters:
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 ( query.getPredicates().get("param", "default"))
Throws:
RepositoryException - in case access on the hit failed
JSONException - in case there is a problem with writing to the jsonwriter


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.