RED-3886: Do migration stuff also for softdeleted files
This commit is contained in:
parent
e8297200f2
commit
4c1fd58d5f
@ -55,7 +55,7 @@ public class DictionaryToEntityMigration2 extends Migration {
|
|||||||
log.info("Start migration of dossier {}", dossier.getId());
|
log.info("Start migration of dossier {}", dossier.getId());
|
||||||
files.forEach(file -> {
|
files.forEach(file -> {
|
||||||
log.info("Start migration of file {}", file.getId());
|
log.info("Start migration of file {}", file.getId());
|
||||||
if (file.getDeleted() == null) {
|
if (file.getHardDeletedTime() == null) {
|
||||||
var newRedactionLogEntries = new ArrayList<RedactionLogEntry>();
|
var newRedactionLogEntries = new ArrayList<RedactionLogEntry>();
|
||||||
var redactionLog = fileManagementStorageService.getRedactionLog(dossier.getId(), file.getId());
|
var redactionLog = fileManagementStorageService.getRedactionLog(dossier.getId(), file.getId());
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public class MigrateHighlights3 extends Migration {
|
|||||||
dossiers.forEach(dossier -> {
|
dossiers.forEach(dossier -> {
|
||||||
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
|
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
|
||||||
files.forEach(file -> {
|
files.forEach(file -> {
|
||||||
if (file.getDeleted() == null) {
|
if (file.getHardDeletedTime() == null) {
|
||||||
|
|
||||||
var fileBytes = fileManagementStorageService.getStoredObjectBytes(dossier.getId(), file.getId(), FileType.ORIGIN);
|
var fileBytes = fileManagementStorageService.getStoredObjectBytes(dossier.getId(), file.getId(), FileType.ORIGIN);
|
||||||
var hasHighlights = pdfTronRedactionClient.extractHighlights(new DocumentRequest(dossier.getId(), file.getId(), fileBytes));
|
var hasHighlights = pdfTronRedactionClient.extractHighlights(new DocumentRequest(dossier.getId(), file.getId(), fileBytes));
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class RemoveFalsePositiveManualRedactions6 extends Migration {
|
|||||||
dossiers.forEach(dossier -> {
|
dossiers.forEach(dossier -> {
|
||||||
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
|
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
|
||||||
files.forEach(file -> {
|
files.forEach(file -> {
|
||||||
if (file.getDeleted() == null) {
|
if (file.getHardDeletedTime() == null) {
|
||||||
var annotationIdsToRemove = new ArrayList<String>();
|
var annotationIdsToRemove = new ArrayList<String>();
|
||||||
var manualRedactions = manualRedactionController.getManualRedactions(dossier.getId(), file.getId());
|
var manualRedactions = manualRedactionController.getManualRedactions(dossier.getId(), file.getId());
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user