Remove unused methods
This commit is contained in:
parent
fde394faf9
commit
2ef05c037c
@ -84,7 +84,6 @@ import org.thingsboard.server.common.data.page.SortOrder;
|
||||
import org.thingsboard.server.common.data.page.TimePageLink;
|
||||
import org.thingsboard.server.common.data.plugin.ComponentDescriptor;
|
||||
import org.thingsboard.server.common.data.plugin.ComponentType;
|
||||
import org.thingsboard.server.common.data.relation.EntityRelation;
|
||||
import org.thingsboard.server.common.data.rpc.Rpc;
|
||||
import org.thingsboard.server.common.data.rule.RuleChain;
|
||||
import org.thingsboard.server.common.data.rule.RuleChainType;
|
||||
@ -840,45 +839,14 @@ public abstract class BaseController {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void sendRelationNotificationMsg(TenantId tenantId, EntityRelation relation, EdgeEventActionType action) {
|
||||
try {
|
||||
if (!relation.getFrom().getEntityType().equals(EntityType.EDGE) &&
|
||||
!relation.getTo().getEntityType().equals(EntityType.EDGE)) {
|
||||
sendNotificationMsgToEdge(tenantId, null, null, json.writeValueAsString(relation), EdgeEventType.RELATION, action);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to push relation to core: {}", relation, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendDeleteNotificationMsg(TenantId tenantId, EntityId entityId, List<EdgeId> edgeIds) {
|
||||
sendDeleteNotificationMsg(tenantId, entityId, edgeIds, null);
|
||||
}
|
||||
|
||||
protected void sendDeleteNotificationMsg(TenantId tenantId, EntityId entityId, List<EdgeId> edgeIds, String body) {
|
||||
if (edgeIds != null && !edgeIds.isEmpty()) {
|
||||
for (EdgeId edgeId : edgeIds) {
|
||||
sendNotificationMsgToEdge(tenantId, edgeId, entityId, body, null, EdgeEventActionType.DELETED);
|
||||
sendNotificationMsgToEdge(tenantId, edgeId, entityId, null, null, EdgeEventActionType.DELETED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendAlarmDeleteNotificationMsg(TenantId tenantId, EntityId entityId, List<EdgeId> edgeIds, Alarm alarm) {
|
||||
try {
|
||||
sendDeleteNotificationMsg(tenantId, entityId, edgeIds, json.writeValueAsString(alarm));
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to push delete alarm msg to core: {}", alarm, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendEntityAssignToCustomerNotificationMsg(TenantId tenantId, EntityId entityId, CustomerId customerId, EdgeEventActionType action) {
|
||||
try {
|
||||
sendNotificationMsgToEdge(tenantId, null, entityId, json.writeValueAsString(customerId), null, action);
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to push assign/unassign to/from customer to core: {}", customerId, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendEntityNotificationMsg(TenantId tenantId, EntityId entityId, EdgeEventActionType action) {
|
||||
sendNotificationMsgToEdge(tenantId, null, entityId, null, null, action);
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ public class DefaultTbNotificationEntityService implements TbNotificationEntityS
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendAlarmDeleteNotificationMsg(TenantId tenantId, Alarm alarm, List<EdgeId> edgeIds, String body) {
|
||||
private void sendAlarmDeleteNotificationMsg(TenantId tenantId, Alarm alarm, List<EdgeId> edgeIds, String body) {
|
||||
try {
|
||||
sendDeleteNotificationMsg(tenantId, alarm.getId(), edgeIds, body);
|
||||
} catch (Exception e) {
|
||||
@ -269,8 +269,7 @@ public class DefaultTbNotificationEntityService implements TbNotificationEntityS
|
||||
}
|
||||
}
|
||||
|
||||
protected <E extends HasName, I extends EntityId> void sendDeleteNotificationMsg(TenantId tenantId, I entityId, E entity,
|
||||
List<EdgeId> edgeIds) {
|
||||
private <E extends HasName, I extends EntityId> void sendDeleteNotificationMsg(TenantId tenantId, I entityId, E entity, List<EdgeId> edgeIds) {
|
||||
try {
|
||||
sendDeleteNotificationMsg(tenantId, entityId, edgeIds, null);
|
||||
} catch (Exception e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user