From 8c617e549c58f7a22792a49b78e1d08d5ce5a52b Mon Sep 17 00:00:00 2001 From: GordeaS Date: Tue, 30 Jul 2024 13:18:00 +0200 Subject: [PATCH] delete only records which have deleted zoho record as proxy id #EA-3896 --- .../entitymanagement/web/service/BaseZohoAccess.java | 7 +++++++ .../entitymanagement/web/service/ZohoSyncService.java | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/BaseZohoAccess.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/BaseZohoAccess.java index e1d164db..dee8513b 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/BaseZohoAccess.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/BaseZohoAccess.java @@ -131,6 +131,13 @@ protected void performOperations(BatchOperations operations, ZohoSyncReport zoho } + /** + * run permanent delete operations, use {@link ZohoSyncService#synchronizeDeletedZohoOrganizations(OffsetDateTime, ZohoSyncReport)} + * @deprecated the modified in zoho do not results in permanent delete operations + * @param permanentDeleteOperations operation to perform + * @param zohoSyncReport report to collect results + */ + @Deprecated void performPermanentDeleteOperations(SortedSet permanentDeleteOperations, ZohoSyncReport zohoSyncReport) { if (permanentDeleteOperations == null || permanentDeleteOperations.isEmpty()) { return; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java index b028e585..39428f9e 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java @@ -168,9 +168,8 @@ void synchronizeDeletedZohoOrganizations(OffsetDateTime modifiedSince, boolean hasNext = true; int currentPageSize = 0; List entitiesZohoCoref = null; - // Zoho doesn't return the total results - List deletedEntityRecords; List entityIdsToDelete; + // Zoho doesn't return the total results while (hasNext) { try { // list of (europeana) organizations ids