aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/ItemsImpl.java
diff options
context:
space:
mode:
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.java10
1 files changed, 6 insertions, 4 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 b00e4594b3..a93c063220 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
@@ -40,6 +40,8 @@ import org.openecomp.sdc.versioning.types.ItemStatus;
import org.openecomp.sdc.versioning.types.NotificationEventTypes;
import org.openecomp.sdcrests.item.rest.Items;
import org.openecomp.sdcrests.item.rest.mapping.MapItemToDto;
+import org.openecomp.sdcrests.item.rest.services.catalog.notification.Notifier;
+import org.openecomp.sdcrests.item.rest.services.catalog.notification.NotifierFactory;
import org.openecomp.sdcrests.item.types.ItemAction;
import org.openecomp.sdcrests.item.types.ItemActionRequestDto;
import org.openecomp.sdcrests.item.types.ItemDto;
@@ -113,9 +115,9 @@ public class ItemsImpl implements Items {
actionSideAffectsMap.get(request.getAction()).execute(item, user);
try {
- CatalogNotifier catalogNotifier = new CatalogNotifier();
- catalogNotifier.execute(Collections.singleton(itemId), request.getAction(), 2);
- } catch (Exception e){
+ Notifier notifier = NotifierFactory.getInstance();
+ notifier.execute(Collections.singleton(itemId), request.getAction());
+ } catch (Exception e) {
LOGGER.error("Failed to send catalog notification on item " + itemId + " Error: " + e.getMessage());
}
@@ -323,6 +325,6 @@ public class ItemsImpl implements Items {
//Do not delete - is in use, duplicates code to prevent dependency on openecomp-sdc-vendor-software-product-api
private enum OnboardingMethod {
- NetworkPackage, Manual;
+ NetworkPackage, Manual
}
} \ No newline at end of file