Commit 1bf4fb1a7ecd1ca478dea10ff38a76f95e25fb67
Committed by
GitHub
Merge pull request #43 from BohdanSmetanyuk/feature/relations_deleted
deleted invalid case, deleted unused imports
Showing
2 changed files
with
0 additions
and
13 deletions
@@ -24,9 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -24,9 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
24 | import org.springframework.web.bind.annotation.ResponseBody; | 24 | import org.springframework.web.bind.annotation.ResponseBody; |
25 | import org.springframework.web.bind.annotation.ResponseStatus; | 25 | import org.springframework.web.bind.annotation.ResponseStatus; |
26 | import org.springframework.web.bind.annotation.RestController; | 26 | import org.springframework.web.bind.annotation.RestController; |
27 | -import org.thingsboard.server.common.data.DataConstants; | ||
28 | import org.thingsboard.server.common.data.audit.ActionType; | 27 | import org.thingsboard.server.common.data.audit.ActionType; |
29 | -import org.thingsboard.server.common.data.edge.EdgeEventType; | ||
30 | import org.thingsboard.server.common.data.exception.ThingsboardErrorCode; | 28 | import org.thingsboard.server.common.data.exception.ThingsboardErrorCode; |
31 | import org.thingsboard.server.common.data.exception.ThingsboardException; | 29 | import org.thingsboard.server.common.data.exception.ThingsboardException; |
32 | import org.thingsboard.server.common.data.id.EntityId; | 30 | import org.thingsboard.server.common.data.id.EntityId; |
@@ -132,8 +130,6 @@ public class EntityRelationController extends BaseController { | @@ -132,8 +130,6 @@ public class EntityRelationController extends BaseController { | ||
132 | try { | 130 | try { |
133 | relationService.deleteEntityRelations(getTenantId(), entityId); | 131 | relationService.deleteEntityRelations(getTenantId(), entityId); |
134 | logEntityAction(entityId, null, getCurrentUser().getCustomerId(), ActionType.RELATIONS_DELETED, null); | 132 | logEntityAction(entityId, null, getCurrentUser().getCustomerId(), ActionType.RELATIONS_DELETED, null); |
135 | - | ||
136 | - sendNotificationMsgToEdgeService(getTenantId(), entityId, ActionType.RELATIONS_DELETED); | ||
137 | } catch (Exception e) { | 133 | } catch (Exception e) { |
138 | logEntityAction(entityId, null, getCurrentUser().getCustomerId(), ActionType.RELATIONS_DELETED, e); | 134 | logEntityAction(entityId, null, getCurrentUser().getCustomerId(), ActionType.RELATIONS_DELETED, e); |
139 | throw handleException(e); | 135 | throw handleException(e); |
@@ -34,20 +34,16 @@ import org.thingsboard.server.common.data.edge.EdgeEvent; | @@ -34,20 +34,16 @@ import org.thingsboard.server.common.data.edge.EdgeEvent; | ||
34 | import org.thingsboard.server.common.data.edge.EdgeEventType; | 34 | import org.thingsboard.server.common.data.edge.EdgeEventType; |
35 | import org.thingsboard.server.common.data.id.AlarmId; | 35 | import org.thingsboard.server.common.data.id.AlarmId; |
36 | import org.thingsboard.server.common.data.id.CustomerId; | 36 | import org.thingsboard.server.common.data.id.CustomerId; |
37 | -import org.thingsboard.server.common.data.id.DashboardId; | ||
38 | import org.thingsboard.server.common.data.id.EdgeId; | 37 | import org.thingsboard.server.common.data.id.EdgeId; |
39 | import org.thingsboard.server.common.data.id.EntityId; | 38 | import org.thingsboard.server.common.data.id.EntityId; |
40 | import org.thingsboard.server.common.data.id.EntityIdFactory; | 39 | import org.thingsboard.server.common.data.id.EntityIdFactory; |
41 | -import org.thingsboard.server.common.data.id.IdBased; | ||
42 | import org.thingsboard.server.common.data.id.RuleChainId; | 40 | import org.thingsboard.server.common.data.id.RuleChainId; |
43 | import org.thingsboard.server.common.data.id.TenantId; | 41 | import org.thingsboard.server.common.data.id.TenantId; |
44 | -import org.thingsboard.server.common.data.id.UserId; | ||
45 | import org.thingsboard.server.common.data.page.TextPageData; | 42 | import org.thingsboard.server.common.data.page.TextPageData; |
46 | import org.thingsboard.server.common.data.page.TextPageLink; | 43 | import org.thingsboard.server.common.data.page.TextPageLink; |
47 | import org.thingsboard.server.common.data.page.TimePageData; | 44 | import org.thingsboard.server.common.data.page.TimePageData; |
48 | import org.thingsboard.server.common.data.page.TimePageLink; | 45 | import org.thingsboard.server.common.data.page.TimePageLink; |
49 | import org.thingsboard.server.common.data.relation.EntityRelation; | 46 | import org.thingsboard.server.common.data.relation.EntityRelation; |
50 | -import org.thingsboard.server.common.data.relation.RelationTypeGroup; | ||
51 | import org.thingsboard.server.common.data.rule.RuleChain; | 47 | import org.thingsboard.server.common.data.rule.RuleChain; |
52 | import org.thingsboard.server.common.data.rule.RuleChainConnectionInfo; | 48 | import org.thingsboard.server.common.data.rule.RuleChainConnectionInfo; |
53 | import org.thingsboard.server.common.msg.queue.TbCallback; | 49 | import org.thingsboard.server.common.msg.queue.TbCallback; |
@@ -65,14 +61,12 @@ import javax.annotation.PostConstruct; | @@ -65,14 +61,12 @@ import javax.annotation.PostConstruct; | ||
65 | import javax.annotation.PreDestroy; | 61 | import javax.annotation.PreDestroy; |
66 | import java.io.IOException; | 62 | import java.io.IOException; |
67 | import java.util.ArrayList; | 63 | import java.util.ArrayList; |
68 | -import java.util.Collections; | ||
69 | import java.util.HashSet; | 64 | import java.util.HashSet; |
70 | import java.util.List; | 65 | import java.util.List; |
71 | import java.util.Set; | 66 | import java.util.Set; |
72 | import java.util.UUID; | 67 | import java.util.UUID; |
73 | import java.util.concurrent.ExecutorService; | 68 | import java.util.concurrent.ExecutorService; |
74 | import java.util.concurrent.Executors; | 69 | import java.util.concurrent.Executors; |
75 | -import java.util.stream.Collectors; | ||
76 | 70 | ||
77 | @Service | 71 | @Service |
78 | @TbCoreComponent | 72 | @TbCoreComponent |
@@ -361,9 +355,6 @@ public class DefaultEdgeNotificationService implements EdgeNotificationService { | @@ -361,9 +355,6 @@ public class DefaultEdgeNotificationService implements EdgeNotificationService { | ||
361 | updateDependentRuleChains(tenantId, new RuleChainId(entityId.getId()), edgeId); | 355 | updateDependentRuleChains(tenantId, new RuleChainId(entityId.getId()), edgeId); |
362 | } | 356 | } |
363 | break; | 357 | break; |
364 | - case RELATIONS_DELETED: | ||
365 | - // TODO: voba - add support for relations deleted | ||
366 | - break; | ||
367 | } | 358 | } |
368 | } | 359 | } |
369 | 360 |