Commit 7f848b3242fff91b26f3ec8d0129237cd41ddfe5

Authored by Bohdan Smetaniuk
1 parent 23e0fc7f

fixes in controller

@@ -72,7 +72,7 @@ public class WidgetTypeController extends BaseController { @@ -72,7 +72,7 @@ public class WidgetTypeController extends BaseController {
72 checkEntity(widgetType.getId(), widgetType, Resource.WIDGET_TYPE); 72 checkEntity(widgetType.getId(), widgetType, Resource.WIDGET_TYPE);
73 WidgetType savedWidgetType = widgetTypeService.saveWidgetType(widgetType); 73 WidgetType savedWidgetType = widgetTypeService.saveWidgetType(widgetType);
74 74
75 - sendNotificationMsgToEdgeService(savedWidgetType.getTenantId(), savedWidgetType.getId(), savedWidgetType.getId() == null ? ActionType.ADDED : ActionType.UPDATED); 75 + sendNotificationMsgToEdgeService(getTenantId(), savedWidgetType.getId(), widgetType.getId() == null ? ActionType.ADDED : ActionType.UPDATED);
76 76
77 return checkNotNull(savedWidgetType); 77 return checkNotNull(savedWidgetType);
78 } catch (Exception e) { 78 } catch (Exception e) {
@@ -71,7 +71,7 @@ public class WidgetsBundleController extends BaseController { @@ -71,7 +71,7 @@ public class WidgetsBundleController extends BaseController {
71 checkEntity(widgetsBundle.getId(), widgetsBundle, Resource.WIDGETS_BUNDLE); 71 checkEntity(widgetsBundle.getId(), widgetsBundle, Resource.WIDGETS_BUNDLE);
72 WidgetsBundle savedWidgetsBundle = widgetsBundleService.saveWidgetsBundle(widgetsBundle); 72 WidgetsBundle savedWidgetsBundle = widgetsBundleService.saveWidgetsBundle(widgetsBundle);
73 73
74 - sendNotificationMsgToEdgeService(savedWidgetsBundle.getTenantId(), savedWidgetsBundle.getId(), savedWidgetsBundle.getId() == null ? ActionType.ADDED : ActionType.UPDATED); 74 + sendNotificationMsgToEdgeService(getTenantId(), savedWidgetsBundle.getId(), widgetsBundle.getId() == null ? ActionType.ADDED : ActionType.UPDATED);
75 75
76 return checkNotNull(savedWidgetsBundle); 76 return checkNotNull(savedWidgetsBundle);
77 } catch (Exception e) { 77 } catch (Exception e) {
@@ -184,7 +184,7 @@ public class DefaultEdgeNotificationService implements EdgeNotificationService { @@ -184,7 +184,7 @@ public class DefaultEdgeNotificationService implements EdgeNotificationService {
184 EntityId entityId = EntityIdFactory.getByEdgeEventTypeAndUuid(edgeEventType, new UUID(edgeNotificationMsg.getEntityIdMSB(), edgeNotificationMsg.getEntityIdLSB())); 184 EntityId entityId = EntityIdFactory.getByEdgeEventTypeAndUuid(edgeEventType, new UUID(edgeNotificationMsg.getEntityIdMSB(), edgeNotificationMsg.getEntityIdLSB()));
185 switch (edgeEventActionType) { 185 switch (edgeEventActionType) {
186 // TODO: voba - ADDED is not required for CE version ? 186 // TODO: voba - ADDED is not required for CE version ?
187 - // case ADDED: 187 + case ADDED:
188 case UPDATED: 188 case UPDATED:
189 case CREDENTIALS_UPDATED: 189 case CREDENTIALS_UPDATED:
190 if (edgeEventType.equals(EdgeEventType.WIDGETS_BUNDLE) || edgeEventType.equals(EdgeEventType.WIDGET_TYPE)) { 190 if (edgeEventType.equals(EdgeEventType.WIDGETS_BUNDLE) || edgeEventType.equals(EdgeEventType.WIDGET_TYPE)) {