@Test public void testDeleteScheduledTask() throws Exception { String providerId = "SampleProviderId"; String datasetId = "SampleId"; String taskId = "SampleTaskId"; WebTarget target = target("/" + DatasetOptionListContainer.DATASETS + "/" + datasetId + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + taskId); DataProvider dataProvider = new DataProvider(providerId, "testName", "testCountry", "testDescription", null, "testNameCode", "testHomePage", ProviderType.LIBRARY, "SampleEmail"); OaiDataSource oaiDataSource = new OaiDataSource(dataProvider, "SampleId", "SampleDescription", "SampleSchema", "SampleNamespace", "SampleMetadataFormat", "SampleOaiSourceURL", "SampleOaiSet", new IdProvidedRecordIdPolicy(), new TreeMap<String, MetadataTransformation>()); oaiDataSource.setExportDir("/Sample/Export/Path"); oaiDataSource.setMarcFormat("SampleMarcFormat"); DefaultDataSourceContainer defaultDataSourceContainer = new DefaultDataSourceContainer(oaiDataSource, "SampleNameCode", "SampleName", "/Sample/Export/Path"); when(dataManager.getDataSourceContainer(datasetId)).thenThrow(new IOException()).thenReturn(null).thenReturn(defaultDataSourceContainer); Response response = target.request(MediaType.APPLICATION_XML).delete(); assertEquals(500, response.getStatus()); response = target.request(MediaType.APPLICATION_JSON).delete(); assertEquals(404, response.getStatus()); when(taskManager.getTask(taskId)).thenReturn(null).thenReturn(new ScheduledTask()); response = target.request(MediaType.APPLICATION_JSON).delete(); assertEquals(404, response.getStatus()); when(taskManager.deleteTask(taskId)).thenReturn(false).thenReturn(true); response = target.request(MediaType.APPLICATION_XML).delete(); assertEquals(500, response.getStatus()); response = target.request(MediaType.APPLICATION_JSON).delete(); assertEquals(200, response.getStatus()); }
@DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) public Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId) throws DoesNotExistException { DataSourceContainer dataSourceContainer; try { dataSourceContainer = dataManager.getDataSourceContainer(datasetId); if (dataSourceContainer == null) throw new DoesNotExistException("Dataset with id " + datasetId + " does NOT exist!"); } catch (DocumentException | IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } if (taskManager.getTask(taskId) == null) throw new DoesNotExistException("Does NOT exist: " + "Task with id " + taskId + " does NOT exist!"); try { if (taskManager.deleteTask(taskId)) return Response.status(200).entity(new Result("Task with id " + taskId + " of dataset with id " + datasetId + " deleted!")).build(); else throw new InternalServerErrorException("Error in server : " + "Could NOT delete task with id " + taskId); } catch (IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } }
HarvestResource { @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) public Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId) throws DoesNotExistException { DataSourceContainer dataSourceContainer; try { dataSourceContainer = dataManager.getDataSourceContainer(datasetId); if (dataSourceContainer == null) throw new DoesNotExistException("Dataset with id " + datasetId + " does NOT exist!"); } catch (DocumentException | IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } if (taskManager.getTask(taskId) == null) throw new DoesNotExistException("Does NOT exist: " + "Task with id " + taskId + " does NOT exist!"); try { if (taskManager.deleteTask(taskId)) return Response.status(200).entity(new Result("Task with id " + taskId + " of dataset with id " + datasetId + " deleted!")).build(); else throw new InternalServerErrorException("Error in server : " + "Could NOT delete task with id " + taskId); } catch (IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } } }
HarvestResource { @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) public Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId) throws DoesNotExistException { DataSourceContainer dataSourceContainer; try { dataSourceContainer = dataManager.getDataSourceContainer(datasetId); if (dataSourceContainer == null) throw new DoesNotExistException("Dataset with id " + datasetId + " does NOT exist!"); } catch (DocumentException | IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } if (taskManager.getTask(taskId) == null) throw new DoesNotExistException("Does NOT exist: " + "Task with id " + taskId + " does NOT exist!"); try { if (taskManager.deleteTask(taskId)) return Response.status(200).entity(new Result("Task with id " + taskId + " of dataset with id " + datasetId + " deleted!")).build(); else throw new InternalServerErrorException("Error in server : " + "Could NOT delete task with id " + taskId); } catch (IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } } HarvestResource();  HarvestResource(DefaultDataManager dataManager, TaskManager taskManager); }
HarvestResource { @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) public Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId) throws DoesNotExistException { DataSourceContainer dataSourceContainer; try { dataSourceContainer = dataManager.getDataSourceContainer(datasetId); if (dataSourceContainer == null) throw new DoesNotExistException("Dataset with id " + datasetId + " does NOT exist!"); } catch (DocumentException | IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } if (taskManager.getTask(taskId) == null) throw new DoesNotExistException("Does NOT exist: " + "Task with id " + taskId + " does NOT exist!"); try { if (taskManager.deleteTask(taskId)) return Response.status(200).entity(new Result("Task with id " + taskId + " of dataset with id " + datasetId + " deleted!")).build(); else throw new InternalServerErrorException("Error in server : " + "Could NOT delete task with id " + taskId); } catch (IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } } HarvestResource();  HarvestResource(DefaultDataManager dataManager, TaskManager taskManager); @OPTIONS @Path("/" + HarvestOptionListContainer.HARVEST) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Get options over harvest conext.", httpMethod = "OPTIONS", response = HarvestOptionListContainer.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a list of all available options)") }) HarvestOptionListContainer getOptions(); @GET @Path("/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.OPTIONS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Get options over harvest conext.", httpMethod = "GET", response = HarvestOptionListContainer.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a list of all available options)") }) HarvestOptionListContainer getGETOptions(); @POST @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.START) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Initiate a new harvest.", httpMethod = "POST", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 409, message = "AlreadyExistsException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response startHarvest(
            @ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId,
            @ApiParam(value = "full|sample", defaultValue = HarvestOptionListContainer.SAMPLE, allowableValues = HarvestOptionListContainer.SAMPLE + " , " + HarvestOptionListContainer.FULL) @DefaultValue(HarvestOptionListContainer.SAMPLE) @QueryParam("type") String type); @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.CANCEL) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Cancels a harvesting ingest.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response cancelHarvest(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @POST @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULE) @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Schedules an automatic harvesting.", httpMethod = "POST", response = String.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Created (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 406, message = "MissingArgumentsException"), @ApiResponse(code = 409, message = "AlreadyExistsException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response scheduleHarvest(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Task", required = true) Task task,
            @ApiParam(value = "true|false") @DefaultValue("false") @QueryParam("incremental") boolean incremental); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Retrieves the list of schedules.", httpMethod = "GET", response = ScheduledTask.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetScheduledTasks(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId,
            @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.STATUS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets the status of a specific dataset harvesting.", httpMethod = "GET", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetHarvestingStatus(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.LOG) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets the logs of the last ingest.", httpMethod = "GET", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetLastIngestLog(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @GET @Path("/" + HarvestOptionListContainer.HARVESTS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets a list of currently executing dataset harvests", httpMethod = "GET", response = Task.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), // @ApiResponse(code = 404, message = "DoesNotExistException") }) Response getCurrentHarvestsList(); }
HarvestResource { @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) public Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId) throws DoesNotExistException { DataSourceContainer dataSourceContainer; try { dataSourceContainer = dataManager.getDataSourceContainer(datasetId); if (dataSourceContainer == null) throw new DoesNotExistException("Dataset with id " + datasetId + " does NOT exist!"); } catch (DocumentException | IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } if (taskManager.getTask(taskId) == null) throw new DoesNotExistException("Does NOT exist: " + "Task with id " + taskId + " does NOT exist!"); try { if (taskManager.deleteTask(taskId)) return Response.status(200).entity(new Result("Task with id " + taskId + " of dataset with id " + datasetId + " deleted!")).build(); else throw new InternalServerErrorException("Error in server : " + "Could NOT delete task with id " + taskId); } catch (IOException e) { throw new InternalServerErrorException("Error in server : " + e.getMessage()); } } HarvestResource();  HarvestResource(DefaultDataManager dataManager, TaskManager taskManager); @OPTIONS @Path("/" + HarvestOptionListContainer.HARVEST) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Get options over harvest conext.", httpMethod = "OPTIONS", response = HarvestOptionListContainer.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a list of all available options)") }) HarvestOptionListContainer getOptions(); @GET @Path("/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.OPTIONS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Get options over harvest conext.", httpMethod = "GET", response = HarvestOptionListContainer.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a list of all available options)") }) HarvestOptionListContainer getGETOptions(); @POST @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.START) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Initiate a new harvest.", httpMethod = "POST", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 409, message = "AlreadyExistsException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response startHarvest(
            @ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId,
            @ApiParam(value = "full|sample", defaultValue = HarvestOptionListContainer.SAMPLE, allowableValues = HarvestOptionListContainer.SAMPLE + " , " + HarvestOptionListContainer.FULL) @DefaultValue(HarvestOptionListContainer.SAMPLE) @QueryParam("type") String type); @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.CANCEL) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Cancels a harvesting ingest.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response cancelHarvest(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @POST @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULE) @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Schedules an automatic harvesting.", httpMethod = "POST", response = String.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Created (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 406, message = "MissingArgumentsException"), @ApiResponse(code = 409, message = "AlreadyExistsException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response scheduleHarvest(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId, @ApiParam(value = "Task", required = true) Task task,
            @ApiParam(value = "true|false") @DefaultValue("false") @QueryParam("incremental") boolean incremental); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Retrieves the list of schedules.", httpMethod = "GET", response = ScheduledTask.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetScheduledTasks(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @DELETE @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.SCHEDULES + "/" + HarvestOptionListContainer.TASKID) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Deletes an automatic harvesting.", httpMethod = "DELETE", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing a String message)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response deleteScheduledTask(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId,
            @ApiParam(value = "Id of task", required = true) @PathParam("taskId") String taskId); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.STATUS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets the status of a specific dataset harvesting.", httpMethod = "GET", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetHarvestingStatus(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @GET @Path("/" + DatasetOptionListContainer.DATASETID + "/" + HarvestOptionListContainer.HARVEST + "/" + HarvestOptionListContainer.LOG) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets the logs of the last ingest.", httpMethod = "GET", response = String.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), @ApiResponse(code = 404, message = "DoesNotExistException"), @ApiResponse(code = 500, message = "InternalServerErrorException") }) Response getDatasetLastIngestLog(@ApiParam(value = "Id of dataset", required = true) @PathParam("datasetId") String datasetId); @GET @Path("/" + HarvestOptionListContainer.HARVESTS) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @ApiOperation(value = "Gets a list of currently executing dataset harvests", httpMethod = "GET", response = Task.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 200, message = "OK (Response containing an Dataset)"), // @ApiResponse(code = 404, message = "DoesNotExistException") }) Response getCurrentHarvestsList(); public DefaultDataManager dataManager; public TaskManager taskManager; }