diff options
author | ayalaben <ayala.benzvi@amdocs.com> | 2018-05-27 13:54:38 +0300 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-05-29 06:31:15 +0000 |
commit | 34771f3e531e26d179e5ba77b987befe4035b38e (patch) | |
tree | c66f86f80c5c044363f151b46d2bcac66e268dad /openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java | |
parent | b145c0825c0bd163a0a2643aeee4c8b283e35ada (diff) |
Catalog notification port
Change-Id: I714ac047c98551ddf29ca509811265bfd7c66f24
Issue-ID: SDC-1257
Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (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')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java | 9 |
1 files changed, 7 insertions, 2 deletions
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<ItemAction, ActionSideAffects> 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(); } |