|
|
|
@ -385,7 +385,7 @@ public class BaseAlarmService extends AbstractEntityService implements AlarmServ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void createAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus status, boolean createAnyRelation) throws ExecutionException, InterruptedException { |
|
|
|
private void createAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus status, boolean createAnyRelation) { |
|
|
|
if (createAnyRelation) { |
|
|
|
createRelation(tenantId, new EntityRelation(entityId, alarmId, ALARM_RELATION_PREFIX + AlarmSearchStatus.ANY.name(), RelationTypeGroup.ALARM)); |
|
|
|
} |
|
|
|
@ -394,13 +394,13 @@ public class BaseAlarmService extends AbstractEntityService implements AlarmServ |
|
|
|
createRelation(tenantId, new EntityRelation(entityId, alarmId, ALARM_RELATION_PREFIX + status.getAckSearchStatus().name(), RelationTypeGroup.ALARM)); |
|
|
|
} |
|
|
|
|
|
|
|
private void deleteAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus status) throws ExecutionException, InterruptedException { |
|
|
|
private void deleteAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus status) { |
|
|
|
deleteRelation(tenantId, new EntityRelation(entityId, alarmId, ALARM_RELATION_PREFIX + status.name(), RelationTypeGroup.ALARM)); |
|
|
|
deleteRelation(tenantId, new EntityRelation(entityId, alarmId, ALARM_RELATION_PREFIX + status.getClearSearchStatus().name(), RelationTypeGroup.ALARM)); |
|
|
|
deleteRelation(tenantId, new EntityRelation(entityId, alarmId, ALARM_RELATION_PREFIX + status.getAckSearchStatus().name(), RelationTypeGroup.ALARM)); |
|
|
|
} |
|
|
|
|
|
|
|
private void updateAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus oldStatus, AlarmStatus newStatus) throws ExecutionException, InterruptedException { |
|
|
|
private void updateAlarmRelation(TenantId tenantId, EntityId entityId, EntityId alarmId, AlarmStatus oldStatus, AlarmStatus newStatus) { |
|
|
|
deleteAlarmRelation(tenantId, entityId, alarmId, oldStatus); |
|
|
|
createAlarmRelation(tenantId, entityId, alarmId, newStatus, false); |
|
|
|
} |
|
|
|
|