use of org.neo4j.server.rest.batch.BatchOperationResults in project neo4j by neo4j.
the class BatchOperationService method batchProcess.
private Response batchProcess(UriInfo uriInfo, HttpHeaders httpHeaders, HttpServletRequest req, InputStream body) {
try {
NonStreamingBatchOperations batchOperations = new NonStreamingBatchOperations(webServer);
BatchOperationResults results = batchOperations.performBatchJobs(uriInfo, httpHeaders, req, body);
Response res = Response.ok().entity(results.toJSON()).type(HttpHeaderUtils.mediaTypeWithCharsetUtf8(MediaType.APPLICATION_JSON_TYPE)).build();
representationWriteHandler.onRepresentationWritten();
return res;
} catch (Exception e) {
return output.serverError(e);
} finally {
representationWriteHandler.onRepresentationFinal();
}
}
Aggregations