refactor code
refactor deleteAndNotify callback
This commit is contained in:
parent
1cfb0a03ab
commit
aba19f171e
@ -104,7 +104,8 @@ public class TbCopyAttributesToEntityViewNode implements TbNode {
|
|||||||
List<String> filteredAttributes =
|
List<String> filteredAttributes =
|
||||||
attributes.stream().filter(attr -> attributeContainsInEntityView(scope, attr, entityView)).collect(Collectors.toList());
|
attributes.stream().filter(attr -> attributeContainsInEntityView(scope, attr, entityView)).collect(Collectors.toList());
|
||||||
if (!filteredAttributes.isEmpty()) {
|
if (!filteredAttributes.isEmpty()) {
|
||||||
ctx.getTelemetryService().deleteAndNotify(ctx.getTenantId(), entityView.getId(), scope, filteredAttributes, getFutureCallback(ctx, msg, entityView));
|
ctx.getTelemetryService().deleteAndNotify(ctx.getTenantId(), entityView.getId(), scope, filteredAttributes,
|
||||||
|
getFutureCallback(ctx, msg, entityView));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Set<AttributeKvEntry> attributes = JsonConverter.convertToAttributes(new JsonParser().parse(msg.getData()));
|
Set<AttributeKvEntry> attributes = JsonConverter.convertToAttributes(new JsonParser().parse(msg.getData()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user