Browse Source

Get rid of rule node configurationBytes

pull/13570/head
ViacheslavKlimov 1 year ago
parent
commit
1ec2450c78
  1. 12
      common/data/src/main/java/org/thingsboard/server/common/data/rule/RuleNode.java

12
common/data/src/main/java/org/thingsboard/server/common/data/rule/RuleNode.java

@ -62,9 +62,7 @@ public class RuleNode extends BaseDataWithAdditionalInfo<RuleNodeId> implements
@Schema(description = "Version of rule node configuration. ", example = "0")
private int configurationVersion;
@Schema(description = "JSON with the rule node configuration. Structure depends on the rule node implementation.", implementation = JsonNode.class)
private transient JsonNode configuration;
@JsonIgnore
private byte[] configurationBytes;
private JsonNode configuration;
private RuleNodeId externalId;
@ -92,14 +90,6 @@ public class RuleNode extends BaseDataWithAdditionalInfo<RuleNodeId> implements
return name;
}
public JsonNode getConfiguration() {
return BaseDataWithAdditionalInfo.getJson(() -> configuration, () -> configurationBytes);
}
public void setConfiguration(JsonNode data) {
setJson(data, json -> this.configuration = json, bytes -> this.configurationBytes = bytes);
}
@Schema(description = "JSON object with the Rule Node Id. " +
"Specify this field to update the Rule Node. " +
"Referencing non-existing Rule Node Id will cause error. " +

Loading…
Cancel
Save