RED-8702: Explore document databases to store entityLog
* added observed
This commit is contained in:
parent
0897554ecc
commit
314055c573
@ -25,6 +25,7 @@ import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
||||
import com.iqser.red.storage.commons.service.StorageService;
|
||||
import com.knecon.fforesight.tenantcommons.TenantContext;
|
||||
|
||||
import io.micrometer.observation.annotation.Observed;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -100,6 +101,7 @@ public class FileManagementStorageService {
|
||||
}
|
||||
|
||||
|
||||
@Observed(name = "FileManagementStorageService", contextualName = "get-entity-log")
|
||||
public EntityLog getEntityLog(String dossierId, String fileId) {
|
||||
|
||||
return entityLogMongoService.findEntityLogByDossierIdAndFileId(dossierId, fileId)
|
||||
@ -108,11 +110,13 @@ public class FileManagementStorageService {
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Observed(name = "FileManagementStorageService", contextualName = "save-entity-log")
|
||||
public void saveEntityLog(String dossierId, String fileId, EntityLog entityLog) {
|
||||
|
||||
entityLogMongoService.saveEntityLog(dossierId, fileId, entityLog);
|
||||
}
|
||||
|
||||
@Observed(name = "FileManagementStorageService", contextualName = "entity-log-exists")
|
||||
public boolean entityLogExists(String dossierId, String fileId) {
|
||||
|
||||
return entityLogMongoService.entityLogDocumentExists(dossierId, fileId);
|
||||
@ -170,6 +174,7 @@ public class FileManagementStorageService {
|
||||
storageService.deleteObject(TenantContext.getTenantId(), StorageIdUtils.getStorageId(dossierId, fileId, fileType));
|
||||
}
|
||||
|
||||
@Observed(name = "FileManagementStorageService", contextualName = "delete-entity-log")
|
||||
public void deleteEntityLog(String dossierId, String fileId) {
|
||||
|
||||
entityLogMongoService.deleteEntityLog(dossierId, fileId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user