|
|
|
@ -21,7 +21,6 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.thingsboard.server.common.data.Tenant; |
|
|
|
import org.thingsboard.server.common.data.asset.Asset; |
|
|
|
import org.thingsboard.server.common.data.id.EntityId; |
|
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
|
import org.thingsboard.server.common.data.page.PageData; |
|
|
|
@ -41,8 +40,6 @@ import org.thingsboard.server.dao.service.Validator; |
|
|
|
import org.thingsboard.server.dao.user.UserService; |
|
|
|
import org.thingsboard.server.dao.widget.WidgetsBundleService; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import static org.thingsboard.server.dao.service.Validator.validateId; |
|
|
|
|
|
|
|
@Service |
|
|
|
@ -108,7 +105,7 @@ public class TenantServiceImpl extends AbstractEntityService implements TenantSe |
|
|
|
public void deleteTenant(TenantId tenantId) { |
|
|
|
log.trace("Executing deleteTenant [{}]", tenantId); |
|
|
|
Validator.validateId(tenantId, INCORRECT_TENANT_ID + tenantId); |
|
|
|
oAuth2Service.deleteDomainOAuth2ClientRegistrationByTenant(tenantId); |
|
|
|
oAuth2Service.deleteTenantOAuth2ClientsParams(tenantId); |
|
|
|
customerService.deleteCustomersByTenantId(tenantId); |
|
|
|
widgetsBundleService.deleteWidgetsBundlesByTenantId(tenantId); |
|
|
|
dashboardService.deleteDashboardsByTenantId(tenantId); |
|
|
|
|