diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/alarm/AlarmMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/alarm/AlarmMsgConstructorFactory.java index 41a13e4447..4a49f6cf6b 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/alarm/AlarmMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/alarm/AlarmMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class AlarmMsgConstructorFactory { @Autowired protected AlarmMsgConstructorV2 alarmMsgConstructorV2; - public AlarmMsgConstructor getAlarmMsgConstructor(EdgeVersion edgeVersion) { + public AlarmMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/customer/CustomerMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/customer/CustomerMsgConstructorFactory.java index 350a4b6f9d..ba8e643445 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/customer/CustomerMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/customer/CustomerMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class CustomerMsgConstructorFactory { @Autowired protected CustomerMsgConstructorV2 customerMsgConstructorV2; - public CustomerMsgConstructor getCustomerMsgConstructor(EdgeVersion edgeVersion) { + public CustomerMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructor.java index 514aeceb68..3bd40a1fbb 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructor.java @@ -17,9 +17,12 @@ package org.thingsboard.server.service.edge.rpc.constructor.device; import com.fasterxml.jackson.databind.JsonNode; import org.thingsboard.server.common.data.Device; +import org.thingsboard.server.common.data.DeviceProfile; import org.thingsboard.server.common.data.id.DeviceId; +import org.thingsboard.server.common.data.id.DeviceProfileId; import org.thingsboard.server.common.data.security.DeviceCredentials; import org.thingsboard.server.gen.edge.v1.DeviceCredentialsUpdateMsg; +import org.thingsboard.server.gen.edge.v1.DeviceProfileUpdateMsg; import org.thingsboard.server.gen.edge.v1.DeviceRpcCallMsg; import org.thingsboard.server.gen.edge.v1.DeviceUpdateMsg; import org.thingsboard.server.gen.edge.v1.UpdateMsgType; @@ -34,5 +37,9 @@ public interface DeviceMsgConstructor { DeviceCredentialsUpdateMsg constructDeviceCredentialsUpdatedMsg(DeviceCredentials deviceCredentials); + DeviceProfileUpdateMsg constructDeviceProfileUpdatedMsg(UpdateMsgType msgType, DeviceProfile deviceProfile); + + DeviceProfileUpdateMsg constructDeviceProfileDeleteMsg(DeviceProfileId deviceProfileId); + DeviceRpcCallMsg constructDeviceRpcCallMsg(UUID deviceId, JsonNode body); } diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructorFactory.java index 2f14c401ea..44e072cb11 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/device/DeviceMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class DeviceMsgConstructorFactory { @Autowired protected DeviceMsgConstructorV2 deviceMsgConstructorV2; - public DeviceMsgConstructor getDeviceMsgConstructor(EdgeVersion edgeVersion) { + public DeviceMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/entityview/EntityViewMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/entityview/EntityViewMsgConstructorFactory.java index b2c7f3b0c3..57b19d6a14 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/entityview/EntityViewMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/entityview/EntityViewMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class EntityViewMsgConstructorFactory { @Autowired protected EntityViewMsgConstructorV2 entityViewMsgConstructorV2; - public EntityViewMsgConstructor getEntityViewMsgConstructor(EdgeVersion edgeVersion) { + public EntityViewMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/ota/OtaPackageMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/ota/OtaPackageMsgConstructorFactory.java index ae7a48028c..7e2b9cea7e 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/ota/OtaPackageMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/ota/OtaPackageMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class OtaPackageMsgConstructorFactory { @Autowired protected OtaPackageMsgConstructorV2 otaPackageMsgConstructorV2; - public OtaPackageMsgConstructor getOtaPackageMsgConstructor(EdgeVersion edgeVersion) { + public OtaPackageMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/queue/QueueMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/queue/QueueMsgConstructorFactory.java index d250c5fd24..e6502aaff7 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/queue/QueueMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/queue/QueueMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class QueueMsgConstructorFactory { @Autowired protected QueueMsgConstructorV2 queueMsgConstructorV2; - public QueueMsgConstructor getQueueMsgConstructor(EdgeVersion edgeVersion) { + public QueueMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/relation/RelationMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/relation/RelationMsgConstructorFactory.java index a17266300d..52015f38e7 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/relation/RelationMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/relation/RelationMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class RelationMsgConstructorFactory { @Autowired protected RelationMsgConstructorV2 relationMsgConstructorV2; - public RelationMsgConstructor getRelationMsgConstructor(EdgeVersion edgeVersion) { + public RelationMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/resource/ResourceMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/resource/ResourceMsgConstructorFactory.java index ef32b623de..15b571a098 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/resource/ResourceMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/resource/ResourceMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class ResourceMsgConstructorFactory { @Autowired protected ResourceMsgConstructorV2 resourceMsgConstructorV2; - public ResourceMsgConstructor getResourceMsgConstructor(EdgeVersion edgeVersion) { + public ResourceMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMetadataConstructor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMetadataConstructor.java index 77815351bc..be10a714f6 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMetadataConstructor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMetadataConstructor.java @@ -37,7 +37,7 @@ import java.util.NavigableSet; @Slf4j @AllArgsConstructor -public abstract class AbstractRuleChainMetadataConstructor implements RuleChainMetadataConstructor { +public abstract class BaseRuleChainMetadataConstructor implements RuleChainMetadataConstructor { @Override public RuleChainMetadataUpdateMsg constructRuleChainMetadataUpdatedMsg(TenantId tenantId, diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMsgConstructor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMsgConstructor.java index da237de924..cf5967fac1 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMsgConstructor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/BaseRuleChainMsgConstructor.java @@ -23,7 +23,7 @@ import org.thingsboard.server.gen.edge.v1.RuleChainMetadataUpdateMsg; import org.thingsboard.server.gen.edge.v1.RuleChainUpdateMsg; import org.thingsboard.server.gen.edge.v1.UpdateMsgType; -public abstract class AbstractRuleChainMsgConstructor implements RuleChainMsgConstructor { +public abstract class BaseRuleChainMsgConstructor implements RuleChainMsgConstructor { @Override public RuleChainUpdateMsg constructRuleChainDeleteMsg(RuleChainId ruleChainId) { diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV330.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV330.java index cfa6f5edbe..64d362342b 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV330.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV330.java @@ -36,7 +36,7 @@ import java.util.UUID; import java.util.stream.Collectors; @Slf4j -public class RuleChainMetadataConstructorV330 extends AbstractRuleChainMetadataConstructor { +public class RuleChainMetadataConstructorV330 extends BaseRuleChainMetadataConstructor { private static final String RULE_CHAIN_INPUT_NODE = TbRuleChainInputNode.class.getName(); private static final String TB_RULE_CHAIN_OUTPUT_NODE = TbRuleChainOutputNode.class.getName(); diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV340.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV340.java index 48c36c2b4d..2133024931 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV340.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV340.java @@ -23,7 +23,7 @@ import org.thingsboard.server.gen.edge.v1.RuleChainMetadataUpdateMsg; import java.util.TreeSet; @Slf4j -public class RuleChainMetadataConstructorV340 extends AbstractRuleChainMetadataConstructor { +public class RuleChainMetadataConstructorV340 extends BaseRuleChainMetadataConstructor { @Override protected void constructRuleChainMetadataUpdatedMsg(TenantId tenantId, diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV362.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV362.java index e1b1ea4d13..7a8a6d02cb 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV362.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMetadataConstructorV362.java @@ -20,7 +20,7 @@ import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.rule.RuleChainMetaData; import org.thingsboard.server.gen.edge.v1.RuleChainMetadataUpdateMsg; -public class RuleChainMetadataConstructorV362 extends AbstractRuleChainMetadataConstructor { +public class RuleChainMetadataConstructorV362 extends BaseRuleChainMetadataConstructor { @Override protected void constructRuleChainMetadataUpdatedMsg(TenantId tenantId, RuleChainMetadataUpdateMsg.Builder builder, RuleChainMetaData ruleChainMetaData) { diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorFactory.java index b989612431..0c169db0f4 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class RuleChainMsgConstructorFactory { @Autowired protected RuleChainMsgConstructorV2 ruleChainMsgConstructorV2; - public RuleChainMsgConstructor getRuleChainMsgConstructor(EdgeVersion edgeVersion) { + public RuleChainMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV1.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV1.java index 8404b5d67d..6c918cfc56 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV1.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV1.java @@ -24,7 +24,7 @@ import org.thingsboard.server.queue.util.TbCoreComponent; @Component @TbCoreComponent -public class RuleChainMsgConstructorV1 extends AbstractRuleChainMsgConstructor { +public class RuleChainMsgConstructorV1 extends BaseRuleChainMsgConstructor { @Override public RuleChainUpdateMsg constructRuleChainUpdatedMsg(UpdateMsgType msgType, RuleChain ruleChain, boolean isRoot) { diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV2.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV2.java index 492ea6c40d..f5c1c12b39 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV2.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/rule/RuleChainMsgConstructorV2.java @@ -24,7 +24,7 @@ import org.thingsboard.server.queue.util.TbCoreComponent; @Component @TbCoreComponent -public class RuleChainMsgConstructorV2 extends AbstractRuleChainMsgConstructor { +public class RuleChainMsgConstructorV2 extends BaseRuleChainMsgConstructor { @Override public RuleChainUpdateMsg constructRuleChainUpdatedMsg(UpdateMsgType msgType, RuleChain ruleChain, boolean isRoot) { diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/settings/AdminSettingsMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/settings/AdminSettingsMsgConstructorFactory.java index 060c7fa3a5..1dd9be719d 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/settings/AdminSettingsMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/settings/AdminSettingsMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class AdminSettingsMsgConstructorFactory { @Autowired protected AdminSettingsMsgConstructorV2 adminSettingsMsgConstructorV2; - public AdminSettingsMsgConstructor getAdminSettingsMsgConstructor(EdgeVersion edgeVersion) { + public AdminSettingsMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorFactory.java index 753eb0dc05..a6ce714b1a 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class TenantMsgConstructorFactory { @Autowired protected TenantMsgConstructorV2 tenantMsgConstructorV2; - public TenantMsgConstructor getTenantMsgConstructor(EdgeVersion edgeVersion) { + public TenantMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/user/UserMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/user/UserMsgConstructorFactory.java index 47554ce398..2e7f49c0fa 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/user/UserMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/user/UserMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class UserMsgConstructorFactory { @Autowired protected UserMsgConstructorV2 userMsgConstructorV2; - public UserMsgConstructor getUserMsgConstructor(EdgeVersion edgeVersion) { + public UserMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/widget/WidgetMsgConstructorFactory.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/widget/WidgetMsgConstructorFactory.java index ce1ae735f3..b98494f36b 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/widget/WidgetMsgConstructorFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/widget/WidgetMsgConstructorFactory.java @@ -30,7 +30,7 @@ public class WidgetMsgConstructorFactory { @Autowired protected WidgetMsgConstructorV2 widgetMsgConstructorV2; - public WidgetMsgConstructor getWidgetMsgConstructor(EdgeVersion edgeVersion) { + public WidgetMsgConstructor getMsgConstructorByEdgeVersion(EdgeVersion edgeVersion) { switch (edgeVersion) { case V_3_3_0: case V_3_3_3: diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/alarm/BaseAlarmProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/alarm/BaseAlarmProcessor.java index edc03469e0..41c05a80c2 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/alarm/BaseAlarmProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/alarm/BaseAlarmProcessor.java @@ -132,13 +132,13 @@ public abstract class BaseAlarmProcessor extends BaseEdgeProcessor { case ALARM_CLEAR: Alarm alarm = alarmService.findAlarmById(tenantId, alarmId); if (alarm != null) { - return alarmMsgConstructorFactory.getAlarmMsgConstructor(edgeVersion).constructAlarmUpdatedMsg(msgType, alarm, findOriginatorEntityName(tenantId, alarm)); + return alarmMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructAlarmUpdatedMsg(msgType, alarm, findOriginatorEntityName(tenantId, alarm)); } break; case DELETED: Alarm deletedAlarm = JacksonUtil.convertValue(body, Alarm.class); if (deletedAlarm != null) { - return alarmMsgConstructorFactory.getAlarmMsgConstructor(edgeVersion).constructAlarmUpdatedMsg(msgType, deletedAlarm, findOriginatorEntityName(tenantId, deletedAlarm)); + return alarmMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructAlarmUpdatedMsg(msgType, deletedAlarm, findOriginatorEntityName(tenantId, deletedAlarm)); } } return null; diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/customer/CustomerEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/customer/CustomerEdgeProcessor.java index 2ece4edbb5..2f6a979653 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/customer/CustomerEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/customer/CustomerEdgeProcessor.java @@ -58,7 +58,7 @@ public class CustomerEdgeProcessor extends BaseEdgeProcessor { if (customer != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); CustomerUpdateMsg customerUpdateMsg = - customerMsgConstructorFactory.getCustomerMsgConstructor(edgeVersion).constructCustomerUpdatedMsg(msgType, customer); + customerMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructCustomerUpdatedMsg(msgType, customer); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addCustomerUpdateMsg(customerUpdateMsg) @@ -67,7 +67,7 @@ public class CustomerEdgeProcessor extends BaseEdgeProcessor { break; case DELETED: CustomerUpdateMsg customerUpdateMsg = - customerMsgConstructorFactory.getCustomerMsgConstructor(edgeVersion).constructCustomerDeleteMsg(customerId); + customerMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructCustomerDeleteMsg(customerId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addCustomerUpdateMsg(customerUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/dashboard/DashboardEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/dashboard/DashboardEdgeProcessor.java index 5c3c921cde..c4679b40b0 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/dashboard/DashboardEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/dashboard/DashboardEdgeProcessor.java @@ -111,7 +111,7 @@ public class DashboardEdgeProcessor extends BaseDashboardProcessor { if (dashboard != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); DashboardUpdateMsg dashboardUpdateMsg = - dashboardMsgConstructorFactory.getDashboardMsgConstructor(edgeVersion).constructDashboardUpdatedMsg(msgType, dashboard); + dashboardMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructDashboardUpdatedMsg(msgType, dashboard); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addDashboardUpdateMsg(dashboardUpdateMsg) @@ -121,7 +121,7 @@ public class DashboardEdgeProcessor extends BaseDashboardProcessor { case DELETED: case UNASSIGNED_FROM_EDGE: DashboardUpdateMsg dashboardUpdateMsg = - dashboardMsgConstructorFactory.getDashboardMsgConstructor(edgeVersion).constructDashboardDeleteMsg(dashboardId); + dashboardMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructDashboardDeleteMsg(dashboardId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addDashboardUpdateMsg(dashboardUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/entityview/EntityViewEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/entityview/EntityViewEdgeProcessor.java index 50eb258b7d..0f1727ab10 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/entityview/EntityViewEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/entityview/EntityViewEdgeProcessor.java @@ -118,7 +118,7 @@ public class EntityViewEdgeProcessor extends BaseEntityViewProcessor { if (entityView != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); EntityViewUpdateMsg entityViewUpdateMsg = - entityViewMsgConstructorFactory.getEntityViewMsgConstructor(edgeVersion).constructEntityViewUpdatedMsg(msgType, entityView); + entityViewMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructEntityViewUpdatedMsg(msgType, entityView); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addEntityViewUpdateMsg(entityViewUpdateMsg) @@ -128,7 +128,7 @@ public class EntityViewEdgeProcessor extends BaseEntityViewProcessor { case DELETED: case UNASSIGNED_FROM_EDGE: EntityViewUpdateMsg entityViewUpdateMsg = - entityViewMsgConstructorFactory.getEntityViewMsgConstructor(edgeVersion).constructEntityViewDeleteMsg(entityViewId); + entityViewMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructEntityViewDeleteMsg(entityViewId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addEntityViewUpdateMsg(entityViewUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ota/OtaPackageEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ota/OtaPackageEdgeProcessor.java index dd94cc8803..1b06f323d0 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ota/OtaPackageEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ota/OtaPackageEdgeProcessor.java @@ -43,7 +43,7 @@ public class OtaPackageEdgeProcessor extends BaseEdgeProcessor { if (otaPackage != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); OtaPackageUpdateMsg otaPackageUpdateMsg = - otaPackageMsgConstructorFactory.getOtaPackageMsgConstructor(edgeVersion).constructOtaPackageUpdatedMsg(msgType, otaPackage); + otaPackageMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructOtaPackageUpdatedMsg(msgType, otaPackage); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addOtaPackageUpdateMsg(otaPackageUpdateMsg) @@ -52,7 +52,7 @@ public class OtaPackageEdgeProcessor extends BaseEdgeProcessor { break; case DELETED: OtaPackageUpdateMsg otaPackageUpdateMsg = - otaPackageMsgConstructorFactory.getOtaPackageMsgConstructor(edgeVersion).constructOtaPackageDeleteMsg(otaPackageId); + otaPackageMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructOtaPackageDeleteMsg(otaPackageId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addOtaPackageUpdateMsg(otaPackageUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java index 3836cf3c65..fa35f35151 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java @@ -43,7 +43,7 @@ public class QueueEdgeProcessor extends BaseEdgeProcessor { if (queue != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); QueueUpdateMsg queueUpdateMsg = - queueMsgConstructorFactory.getQueueMsgConstructor(edgeVersion).constructQueueUpdatedMsg(msgType, queue); + queueMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructQueueUpdatedMsg(msgType, queue); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addQueueUpdateMsg(queueUpdateMsg) @@ -52,7 +52,7 @@ public class QueueEdgeProcessor extends BaseEdgeProcessor { break; case DELETED: QueueUpdateMsg queueDeleteMsg = - queueMsgConstructorFactory.getQueueMsgConstructor(edgeVersion).constructQueueDeleteMsg(queueId); + queueMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructQueueDeleteMsg(queueId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addQueueUpdateMsg(queueDeleteMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/relation/RelationEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/relation/RelationEdgeProcessor.java index 3adf19548f..530ee47982 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/relation/RelationEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/relation/RelationEdgeProcessor.java @@ -59,7 +59,7 @@ public class RelationEdgeProcessor extends BaseRelationProcessor { public DownlinkMsg convertRelationEventToDownlink(EdgeEvent edgeEvent, EdgeVersion edgeVersion) { EntityRelation entityRelation = JacksonUtil.convertValue(edgeEvent.getBody(), EntityRelation.class); UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); - RelationUpdateMsg relationUpdateMsg = relationMsgConstructorFactory.getRelationMsgConstructor(edgeVersion).constructRelationUpdatedMsg(msgType, entityRelation); + RelationUpdateMsg relationUpdateMsg = relationMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructRelationUpdatedMsg(msgType, entityRelation); return DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addRelationUpdateMsg(relationUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/resource/ResourceEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/resource/ResourceEdgeProcessor.java index 89ae103b2b..fb811d2112 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/resource/ResourceEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/resource/ResourceEdgeProcessor.java @@ -81,7 +81,7 @@ public class ResourceEdgeProcessor extends BaseResourceProcessor { if (tbResource != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); ResourceUpdateMsg resourceUpdateMsg = - resourceMsgConstructorFactory.getResourceMsgConstructor(edgeVersion).constructResourceUpdatedMsg(msgType, tbResource); + resourceMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructResourceUpdatedMsg(msgType, tbResource); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addResourceUpdateMsg(resourceUpdateMsg) @@ -90,7 +90,7 @@ public class ResourceEdgeProcessor extends BaseResourceProcessor { break; case DELETED: ResourceUpdateMsg resourceUpdateMsg = - resourceMsgConstructorFactory.getResourceMsgConstructor(edgeVersion).constructResourceDeleteMsg(tbResourceId); + resourceMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructResourceDeleteMsg(tbResourceId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addResourceUpdateMsg(resourceUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/rule/RuleChainEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/rule/RuleChainEdgeProcessor.java index 910e7e0541..b71abd97e0 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/rule/RuleChainEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/rule/RuleChainEdgeProcessor.java @@ -54,7 +54,7 @@ public class RuleChainEdgeProcessor extends BaseEdgeProcessor { } UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); RuleChainUpdateMsg ruleChainUpdateMsg = - ruleChainMsgConstructorFactory.getRuleChainMsgConstructor(edgeVersion).constructRuleChainUpdatedMsg(msgType, ruleChain, isRoot); + ruleChainMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructRuleChainUpdatedMsg(msgType, ruleChain, isRoot); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addRuleChainUpdateMsg(ruleChainUpdateMsg) @@ -65,7 +65,7 @@ public class RuleChainEdgeProcessor extends BaseEdgeProcessor { case UNASSIGNED_FROM_EDGE: downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) - .addRuleChainUpdateMsg(ruleChainMsgConstructorFactory.getRuleChainMsgConstructor(edgeVersion).constructRuleChainDeleteMsg(ruleChainId)) + .addRuleChainUpdateMsg(ruleChainMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructRuleChainDeleteMsg(ruleChainId)) .build(); break; } @@ -80,7 +80,7 @@ public class RuleChainEdgeProcessor extends BaseEdgeProcessor { RuleChainMetaData ruleChainMetaData = ruleChainService.loadRuleChainMetaData(edgeEvent.getTenantId(), ruleChainId); UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); RuleChainMetadataUpdateMsg ruleChainMetadataUpdateMsg = - ruleChainMsgConstructorFactory.getRuleChainMsgConstructor(edgeVersion).constructRuleChainMetadataUpdatedMsg(edgeEvent.getTenantId(), msgType, ruleChainMetaData, edgeVersion); + ruleChainMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructRuleChainMetadataUpdatedMsg(edgeEvent.getTenantId(), msgType, ruleChainMetaData, edgeVersion); if (ruleChainMetadataUpdateMsg != null) { downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/settings/AdminSettingsEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/settings/AdminSettingsEdgeProcessor.java index 0b7f3021f3..fa2517f7df 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/settings/AdminSettingsEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/settings/AdminSettingsEdgeProcessor.java @@ -38,7 +38,7 @@ public class AdminSettingsEdgeProcessor extends BaseEdgeProcessor { return null; } AdminSettingsUpdateMsg adminSettingsUpdateMsg = - adminSettingsMsgConstructorFactory.getAdminSettingsMsgConstructor(edgeVersion).constructAdminSettingsUpdateMsg(adminSettings); + adminSettingsMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructAdminSettingsUpdateMsg(adminSettings); return DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addAdminSettingsUpdateMsg(adminSettingsUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantEdgeProcessor.java index 1ef44a72ad..b421b1768c 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantEdgeProcessor.java @@ -43,9 +43,9 @@ public class TenantEdgeProcessor extends BaseEdgeProcessor { Tenant tenant = tenantService.findTenantById(tenantId); if (tenant != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); - TenantUpdateMsg tenantUpdateMsg = tenantMsgConstructorFactory.getTenantMsgConstructor(edgeVersion).constructTenantUpdateMsg(msgType, tenant); + TenantUpdateMsg tenantUpdateMsg = tenantMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructTenantUpdateMsg(msgType, tenant); TenantProfile tenantProfile = tenantProfileService.findTenantProfileById(tenantId, tenant.getTenantProfileId()); - TenantProfileUpdateMsg tenantProfileUpdateMsg = tenantMsgConstructorFactory.getTenantMsgConstructor(edgeVersion).constructTenantProfileUpdateMsg(msgType, tenantProfile, edgeVersion); + TenantProfileUpdateMsg tenantProfileUpdateMsg = tenantMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructTenantProfileUpdateMsg(msgType, tenantProfile, edgeVersion); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addTenantUpdateMsg(tenantUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java index 4f264f7bb4..84b51b09b5 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java @@ -42,7 +42,7 @@ public class TenantProfileEdgeProcessor extends BaseEdgeProcessor { if (tenantProfile != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); TenantProfileUpdateMsg tenantProfileUpdateMsg = - tenantMsgConstructorFactory.getTenantMsgConstructor(edgeVersion).constructTenantProfileUpdateMsg(msgType, tenantProfile, edgeVersion); + tenantMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructTenantProfileUpdateMsg(msgType, tenantProfile, edgeVersion); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addTenantProfileUpdateMsg(tenantProfileUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/user/UserEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/user/UserEdgeProcessor.java index 3ee3fc109f..68ac558e39 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/user/UserEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/user/UserEdgeProcessor.java @@ -45,21 +45,21 @@ public class UserEdgeProcessor extends BaseEdgeProcessor { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) - .addUserUpdateMsg(userMsgConstructorFactory.getUserMsgConstructor(edgeVersion).constructUserUpdatedMsg(msgType, user)) + .addUserUpdateMsg(userMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructUserUpdatedMsg(msgType, user)) .build(); } break; case DELETED: downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) - .addUserUpdateMsg(userMsgConstructorFactory.getUserMsgConstructor(edgeVersion).constructUserDeleteMsg(userId)) + .addUserUpdateMsg(userMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructUserDeleteMsg(userId)) .build(); break; case CREDENTIALS_UPDATED: UserCredentials userCredentialsByUserId = userService.findUserCredentialsByUserId(edgeEvent.getTenantId(), userId); if (userCredentialsByUserId != null && userCredentialsByUserId.isEnabled()) { UserCredentialsUpdateMsg userCredentialsUpdateMsg = - userMsgConstructorFactory.getUserMsgConstructor(edgeVersion).constructUserCredentialsUpdatedMsg(userCredentialsByUserId); + userMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructUserCredentialsUpdatedMsg(userCredentialsByUserId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addUserCredentialsUpdateMsg(userCredentialsUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetBundleEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetBundleEdgeProcessor.java index e48387fc64..89ebf9513a 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetBundleEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetBundleEdgeProcessor.java @@ -46,7 +46,7 @@ public class WidgetBundleEdgeProcessor extends BaseEdgeProcessor { List widgets = widgetTypeService.findWidgetFqnsByWidgetsBundleId(edgeEvent.getTenantId(), widgetsBundleId); UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); WidgetsBundleUpdateMsg widgetsBundleUpdateMsg = - widgetMsgConstructorFactory.getWidgetMsgConstructor(edgeVersion).constructWidgetsBundleUpdateMsg(msgType, widgetsBundle, widgets); + widgetMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructWidgetsBundleUpdateMsg(msgType, widgetsBundle, widgets); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addWidgetsBundleUpdateMsg(widgetsBundleUpdateMsg) @@ -55,7 +55,7 @@ public class WidgetBundleEdgeProcessor extends BaseEdgeProcessor { break; case DELETED: WidgetsBundleUpdateMsg widgetsBundleUpdateMsg = - widgetMsgConstructorFactory.getWidgetMsgConstructor(edgeVersion).constructWidgetsBundleDeleteMsg(widgetsBundleId); + widgetMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructWidgetsBundleDeleteMsg(widgetsBundleId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addWidgetsBundleUpdateMsg(widgetsBundleUpdateMsg) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetTypeEdgeProcessor.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetTypeEdgeProcessor.java index 8125235ae6..4e611c83f0 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetTypeEdgeProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/widget/WidgetTypeEdgeProcessor.java @@ -43,7 +43,7 @@ public class WidgetTypeEdgeProcessor extends BaseEdgeProcessor { if (widgetTypeDetails != null) { UpdateMsgType msgType = getUpdateMsgType(edgeEvent.getAction()); WidgetTypeUpdateMsg widgetTypeUpdateMsg = - widgetMsgConstructorFactory.getWidgetMsgConstructor(edgeVersion).constructWidgetTypeUpdateMsg(msgType, widgetTypeDetails, edgeVersion); + widgetMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructWidgetTypeUpdateMsg(msgType, widgetTypeDetails, edgeVersion); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addWidgetTypeUpdateMsg(widgetTypeUpdateMsg) @@ -52,7 +52,7 @@ public class WidgetTypeEdgeProcessor extends BaseEdgeProcessor { break; case DELETED: WidgetTypeUpdateMsg widgetTypeUpdateMsg = - widgetMsgConstructorFactory.getWidgetMsgConstructor(edgeVersion).constructWidgetTypeDeleteMsg(widgetTypeId); + widgetMsgConstructorFactory.getMsgConstructorByEdgeVersion(edgeVersion).constructWidgetTypeDeleteMsg(widgetTypeId); downlinkMsg = DownlinkMsg.newBuilder() .setDownlinkMsgId(EdgeUtils.nextPositiveInt()) .addWidgetTypeUpdateMsg(widgetTypeUpdateMsg)