...
|
...
|
@@ -214,7 +214,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
214
|
214
|
if (customer == null) {
|
215
|
215
|
throw new DataValidationException("Can't unassign dashboards from non-existent customer!");
|
216
|
216
|
}
|
217
|
|
- new CustomerDashboardsUnassigner(customer).removeEntities(customer);
|
|
217
|
+ new CustomerDashboardsUnassigner(customer).removeEntities(tenantId, customer);
|
218
|
218
|
}
|
219
|
219
|
|
220
|
220
|
@Override
|
...
|
...
|
@@ -225,7 +225,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
225
|
225
|
if (customer == null) {
|
226
|
226
|
throw new DataValidationException("Can't update dashboards for non-existent customer!");
|
227
|
227
|
}
|
228
|
|
- new CustomerDashboardsUpdater(customer).removeEntities(customer);
|
|
228
|
+ new CustomerDashboardsUpdater(customer).removeEntities(tenantId, customer);
|
229
|
229
|
}
|
230
|
230
|
|
231
|
231
|
private DataValidator<Dashboard> dashboardValidator =
|
...
|
...
|
@@ -269,7 +269,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
269
|
269
|
}
|
270
|
270
|
|
271
|
271
|
@Override
|
272
|
|
- protected List<DashboardInfo> findEntities(Customer customer, TimePageLink pageLink) {
|
|
272
|
+ protected List<DashboardInfo> findEntities(TenantId tenantId, Customer customer, TimePageLink pageLink) {
|
273
|
273
|
try {
|
274
|
274
|
return dashboardInfoDao.findDashboardsByTenantIdAndCustomerId(customer.getTenantId().getId(), customer.getId().getId(), pageLink).get();
|
275
|
275
|
} catch (InterruptedException | ExecutionException e) {
|
...
|
...
|
@@ -279,7 +279,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
279
|
279
|
}
|
280
|
280
|
|
281
|
281
|
@Override
|
282
|
|
- protected void removeEntity(DashboardInfo entity) {
|
|
282
|
+ protected void removeEntity(TenantId tenantId, DashboardInfo entity) {
|
283
|
283
|
unassignDashboardFromCustomer(customer.getTenantId(), new DashboardId(entity.getUuidId()), this.customer.getId());
|
284
|
284
|
}
|
285
|
285
|
|
...
|
...
|
@@ -294,7 +294,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
294
|
294
|
}
|
295
|
295
|
|
296
|
296
|
@Override
|
297
|
|
- protected List<DashboardInfo> findEntities(Customer customer, TimePageLink pageLink) {
|
|
297
|
+ protected List<DashboardInfo> findEntities(TenantId tenantId, Customer customer, TimePageLink pageLink) {
|
298
|
298
|
try {
|
299
|
299
|
return dashboardInfoDao.findDashboardsByTenantIdAndCustomerId(customer.getTenantId().getId(), customer.getId().getId(), pageLink).get();
|
300
|
300
|
} catch (InterruptedException | ExecutionException e) {
|
...
|
...
|
@@ -304,7 +304,7 @@ public class DashboardServiceImpl extends AbstractEntityService implements Dashb |
304
|
304
|
}
|
305
|
305
|
|
306
|
306
|
@Override
|
307
|
|
- protected void removeEntity(DashboardInfo entity) {
|
|
307
|
+ protected void removeEntity(TenantId tenantId, DashboardInfo entity) {
|
308
|
308
|
updateAssignedCustomer(customer.getTenantId(), new DashboardId(entity.getUuidId()), this.customer);
|
309
|
309
|
}
|
310
|
310
|
|
...
|
...
|
|