|
|
|
@ -39,8 +39,6 @@ import org.thingsboard.server.dao.entity.AbstractCachedEntityService; |
|
|
|
import org.thingsboard.server.dao.eventsourcing.DeleteEntityEvent; |
|
|
|
import org.thingsboard.server.dao.eventsourcing.SaveEntityEvent; |
|
|
|
import org.thingsboard.server.dao.mobile.MobileAppSettingsService; |
|
|
|
import org.thingsboard.server.dao.notification.NotificationRequestService; |
|
|
|
import org.thingsboard.server.dao.notification.NotificationRuleService; |
|
|
|
import org.thingsboard.server.dao.notification.NotificationSettingsService; |
|
|
|
import org.thingsboard.server.dao.service.PaginatedRemover; |
|
|
|
import org.thingsboard.server.dao.service.Validator; |
|
|
|
@ -168,8 +166,10 @@ public class TenantServiceImpl extends AbstractCachedEntityService<TenantId, Ten |
|
|
|
adminSettingsService.deleteAdminSettingsByTenantId(tenantId); |
|
|
|
mobileAppSettingsService.deleteByTenantId(tenantId); |
|
|
|
notificationSettingsService.deleteNotificationSettings(tenantId); |
|
|
|
|
|
|
|
tenantDao.removeById(tenantId, tenantId.getId()); |
|
|
|
publishEvictEvent(new TenantEvictEvent(tenantId, true)); |
|
|
|
eventPublisher.publishEvent(DeleteEntityEvent.builder().tenantId(tenantId).entityId(tenantId).entity(tenant).build()); |
|
|
|
|
|
|
|
cleanUpService.removeTenantEntities(tenantId, // don't forget to implement deleteEntity from EntityDaoService when adding entity type to this list
|
|
|
|
EntityType.ENTITY_VIEW, EntityType.WIDGETS_BUNDLE, EntityType.WIDGET_TYPE, |
|
|
|
@ -179,7 +179,6 @@ public class TenantServiceImpl extends AbstractCachedEntityService<TenantId, Ten |
|
|
|
EntityType.NOTIFICATION_REQUEST, EntityType.NOTIFICATION_RULE, EntityType.NOTIFICATION_TEMPLATE, |
|
|
|
EntityType.NOTIFICATION_TARGET, EntityType.QUEUE_STATS, EntityType.CUSTOMER |
|
|
|
); |
|
|
|
eventPublisher.publishEvent(DeleteEntityEvent.builder().tenantId(tenantId).entityId(tenantId).entity(tenant).build()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|