diff --git a/.github/release.yml b/.github/release.yml
index 1d760fe7bf..5e0ddc4300 100644
--- a/.github/release.yml
+++ b/.github/release.yml
@@ -1,5 +1,5 @@
#
-# Copyright © 2016-2023 The Thingsboard Authors
+# Copyright © 2016-2024 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/.github/workflows/check-configuration-files.yml b/.github/workflows/check-configuration-files.yml
index 0b292ded79..94bfc85ce3 100644
--- a/.github/workflows/check-configuration-files.yml
+++ b/.github/workflows/check-configuration-files.yml
@@ -1,5 +1,5 @@
#
-# Copyright © 2016-2023 The Thingsboard Authors
+# Copyright © 2016-2024 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/application/pom.xml b/application/pom.xml
index 9c30c4cb77..aaa8a1f447 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -1,6 +1,6 @@
+
+ 4.0.0
+
+ org.thingsboard
+ 3.6.3-SNAPSHOT
+ common
+
+ org.thingsboard.common
+ proto
+ jar
+
+ Thingsboard Server Common Protobuf and gRPC structures
+ https://thingsboard.io
+
+
+ UTF-8
+ ${basedir}/../..
+
+
+
+
+ org.thingsboard.common
+ data
+
+
+ org.thingsboard.common
+ message
+
+
+ com.google.protobuf
+ protobuf-java
+
+
+ com.google.protobuf
+ protobuf-java-util
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ provided
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+ test
+
+
+ org.awaitility
+ awaitility
+ test
+
+
+
+
+
+
+ org.xolstice.maven.plugins
+ protobuf-maven-plugin
+
+
+
+
+
+
+ thingsboard-repo-deploy
+ ThingsBoard Repo Deployment
+ https://repo.thingsboard.io/artifactory/libs-release-public
+
+
+
+
\ No newline at end of file
diff --git a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/AdaptorException.java b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/AdaptorException.java
similarity index 90%
rename from common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/AdaptorException.java
rename to common/proto/src/main/java/org/thingsboard/server/common/adaptor/AdaptorException.java
index 8b2908a4b5..226ea644a6 100644
--- a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/AdaptorException.java
+++ b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/AdaptorException.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.common.transport.adaptor;
+package org.thingsboard.server.common.adaptor;
public class AdaptorException extends Exception {
diff --git a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverter.java b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverter.java
similarity index 99%
rename from common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverter.java
rename to common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverter.java
index 51e74d5097..42da1d740f 100644
--- a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverter.java
+++ b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverter.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.common.transport.adaptor;
+package org.thingsboard.server.common.adaptor;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
diff --git a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverterConfig.java b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverterConfig.java
similarity index 92%
rename from common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverterConfig.java
rename to common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverterConfig.java
index 0a9df150e5..335bf2265b 100644
--- a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/JsonConverterConfig.java
+++ b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/JsonConverterConfig.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.common.transport.adaptor;
+package org.thingsboard.server.common.adaptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
diff --git a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/ProtoConverter.java b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/ProtoConverter.java
similarity index 99%
rename from common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/ProtoConverter.java
rename to common/proto/src/main/java/org/thingsboard/server/common/adaptor/ProtoConverter.java
index 54358709f0..b90b5f054f 100644
--- a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/adaptor/ProtoConverter.java
+++ b/common/proto/src/main/java/org/thingsboard/server/common/adaptor/ProtoConverter.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.common.transport.adaptor;
+package org.thingsboard.server.common.adaptor;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
diff --git a/application/src/main/java/org/thingsboard/server/service/queue/ProtoUtils.java b/common/proto/src/main/java/org/thingsboard/server/common/util/ProtoUtils.java
similarity index 95%
rename from application/src/main/java/org/thingsboard/server/service/queue/ProtoUtils.java
rename to common/proto/src/main/java/org/thingsboard/server/common/util/ProtoUtils.java
index 36038568bc..9daa9de9da 100644
--- a/application/src/main/java/org/thingsboard/server/service/queue/ProtoUtils.java
+++ b/common/proto/src/main/java/org/thingsboard/server/common/util/ProtoUtils.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.service.queue;
+package org.thingsboard.server.common.util;
import org.thingsboard.server.common.data.EntityType;
import org.thingsboard.server.common.data.id.DeviceId;
@@ -46,6 +46,7 @@ import org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest;
import org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequestActorMsg;
import org.thingsboard.server.common.msg.rule.engine.DeviceAttributesEventNotificationMsg;
import org.thingsboard.server.common.msg.rule.engine.DeviceCredentialsUpdateNotificationMsg;
+import org.thingsboard.server.common.msg.rule.engine.DeviceDeleteMsg;
import org.thingsboard.server.common.msg.rule.engine.DeviceEdgeUpdateMsg;
import org.thingsboard.server.common.msg.rule.engine.DeviceNameOrTypeUpdateMsg;
import org.thingsboard.server.gen.transport.TransportProtos;
@@ -384,6 +385,21 @@ public class ProtoUtils {
);
}
+ private static TransportProtos.DeviceDeleteMsgProto toProto(DeviceDeleteMsg msg) {
+ return TransportProtos.DeviceDeleteMsgProto.newBuilder()
+ .setTenantIdMSB(msg.getTenantId().getId().getMostSignificantBits())
+ .setTenantIdLSB(msg.getTenantId().getId().getLeastSignificantBits())
+ .setDeviceIdMSB(msg.getDeviceId().getId().getMostSignificantBits())
+ .setDeviceIdLSB(msg.getDeviceId().getId().getLeastSignificantBits())
+ .build();
+ }
+
+ private static DeviceDeleteMsg fromProto(TransportProtos.DeviceDeleteMsgProto proto) {
+ return new DeviceDeleteMsg(
+ TenantId.fromUUID(new UUID(proto.getTenantIdMSB(), proto.getTenantIdLSB())),
+ new DeviceId(new UUID(proto.getDeviceIdMSB(), proto.getDeviceIdLSB())));
+ }
+
public static TransportProtos.ToDeviceActorNotificationMsgProto toProto(ToDeviceActorNotificationMsg msg) {
if (msg instanceof DeviceEdgeUpdateMsg) {
DeviceEdgeUpdateMsg updateMsg = (DeviceEdgeUpdateMsg) msg;
@@ -413,6 +429,10 @@ public class ProtoUtils {
RemoveRpcActorMsg updateMsg = (RemoveRpcActorMsg) msg;
TransportProtos.RemoveRpcActorMsgProto proto = toProto(updateMsg);
return TransportProtos.ToDeviceActorNotificationMsgProto.newBuilder().setRemoveRpcActorMsg(proto).build();
+ } else if (msg instanceof DeviceDeleteMsg) {
+ DeviceDeleteMsg updateMsg = (DeviceDeleteMsg) msg;
+ TransportProtos.DeviceDeleteMsgProto proto = toProto(updateMsg);
+ return TransportProtos.ToDeviceActorNotificationMsgProto.newBuilder().setDeviceDeleteMsg(proto).build();
}
return null;
}
@@ -432,6 +452,8 @@ public class ProtoUtils {
return fromProto(proto.getFromDeviceRpcResponseMsg());
} else if (proto.hasRemoveRpcActorMsg()) {
return fromProto(proto.getRemoveRpcActorMsg());
+ } else if (proto.hasDeviceDeleteMsg()) {
+ return fromProto(proto.getDeviceDeleteMsg());
}
return null;
}
diff --git a/common/cluster-api/src/main/proto/jsinvoke.proto b/common/proto/src/main/proto/jsinvoke.proto
similarity index 97%
rename from common/cluster-api/src/main/proto/jsinvoke.proto
rename to common/proto/src/main/proto/jsinvoke.proto
index 14712bb384..c8ddc03e2b 100644
--- a/common/cluster-api/src/main/proto/jsinvoke.proto
+++ b/common/proto/src/main/proto/jsinvoke.proto
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/common/cluster-api/src/main/proto/queue.proto b/common/proto/src/main/proto/queue.proto
similarity index 98%
rename from common/cluster-api/src/main/proto/queue.proto
rename to common/proto/src/main/proto/queue.proto
index 016a40f5dc..4da2883291 100644
--- a/common/cluster-api/src/main/proto/queue.proto
+++ b/common/proto/src/main/proto/queue.proto
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -255,6 +255,12 @@ message GetOrCreateDeviceFromGatewayRequestMsg {
message GetOrCreateDeviceFromGatewayResponseMsg {
DeviceInfoProto deviceInfo = 1;
bytes profileBody = 2;
+ TransportApiRequestErrorCode error = 3;
+}
+
+enum TransportApiRequestErrorCode {
+ UNKNOWN_TRANSPORT_API_ERROR = 0;
+ ENTITY_LIMIT = 1;
}
message GetEntityProfileRequestMsg {
@@ -300,6 +306,17 @@ message CoreStartupMsg {
int64 ts = 3;
}
+message ResourceCacheInvalidateMsg {
+ int64 tenantIdMSB = 1;
+ int64 tenantIdLSB = 2;
+ repeated ImageCacheKeyProto keys = 3;
+}
+
+message ImageCacheKeyProto {
+ optional string resourceKey = 1;
+ optional string publicResourceKey = 2;
+}
+
message LwM2MRegistrationRequestMsg {
string tenantId = 1;
string endpoint = 2;
@@ -1004,6 +1021,13 @@ message RemoveRpcActorMsgProto {
int64 deviceIdLSB = 6;
}
+message DeviceDeleteMsgProto {
+ int64 tenantIdMSB = 1;
+ int64 tenantIdLSB = 2;
+ int64 deviceIdMSB = 3;
+ int64 deviceIdLSB = 4;
+}
+
message ToDeviceActorNotificationMsgProto {
DeviceEdgeUpdateMsgProto deviceEdgeUpdateMsg = 1;
DeviceNameOrTypeUpdateMsgProto deviceNameOrTypeMsg = 2;
@@ -1012,6 +1036,7 @@ message ToDeviceActorNotificationMsgProto {
ToDeviceRpcRequestActorMsgProto toDeviceRpcRequestMsg = 5;
FromDeviceRpcResponseActorMsgProto fromDeviceRpcResponseMsg = 6;
RemoveRpcActorMsgProto removeRpcActorMsg = 7;
+ DeviceDeleteMsgProto deviceDeleteMsg = 8;
}
/**
@@ -1267,6 +1292,7 @@ message ToCoreNotificationMsg {
EdgeEventUpdateMsgProto edgeEventUpdate = 14;
ToEdgeSyncRequestMsgProto toEdgeSyncRequest = 15;
FromEdgeSyncResponseMsgProto fromEdgeSyncResponse = 16;
+ ResourceCacheInvalidateMsg resourceCacheInvalidateMsg = 17;
}
/* Messages that are handled by ThingsBoard RuleEngine Service */
diff --git a/common/transport/transport-api/src/main/proto/transport.proto b/common/proto/src/main/proto/transport.proto
similarity index 97%
rename from common/transport/transport-api/src/main/proto/transport.proto
rename to common/proto/src/main/proto/transport.proto
index 12c7f3e8c6..b3faf24539 100644
--- a/common/transport/transport-api/src/main/proto/transport.proto
+++ b/common/proto/src/main/proto/transport.proto
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/common/transport/transport-api/src/test/java/JsonConverterTest.java b/common/proto/src/test/java/org/thingsboard/server/common/adaptor/JsonConverterTest.java
similarity index 97%
rename from common/transport/transport-api/src/test/java/JsonConverterTest.java
rename to common/proto/src/test/java/org/thingsboard/server/common/adaptor/JsonConverterTest.java
index 39ed04a29a..773ebbea3d 100644
--- a/common/transport/transport-api/src/test/java/JsonConverterTest.java
+++ b/common/proto/src/test/java/org/thingsboard/server/common/adaptor/JsonConverterTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,13 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.thingsboard.server.common.adaptor;
+
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.thingsboard.server.common.transport.adaptor.JsonConverter;
import java.util.ArrayList;
diff --git a/application/src/test/java/org/thingsboard/server/service/queue/ProtoUtilsTest.java b/common/proto/src/test/java/org/thingsboard/server/common/util/ProtoUtilsTest.java
similarity index 99%
rename from application/src/test/java/org/thingsboard/server/service/queue/ProtoUtilsTest.java
rename to common/proto/src/test/java/org/thingsboard/server/common/util/ProtoUtilsTest.java
index 1a696b730d..4bb98f6cd2 100644
--- a/application/src/test/java/org/thingsboard/server/service/queue/ProtoUtilsTest.java
+++ b/common/proto/src/test/java/org/thingsboard/server/common/util/ProtoUtilsTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.thingsboard.server.service.queue;
+package org.thingsboard.server.common.util;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
diff --git a/common/queue/pom.xml b/common/queue/pom.xml
index 32d740812d..1eb4dd6ce8 100644
--- a/common/queue/pom.xml
+++ b/common/queue/pom.xml
@@ -1,6 +1,6 @@
-
diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.scss b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.scss
index 3aed0ccb5e..505db79a36 100644
--- a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.scss
+++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.scss
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2023 The Thingsboard Authors
+ * Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
.user-avatar {
display: inline-flex;
justify-content: center;
diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts
index 1fb1d3f689..0fc489fbfe 100644
--- a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts
+++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts
@@ -1,5 +1,5 @@
///
-/// Copyright © 2016-2023 The Thingsboard Authors
+/// Copyright © 2016-2024 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html
index 8618592ae0..8145c31b06 100644
--- a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html
@@ -1,6 +1,6 @@
-