Migrate database extension importers to Jackson

This commit is contained in:
Antonin Delpeuch 2018-11-05 16:43:20 +00:00
parent e4e73d0b92
commit 1eaadc30b7

View File

@ -45,7 +45,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.refine.ProjectManager; import com.google.refine.ProjectManager;
import com.google.refine.RefineServlet; import com.google.refine.RefineServlet;
import com.google.refine.commands.HttpUtilities; import com.google.refine.commands.HttpUtilities;
@ -192,7 +192,7 @@ public class DatabaseImportController implements ImportingController {
job.updating = true; job.updating = true;
try { try {
JSONObject optionObj = ParsingUtilities.evaluateJsonStringToObject( ObjectNode optionObj = ParsingUtilities.evaluateJsonStringToObjectNode(
request.getParameter("options")); request.getParameter("options"));
List<Exception> exceptions = new LinkedList<Exception>(); List<Exception> exceptions = new LinkedList<Exception>();
@ -265,7 +265,7 @@ public class DatabaseImportController implements ImportingController {
ProjectMetadata metadata, ProjectMetadata metadata,
final ImportingJob job, final ImportingJob job,
int limit, int limit,
JSONObject options, ObjectNode options,
List<Exception> exceptions) throws DatabaseServiceException{ List<Exception> exceptions) throws DatabaseServiceException{
@ -323,7 +323,7 @@ public class DatabaseImportController implements ImportingController {
job.updating = true; job.updating = true;
try { try {
final JSONObject optionObj = ParsingUtilities.evaluateJsonStringToObject( final ObjectNode optionObj = ParsingUtilities.evaluateJsonStringToObjectNode(
request.getParameter("options")); request.getParameter("options"));
final List<Exception> exceptions = new LinkedList<Exception>(); final List<Exception> exceptions = new LinkedList<Exception>();
@ -394,7 +394,7 @@ public class DatabaseImportController implements ImportingController {
ProjectMetadata metadata, ProjectMetadata metadata,
final ImportingJob job, final ImportingJob job,
int limit, int limit,
JSONObject options, ObjectNode options,
List<Exception> exceptions) throws DatabaseServiceException{ List<Exception> exceptions) throws DatabaseServiceException{