From 34771f3e531e26d179e5ba77b987befe4035b38e Mon Sep 17 00:00:00 2001 From: ayalaben Date: Sun, 27 May 2018 13:54:38 +0300 Subject: Catalog notification port Change-Id: I714ac047c98551ddf29ca509811265bfd7c66f24 Issue-ID: SDC-1257 Signed-off-by: ayalaben --- .../org/openecomp/sdcrests/item/rest/services/ItemsImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java index 359662ad33..afdac0ad61 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java @@ -86,7 +86,7 @@ public class ItemsImpl implements Items { private NotificationPropagationManager notifier = NotificationPropagationManagerFactory.getInstance().createInterface(); - private CatalogNotifier catalogNotifier = new CatalogNotifier(); + private Map actionSideAffectsMap = new EnumMap<>(ItemAction.class); @@ -120,7 +120,12 @@ public class ItemsImpl implements Items { } actionSideAffectsMap.get(request.getAction()).execute(item, user); - catalogNotifier.execute(Collections.singleton(itemId),request.getAction(),2); + try { + CatalogNotifier catalogNotifier = new CatalogNotifier(); + catalogNotifier.execute(Collections.singleton(itemId), request.getAction(), 2); + } catch (Exception e){ + LOGGER.error("Failed to send catalog notification on item " + itemId + " Error: " + e.getMessage()); + } return Response.ok().build(); } -- cgit 1.2.3-korg