Class JsonArrayProducer
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.controller.json.JsonProducer
-
- edu.cornell.mannlib.vitro.webapp.controller.json.JsonArrayProducer
-
- Direct Known Subclasses:
GetEntitiesByVClass,GetEntitiesByVClassContinuation
public abstract class JsonArrayProducer extends JsonProducer
A base for classes that produce a JSON array based on the parameters in the VitroRequest. Catches any exceptions. Logs the error and returns an empty JSON array.
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.ServletContextctxprotected VitroRequestvreq
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonArrayProducer(VitroRequest vreq)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract com.fasterxml.jackson.databind.node.ArrayNodeprocess()Sub-classes implement this method.voidprocess(javax.servlet.http.HttpServletResponse resp)-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.controller.json.JsonProducer
getVclassIds, getVclassParameter, individualsToJson
-
-
-
-
Field Detail
-
vreq
protected final VitroRequest vreq
-
ctx
protected final javax.servlet.ServletContext ctx
-
-
Constructor Detail
-
JsonArrayProducer
protected JsonArrayProducer(VitroRequest vreq)
-
-
Method Detail
-
process
protected abstract com.fasterxml.jackson.databind.node.ArrayNode process() throws ExceptionSub-classes implement this method. Given the request, produce a JSON object as the result.- Throws:
Exception
-
process
public final void process(javax.servlet.http.HttpServletResponse resp) throws IOException- Throws:
IOException
-
-