RED-7384: create shared models in persistence service
This commit is contained in:
parent
d91bbc6d0e
commit
a279a76659
@ -18,6 +18,7 @@ import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog
|
|||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileType;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileType;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.RedactionLog;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.RedactionLog;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.imported.ImportedRedactions;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.imported.ImportedRedactions;
|
||||||
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.section.SectionGrid;
|
||||||
import com.iqser.red.storage.commons.exception.StorageException;
|
import com.iqser.red.storage.commons.exception.StorageException;
|
||||||
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
||||||
import com.iqser.red.storage.commons.service.StorageService;
|
import com.iqser.red.storage.commons.service.StorageService;
|
||||||
@ -115,6 +116,19 @@ public class FileManagementStorageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public SectionGrid getSectionGrid(String dossierId, String fileId) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
return storageService.readJSONObject(TenantContext.getTenantId(), StorageIdUtils.getStorageId(dossierId, fileId, FileType.SECTION_GRID), SectionGrid.class);
|
||||||
|
} catch (StorageObjectDoesNotExist e) {
|
||||||
|
log.debug("SectionGrid not available.");
|
||||||
|
throw new NotFoundException("SectionGrid does not exist");
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Could not convert SectionGrid", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public ImportedRedactions getImportedRedactions(String dossierId, String fileId) {
|
public ImportedRedactions getImportedRedactions(String dossierId, String fileId) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user