additional updates after review
This commit is contained in:
parent
ea5a855272
commit
e1b18e7bed
@ -38,10 +38,10 @@ public enum TbMsgType {
|
||||
ENTITY_UNASSIGNED("Entity Unassigned"),
|
||||
ATTRIBUTES_UPDATED("Attributes Updated"),
|
||||
ATTRIBUTES_DELETED("Attributes Deleted"),
|
||||
ALARM(null),
|
||||
ALARM,
|
||||
ALARM_ACK("Alarm Acknowledged"),
|
||||
ALARM_CLEAR("Alarm Cleared"),
|
||||
ALARM_DELETE(null),
|
||||
ALARM_DELETE,
|
||||
ALARM_ASSIGNED("Alarm Assigned"),
|
||||
ALARM_UNASSIGNED("Alarm Unassigned"),
|
||||
COMMENT_CREATED("Comment Created"),
|
||||
@ -49,8 +49,8 @@ public enum TbMsgType {
|
||||
RPC_CALL_FROM_SERVER_TO_DEVICE("RPC Request to Device"),
|
||||
ENTITY_ASSIGNED_FROM_TENANT("Entity Assigned From Tenant"),
|
||||
ENTITY_ASSIGNED_TO_TENANT("Entity Assigned To Tenant"),
|
||||
ENTITY_ASSIGNED_TO_EDGE(null),
|
||||
ENTITY_UNASSIGNED_FROM_EDGE(null),
|
||||
ENTITY_ASSIGNED_TO_EDGE,
|
||||
ENTITY_UNASSIGNED_FROM_EDGE,
|
||||
TIMESERIES_UPDATED("Timeseries Updated"),
|
||||
TIMESERIES_DELETED("Timeseries Deleted"),
|
||||
RPC_QUEUED("RPC Queued"),
|
||||
@ -64,9 +64,9 @@ public enum TbMsgType {
|
||||
RELATION_ADD_OR_UPDATE("Relation Added or Updated"),
|
||||
RELATION_DELETED("Relation Deleted"),
|
||||
RELATIONS_DELETED("All Relations Deleted"),
|
||||
PROVISION_SUCCESS(null),
|
||||
PROVISION_FAILURE(null),
|
||||
SEND_EMAIL(null),
|
||||
PROVISION_SUCCESS,
|
||||
PROVISION_FAILURE,
|
||||
SEND_EMAIL,
|
||||
|
||||
// tellSelfOnly types
|
||||
GENERATOR_NODE_SELF_MSG(null, true),
|
||||
@ -78,7 +78,7 @@ public enum TbMsgType {
|
||||
MSG_COUNT_SELF_MSG(null, true),
|
||||
|
||||
// Custom or N/A type:
|
||||
NA(null, false);
|
||||
NA;
|
||||
|
||||
public static final List<String> NODE_CONNECTIONS = EnumSet.allOf(TbMsgType.class).stream()
|
||||
.filter(tbMsgType -> !tbMsgType.isTellSelfOnly())
|
||||
@ -101,4 +101,8 @@ public enum TbMsgType {
|
||||
this(ruleNodeConnection, false);
|
||||
}
|
||||
|
||||
TbMsgType() {
|
||||
this(null, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -484,7 +484,7 @@ public final class TbMsg implements Serializable {
|
||||
}
|
||||
|
||||
public boolean isTypeOf(TbMsgType tbMsgType) {
|
||||
return tbMsgType != null && tbMsgType.equals(getInternalType());
|
||||
return internalType.equals(tbMsgType);
|
||||
}
|
||||
|
||||
public boolean isTypeOneOf(TbMsgType... types) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user