DM-357: remove outdated status and messageTypes
* remove surrounding-text functionality
This commit is contained in:
parent
49cd622e45
commit
f2f4564590
@ -39,12 +39,7 @@ public class FileStatusProcessingUpdateService {
|
||||
var dossier = dossierPersistenceService.getAndValidateDossier(dossierId);
|
||||
|
||||
switch (analyzeResult.getMessageType()) {
|
||||
|
||||
case SURROUNDING_TEXT:
|
||||
fileStatusService.setStatusProcessed(analyzeResult.getFileId());
|
||||
manualRedactionService.updateSurroundingText(fileId, analyzeResult.getManualRedactions());
|
||||
break;
|
||||
|
||||
|
||||
case ANALYSE:
|
||||
case REANALYSE:
|
||||
default:
|
||||
|
||||
@ -750,15 +750,6 @@ public class ManualRedactionService {
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void updateSurroundingText(String fileId, ManualRedactions manualRedactions) {
|
||||
|
||||
// These are marked as processed once surrounding text is computed ( TBD if this is correct ? )
|
||||
manualRedactions.getEntriesToAdd()
|
||||
.forEach(e -> addRedactionPersistenceService.updateSurroundingText(new AnnotationEntityId(e.getAnnotationId(), fileId), e.getTextBefore(), e.getTextAfter()));
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void updateProcessedDate(String fileId, ManualRedactions manualRedactions) {
|
||||
|
||||
|
||||
@ -62,12 +62,6 @@ public class AddRedactionPersistenceService {
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void updateSurroundingText(AnnotationEntityId id, String textBefore, String textAfter) {
|
||||
|
||||
manualRedactionRepository.updateSurroundingText(id, textBefore, textAfter);
|
||||
}
|
||||
|
||||
|
||||
public ManualRedactionEntryEntity findAddRedaction(String fileId, String annotationId) {
|
||||
|
||||
|
||||
@ -38,11 +38,6 @@ public interface ManualRedactionRepository extends JpaRepository<ManualRedaction
|
||||
List<ManualRedactionEntryEntity> findByFileIdIncludeDeletions(String fileId, boolean includeDeletions);
|
||||
|
||||
|
||||
@Modifying
|
||||
@Query("update ManualRedactionEntryEntity m set m.textBefore = :textBefore, m.textAfter = :textAfter where m.id = :id")
|
||||
void updateSurroundingText(AnnotationEntityId id, String textBefore, String textAfter);
|
||||
|
||||
|
||||
@Modifying
|
||||
@Query("update ManualRedactionEntryEntity m set m.status = :newStatus, m.processedDate = :processedDate where m.id.fileId in :fileIds and m.value = :filterValue and m.addToDictionary = true and m.status = :filterStatus ")
|
||||
void updateStatus(Set<String> fileIds, String filterValue, AnnotationStatus filterStatus, AnnotationStatus newStatus, OffsetDateTime processedDate);
|
||||
|
||||
@ -3,8 +3,5 @@ package com.iqser.red.service.persistence.service.v1.api.shared.model;
|
||||
public enum MessageType {
|
||||
|
||||
ANALYSE,
|
||||
REANALYSE,
|
||||
STRUCTURE_ANALYSE,
|
||||
SURROUNDING_TEXT
|
||||
|
||||
REANALYSE
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ public enum ProcessingStatus {
|
||||
PROCESSED,
|
||||
PROCESSING,
|
||||
REPROCESS,
|
||||
SURROUNDING_TEXT_PROCESSING,
|
||||
UNPROCESSED,
|
||||
FULL_PROCESSING,
|
||||
PRE_PROCESSING_QUEUED,
|
||||
@ -20,5 +19,4 @@ public enum ProcessingStatus {
|
||||
PRE_PROCESSED,
|
||||
FIGURE_DETECTION_ANALYZING,
|
||||
TABLE_PARSING_ANALYZING
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user