Merge branch 'DM-285' into 'master'
DM-285: downgrade storage-service Closes DM-285 See merge request redactmanager/redaction-service!128
This commit is contained in:
commit
ba212a525b
@ -16,7 +16,7 @@ val layoutParserVersion = "0.70.0"
|
||||
val jacksonVersion = "2.15.2"
|
||||
val droolsVersion = "8.43.0.Final"
|
||||
val pdfBoxVersion = "3.0.0"
|
||||
val persistenceServiceVersion = "2.168.0"
|
||||
val persistenceServiceVersion = "2.173.0"
|
||||
|
||||
configurations {
|
||||
all {
|
||||
@ -34,8 +34,8 @@ dependencies {
|
||||
implementation("com.iqser.red.commons:metric-commons:2.3.0")
|
||||
|
||||
implementation("com.iqser.red.commons:dictionary-merge-commons:1.5.0")
|
||||
implementation("com.iqser.red.commons:storage-commons:2.43.0")
|
||||
implementation("com.knecon.fforesight:tenant-commons:0.13.0")
|
||||
implementation("com.iqser.red.commons:storage-commons:2.40.0")
|
||||
implementation("com.knecon.fforesight:tenant-commons:0.10.0")
|
||||
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}")
|
||||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}")
|
||||
|
||||
@ -311,6 +311,7 @@ public class AnalyzeService {
|
||||
.analysisVersion(redactionServiceSettings.getAnalysisVersion())
|
||||
.analysisNumber(analyzeRequest.getAnalysisNumber())
|
||||
.rulesVersion(entityLog.getRulesVersion()).componentRulesVersion(kieWrapperComponentRules.rulesVersion())
|
||||
.componentRulesVersion(kieWrapperComponentRules.rulesVersion())
|
||||
.dictionaryVersion(entityLog.getDictionaryVersion())
|
||||
.legalBasisVersion(entityLog.getLegalBasisVersion())
|
||||
.dossierDictionaryVersion(entityLog.getDossierDictionaryVersion())
|
||||
|
||||
@ -33,8 +33,8 @@ public class ComponentLogCreatorService {
|
||||
|
||||
return ComponentLogEntry.builder()
|
||||
.value(component.getValue())
|
||||
.transformation(component.getTransformation()).originalValue(component.getReferences().stream().sorted(EntityComparators.start()).map(Entity::getValue).toList())
|
||||
.componentEntityReferences(toComponentEntityReferences(component.getReferences()))
|
||||
.transformation(component.getTransformation())
|
||||
.componentEntityReferences(toComponentEntityReferences(component.getReferences().stream().sorted(EntityComparators.start()).toList()))
|
||||
.build();
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class ComponentLogCreatorService {
|
||||
private ComponentEntityReference toComponentEntityReference(Entity entity) {
|
||||
|
||||
return ComponentEntityReference.builder()
|
||||
.id(entity.getId())
|
||||
.id(entity.getId()).value(entity.getValue())
|
||||
.page(entity.getPositions().stream().findFirst().map(Position::getPageNumber).orElse(0))
|
||||
.reason(entity.getReason())
|
||||
.ruleIdentifier(entity.getMatchedRule())
|
||||
|
||||
@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.ManualChange;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.Comment;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.Engine;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.ManualRedactionType;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.Point;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.Rectangle;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.RedactionLogComment;
|
||||
@ -222,6 +223,21 @@ public class RedactionLogCreatorService {
|
||||
|
||||
ManualChange manualChange1 = new ManualChange();
|
||||
BeanUtils.copyProperties(manualChange, manualChange1);
|
||||
manualChange1.setManualRedactionType(switch (manualChange.getManualRedactionType()) {
|
||||
case ADD_LOCALLY -> ManualRedactionType.ADD_LOCALLY;
|
||||
case ADD_TO_DICTIONARY -> ManualRedactionType.ADD_TO_DICTIONARY;
|
||||
case REMOVE_LOCALLY -> ManualRedactionType.REMOVE_LOCALLY;
|
||||
case REMOVE_FROM_DICTIONARY -> ManualRedactionType.REMOVE_FROM_DICTIONARY;
|
||||
case FORCE_REDACT -> ManualRedactionType.FORCE_REDACT;
|
||||
case FORCE_HINT -> ManualRedactionType.FORCE_HINT;
|
||||
case RECATEGORIZE -> ManualRedactionType.RECATEGORIZE;
|
||||
case LEGAL_BASIS_CHANGE -> ManualRedactionType.LEGAL_BASIS_CHANGE;
|
||||
case RESIZE -> ManualRedactionType.RESIZE;
|
||||
});
|
||||
manualChange1.setProcessedDate(manualChange.getProcessedDate());
|
||||
manualChange1.setRequestedDate(manualChange.getRequestedDate());
|
||||
manualChange1.setAnnotationStatus(manualChange.getAnnotationStatus());
|
||||
manualChange1.setPropertyChanges(manualChange.getPropertyChanges());
|
||||
return manualChange1;
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
package com.iqser.red.service.redaction.v1.server;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.iqser.red.commons.jackson.ObjectMapperFactory;
|
||||
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
||||
import com.iqser.red.storage.commons.service.StorageService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.core.io.InputStreamResource;
|
||||
import static java.io.File.createTempFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -18,7 +12,15 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.io.File.createTempFile;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.core.io.InputStreamResource;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.iqser.red.commons.jackson.ObjectMapperFactory;
|
||||
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
||||
import com.iqser.red.storage.commons.service.StorageService;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
public class FileSystemBackedStorageService implements StorageService {
|
||||
|
||||
@ -42,7 +44,6 @@ public class FileSystemBackedStorageService implements StorageService {
|
||||
IOUtils.copy(new FileInputStream(res), new FileOutputStream(destinationFile));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public InputStreamResource getObject(String tenantId, String objectId) {
|
||||
return new InputStreamResource(new FileInputStream(dataMap.get(objectId)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user