@Test @RunWithCustomExecutor public void cleanupReport() throws Exception { instance.cleanupReport(PROC_ID); verify(batchReportClient).cleanupReport(PROC_ID, ReportType.PURGE_OBJECTGROUP); verify(batchReportClient).cleanupReport(PROC_ID, ReportType.PURGE_UNIT); }
public void cleanupReport(String processId) throws ProcessingStatusException { try (BatchReportClient batchReportClient = batchReportClientFactory.getClient()) { batchReportClient.cleanupReport(processId, ReportType.PURGE_UNIT); batchReportClient.cleanupReport(processId, ReportType.PURGE_OBJECTGROUP); } catch (VitamClientInternalException e) { throw new ProcessingStatusException(StatusCode.FATAL, "Could not cleanup purge reports (" + processId + ")", e); } }
PurgeReportService { public void cleanupReport(String processId) throws ProcessingStatusException { try (BatchReportClient batchReportClient = batchReportClientFactory.getClient()) { batchReportClient.cleanupReport(processId, ReportType.PURGE_UNIT); batchReportClient.cleanupReport(processId, ReportType.PURGE_OBJECTGROUP); } catch (VitamClientInternalException e) { throw new ProcessingStatusException(StatusCode.FATAL, "Could not cleanup purge reports (" + processId + ")", e); } } }
PurgeReportService { public void cleanupReport(String processId) throws ProcessingStatusException { try (BatchReportClient batchReportClient = batchReportClientFactory.getClient()) { batchReportClient.cleanupReport(processId, ReportType.PURGE_UNIT); batchReportClient.cleanupReport(processId, ReportType.PURGE_OBJECTGROUP); } catch (VitamClientInternalException e) { throw new ProcessingStatusException(StatusCode.FATAL, "Could not cleanup purge reports (" + processId + ")", e); } } PurgeReportService(); @VisibleForTesting  PurgeReportService(
        BatchReportClientFactory batchReportClientFactory,
        WorkspaceClientFactory workspaceClientFactory); }
PurgeReportService { public void cleanupReport(String processId) throws ProcessingStatusException { try (BatchReportClient batchReportClient = batchReportClientFactory.getClient()) { batchReportClient.cleanupReport(processId, ReportType.PURGE_UNIT); batchReportClient.cleanupReport(processId, ReportType.PURGE_OBJECTGROUP); } catch (VitamClientInternalException e) { throw new ProcessingStatusException(StatusCode.FATAL, "Could not cleanup purge reports (" + processId + ")", e); } } PurgeReportService(); @VisibleForTesting  PurgeReportService(
        BatchReportClientFactory batchReportClientFactory,
        WorkspaceClientFactory workspaceClientFactory); void appendUnitEntries(String processId, List<PurgeUnitReportEntry> entries); void appendObjectGroupEntries(String processId, List<PurgeObjectGroupReportEntry> entries); CloseableIterator<String> exportDistinctObjectGroups(String processId); void exportAccessionRegisters(String processId); void cleanupReport(String processId); }
PurgeReportService { public void cleanupReport(String processId) throws ProcessingStatusException { try (BatchReportClient batchReportClient = batchReportClientFactory.getClient()) { batchReportClient.cleanupReport(processId, ReportType.PURGE_UNIT); batchReportClient.cleanupReport(processId, ReportType.PURGE_OBJECTGROUP); } catch (VitamClientInternalException e) { throw new ProcessingStatusException(StatusCode.FATAL, "Could not cleanup purge reports (" + processId + ")", e); } } PurgeReportService(); @VisibleForTesting  PurgeReportService(
        BatchReportClientFactory batchReportClientFactory,
        WorkspaceClientFactory workspaceClientFactory); void appendUnitEntries(String processId, List<PurgeUnitReportEntry> entries); void appendObjectGroupEntries(String processId, List<PurgeObjectGroupReportEntry> entries); CloseableIterator<String> exportDistinctObjectGroups(String processId); void exportAccessionRegisters(String processId); void cleanupReport(String processId);  }